I've set an smtp server with smtpd python module with a ddns and an MX record. Now I want to receive email from account like google, yahoo etc, the email it is sent but it is never received, it seems that the problem is the email never reach the local user. Sending the email with smtplib works.
import smtpd
import asyncore
class CustomSMTPServer(smtpd.SMTPServer):
def process_message(self, peer, mailfrom, rcpttos, data):
print ('Receiving message from:', peer)
print ('Message addressed from:', mailfrom)
print ('Message addressed to :', rcpttos)
print ('Message length :', len(data))
print(data)
return
server = CustomSMTPServer(('0.0.0.0', 25), None)
asyncore.loop()
How to receive email from account like google and others?