Light-weight outward bound SMTP web server
What do you make use of as a light-weight SMTP for outward bound emails just?
I am running an application that sends out emails using SMTP when occasions take place occasionally, and also I do not require a totally included e-mail web server.
MODIFY: I am greater than satisfied to make use of something like postfix (and also do), if that's the most effective selection. I was assuming there might be something much less complex, that goes out package.
IMHO, the most convenient means to do this is with postfix. You can configure it as a light outward bound relay with these commands:
postconf -e relayhost=other.mailserver.com postconf -e myorigin=my.domainname.com
As long as the SMTP web server defined in
relayhost does not call for verification, permits you to relay or is a legitimate location for the recipient address this will certainly function.
myorigin parameter will certainly be the default domain. So if you send mail to foo it will certainly most likely to foo @my.domainname.com. Mail sent out by customer bar will certainly be from bar @my.domainname.com.
If you do require to confirm and also intend to sustain TLS, additionally run the adhering to commands:
postconf -e smtp_tls_security_level=may postconf -e smtp_sasl_auth_enable=yes postconf -e smtp_sasl_password_maps=pcre:/etc/postfix/sasl_password_maps
/etc/postfix/sasl_password_maps have this web content:
All mail will certainly be sent out to your relayhost with the defined username and also password.
You practically do not require an e-mail web server on your host, what you require (and also possibly currently have ) is an smtp-client (or MUA ) that can connect to your company SMTP Server (which can be anywhere you can connect to. )
Relying on the App (and also the shows language it was created in ) there are several means for your application to connect to the 'the' SMTP Server on your network.
Generally, with PHP or Python, there's an arrangement documents with the application to define the "SMTP" Server (which can be on your host or in other places on your network. ) If you currently have a mail web server on the network, after that simply aim the arrangement to that web server.
If nothing else alternatives exist, the application can create the e-mail message to typical result that you can process with something like :
listoftargets=" me @example.com stab @example.com". resemble "Test Content"|mail -s "Test Subject" $listoftargets
On some systems, there is currently a marginal mailserver for sending out just.
There are numerous selections of marginal, relay-only mail transfer representatives (MTAs, or "mail web servers" ), several of which have actually been stated in various other solutions :
- msmtp http://msmtp.sourceforge.net/
- nullmailer http://untroubled.org/nullmailer/ (my individual favorite )
- esmtp http://esmtp.sourceforge.net/ (unmaintained )
- sSMTP http://packages.debian.org/source/sid/ssmtp (no more proactively created )
For either of those to function, you require a complete fledged MTA someplace that will certainly better communicate your messages (called "mail center" ) and also it is highly advised that you regulate this mail center. Negative Things ™ can take place or else.