Can I set up system mail to use an external SMTP server?
108
votes
7
answers
388808
views
Is it possible to set up system mail on a linux box to be sent via a different smtp server - maybe even with authentication? If so, how do I do this?
If that's unclear, let give an example. If I'm at the command line and type:
cat body.txt | mail -s "just a test" myfriend@hisdomain.com
is it possible to have that be sent via an external SMTP server, like G-mail ?
I'm not looking for "a way to send mail from gmail from the command line" but rather an option to configure the entire system to use a specific SMTP server, or possibly one account on an SMTP server (maybe overriding the from address).
Asked by cwd
(46887 rep)
Apr 20, 2012, 09:46 PM
Last activity: Mar 3, 2025, 05:29 PM
Last activity: Mar 3, 2025, 05:29 PM