Without using Postfix, Sendmail, Qmail or Exim, is it possible, in pure Python, to have a server that receives emails, and based on certain conditions (such as the subject), redirects them or not to another email server, i.e. a gmail address?
Does Python have receiving-only email capability built-in, without third party module, in a similar way that it has http.server
built-in?
CodePudding user response:
Yes, that is smtpd — SMTP Server.
However, the smtpd
module is deprecated since Python version 3.6.
The recommended replacement is aiosmtpd, which is not in the standard library, alas not build in.