User Tools

Site Tools


networking:linux:postfix_smarthost

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
Next revision Both sides next revision
networking:linux:postfix_smarthost [2018/01/01 10:41]
gcooper
networking:linux:postfix_smarthost [2019/05/20 08:20]
gcooper
Line 61: Line 61:
  
 <file> <file>
-yum install cyrus-sasl-plain+yum install cyrus-sasl-plain cyrus-sasl-ntlm
 </file> </file>
  
Line 73: Line 73:
  
 <file> <file>
-SMTPHOST=your.mailserver.domain:587+#smtp.isp.com       username:password 
 +<fqdn_of_mail_svr>:587  <username>:<password>
 </file> </file>
  
Line 84: Line 85:
 <file> <file>
 postconf -e 'smtp_use_tls=yes' postconf -e 'smtp_use_tls=yes'
-systemctl reload postfix+postfix reload
 </file> </file>
  
Line 91: Line 92:
 **Envelope-From**: http://serverfault.com/questions/533912/how-do-i-change-the-envelope-from-in-postfix **Envelope-From**: http://serverfault.com/questions/533912/how-do-i-change-the-envelope-from-in-postfix
  
-<note warning>Some mail servers require the ''envelope-from'' header to be a **valid sender** in order to accept mail via authenticated SMTP.  The most restrictive servers may also require that the **authentication user must match the sender address**.</note>+<note warning>Some mail servers require the ''envelope-from'' header to be a **valid sender** in order to accept mail via authenticated SMTP.  Many servers also require that the **authentication user must match the sender address**.</note>
  
 <file> <file>
Line 102: Line 103:
  
 <file> <file>
-# Use the empty regexp to map *any* address to the desired envelope sender. +# Use the empty regex '//' to map *any* address to the desired envelope sender. 
-// pbx@yourdomain.tld+// validsender@yourdomain.tld
 </file> </file>
  
Line 113: Line 114:
 </file> </file>
  
-===== Script for FreePBX Distro =====+===== FreePBX Distro =====
  
 :!: Includes **SMTP authentication**, **TLS**, **envelope-from** and **trusted CAs** :!: Includes **SMTP authentication**, **TLS**, **envelope-from** and **trusted CAs**
Line 124: Line 125:
 FILE=/etc/postfix/password FILE=/etc/postfix/password
 # Your valid mail server - colon and port number optional  # Your valid mail server - colon and port number optional 
-SMTPHOST=yourhost.yourdomain.com:587+SMTPHOST=yoursmtphost.yourdomain.tld:587
 # SMTP auth credentials - username may have @ # SMTP auth credentials - username may have @
 USERPASS=yoursmtpusername:yoursmtpuserpassword USERPASS=yoursmtpusername:yoursmtpuserpassword
 CANONICAL=/etc/postfix/canonical CANONICAL=/etc/postfix/canonical
 # Must be a valid authorized sender e-mail address in your domain  # Must be a valid authorized sender e-mail address in your domain 
-SENDER=pbx@yourdomain.com+SENDER=validsender@yourdomain.tld
 # Trusted CAs aren't configured by default?! # Trusted CAs aren't configured by default?!
 CAFILE=/etc/ssl/certs/ca-bundle.trust.crt CAFILE=/etc/ssl/certs/ca-bundle.trust.crt
  
-yum install cyrus-sasl-plain+#yum install cyrus-sasl-plain
 #apt-get install libsasl2-modules #apt-get install libsasl2-modules
  
Line 165: Line 166:
 postconf -e "smtp_tls_CAfile = $CAFILE" postconf -e "smtp_tls_CAfile = $CAFILE"
  
-/etc/init.d/postfix reload+postfix reload
 </file> </file>
networking/linux/postfix_smarthost.txt · Last modified: 2021/11/30 08:01 by gcooper