User Tools

Site Tools


networking:linux:ssmtp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:linux:ssmtp [2019/05/11 08:55]
gcooper
networking:linux:ssmtp [2020/02/14 09:43] (current)
gcooper
Line 45: Line 45:
 <note important>In modern times, secure mail servers are very strict about who is authorized to send mail.  You generally must use a **valid sender e-mail 'from address'** that **matches the authentication credentials** used.</note> <note important>In modern times, secure mail servers are very strict about who is authorized to send mail.  You generally must use a **valid sender e-mail 'from address'** that **matches the authentication credentials** used.</note>
  
-Using ''FromLineOverride=YES'' will allow the sender to specify the 'from address' at the time of sending.  ''FromLineOverride=NO'' will force the 'from address' to the ''root=validsender@domain.tld'' line in ''ssmtp.conf''+<note>Using ''FromLineOverride=YES'' will allow the sender to specify the 'from address' at the time of sending.  ''FromLineOverride=NO'' will force the 'from address' to the ''root=validsender@domain.tld'' line in ''ssmtp.conf''.</note> 
  
-For sending 'root' mail, you will probably have to manipulate the 'from address' to get SSMTP to send mail through a secure mail server.+For sending **system or 'root' mail**, you will probably have to manipulate the 'from address' to get SSMTP to send mail through a secure mail server.
  
 <file> <file>
Line 60: Line 60:
  
 <file> <file>
-vim /etc/ssmtp/ssmtp.conf+vi /etc/ssmtp/ssmtp.conf
  
-root=adminuser@yourdomain.com +root=validsender@domain.tld      # will be the 'from address' 
-mailhub=mail.yourdomain.com:465 +mailhub=mail.domain.tld:465      # to use SSL on port 465 
-RewriteDomain=yourdomain.com+RewriteDomain=domain.tld         # instead of the host name
 #hostname=_HOSTNAME_ #hostname=_HOSTNAME_
-FromLineOverride=YES            # allows setting from address at runtime +#FromLineOverride=YES            # allows setting 'from addressat runtime 
-UseTLS=YES+UseTLS=YES                       # for SSL
 AuthUser=smtpuser AuthUser=smtpuser
 AuthPass=smtppass AuthPass=smtppass
-#Debug=YES+#Debug=YES                       # useful for troubleshooting
 </file> </file>
  
Line 76: Line 76:
  
 <file> <file>
-mailhub=mail.yourdomain.com:587+mailhub=mail.domain.tld:587
 #UseTLS=YES #UseTLS=YES
 UseSTARTTLS=YES UseSTARTTLS=YES
-#TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt   # Not needed on Ubuntu?+#TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt   # Depends on configuration - Not needed on Ubuntu 18.04
 </file> </file>
  
networking/linux/ssmtp.1557586528.txt.gz · Last modified: 2019/05/11 08:55 by gcooper