summaryrefslogtreecommitdiffstats
path: root/pym/portage_mail.py
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2006-06-10 22:50:20 +0000
committerMarius Mauch <genone@gentoo.org>2006-06-10 22:50:20 +0000
commit5b3d19065df789e49ba197d5d883d4e3c5ca8726 (patch)
tree4a36e556f666a97d4b5d892ab4caa890ac4cd3ac /pym/portage_mail.py
parenteeca7dd7cc2ca3ccf2cea1006cfa754d7b7513e6 (diff)
downloadportage-5b3d19065df789e49ba197d5d883d4e3c5ca8726.tar.gz
portage-5b3d19065df789e49ba197d5d883d4e3c5ca8726.tar.bz2
portage-5b3d19065df789e49ba197d5d883d4e3c5ca8726.zip
override sender on sendmail invocation
svn path=/main/trunk/; revision=3486
Diffstat (limited to 'pym/portage_mail.py')
-rw-r--r--pym/portage_mail.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage_mail.py b/pym/portage_mail.py
index 37bd11b64..54043e674 100644
--- a/pym/portage_mail.py
+++ b/pym/portage_mail.py
@@ -61,16 +61,16 @@ def send_mail(mysettings, message):
else:
myrecipient = mysettings["PORTAGE_ELOG_MAILURI"]
+ myfrom = message.get("From")
+
# user wants to use a sendmail binary instead of smtp
if mymailhost[0] == os.sep and os.path.exists(mymailhost):
- fd = os.popen(mymailhost+" "+myrecipient, "w")
+ fd = os.popen(mymailhost+" -f "+myfrom+" "+myrecipient, "w")
fd.write(mymessage.as_string())
if fd.close() != None:
sys.stderr.write("!!! %s returned with a non-zero exit code. This generally indicates an error.\n" % mymailhost)
else:
try:
- myfrom = message.get("From")
-
if int(mymailport) > 100000:
myconn = smtplib.SMTP(mymailhost, int(mymailport) - 100000)
myconn.starttls()