Split email addresses on the final "@" so as to allow "@" within the username
authorJason Stubbs <jstubbs@gentoo.org>
Fri, 30 Dec 2005 06:48:50 +0000 (06:48 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Fri, 30 Dec 2005 06:48:50 +0000 (06:48 -0000)
portion of the address.

svn path=/main/trunk/; revision=2497

pym/elog_modules/mod_mail.py

index a007833eef31453f9f386a7510b90eb81145199c..59fd56a8edc5e79623ce898eed9a27f0a180c373 100644 (file)
@@ -18,7 +18,7 @@ def process(mysettings, cpv, logentries, fulltext):
                if " " in mysettings["PORTAGE_ELOG_MAILURI"]:
                        myrecipient, mymailuri = mysettings["PORTAGE_ELOG_MAILURI"].split()
                        if "@" in mymailuri:
-                               myauthdata, myconndata = mymailuri.split("@")
+                               myauthdata, myconndata = mymailuri.rsplit("@", 1)
                                try:
                                        mymailuser,mymailpasswd = myauthdata.split(":")
                                except ValueError: