Update mailserver.py
Some sender will send emails to capitalized receiver mail. The counterpart "is_dir" (php) is case sensitive on Unix-systems, so if you check mails for mymail@domain.tld you will not see mails sent to MYMAIL@DOMAIN.TLD. This change will make sure that only lower-case is used to create a receiver-folder.
This commit is contained in:
parent
c8faaf1cff
commit
cc3ce6c440
|
@ -89,7 +89,7 @@ class CustomSMTPServer(smtpd.SMTPServer):
|
|||
|
||||
filenamebase = str(int(round(time.time() * 1000)))
|
||||
|
||||
for em in rcpttos:
|
||||
for em.lower in rcpttos:
|
||||
if not os.path.exists("../data/"+em):
|
||||
os.mkdir( "../data/"+em, 0755 )
|
||||
|
||||
|
@ -133,4 +133,4 @@ if __name__ == '__main__':
|
|||
server = CustomSMTPServer(('0.0.0.0', port), None) # use your public IP here
|
||||
print "[i] Ready to receive Emails"
|
||||
print ""
|
||||
asyncore.loop()
|
||||
asyncore.loop()
|
||||
|
|
Loading…
Reference in a new issue