git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[StGIT PATCH] Display a message when the server refused some recipients.

From
Yann Dirson <ydirson@altern.org>
Date
Jun 27, 2007, 19:48 UTC
Message-ID
<20070627194844.22513.16185.stgit@gandelf.nowhere.earth>

When the smtp server directly refuses some recipients, an exception is only raised when no recipient got the parcel. This patch displays the recipients which were denied.

Subsequent delivery is still done, no change here.
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 stgit/commands/mail.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
index 899cb1a..04bdf02 100644
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -176,7 +176,9 @@ def __send_message(smtpserver, from_addr, to_addr_list, msg, sleep,
             s.ehlo()
             s.login(smtpuser, smtppassword)
 
-        s.sendmail(from_addr, to_addr_list, msg)
+        result = s.sendmail(from_addr, to_addr_list, msg)
+        if len(result):
+            print "mail server refused delivery for the following recipients: %s" % result
         # give recipients a chance of receiving patches in the correct order
         time.sleep(sleep)
     except Exception, err:
Message 1 of 1 in “Display a message when the server refused some recipients.”
  1. Display a message when the server refused some recipients.Yann Dirson, Jun 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.