Ticker

6/recent/ticker-posts

Configure Postfix (Relay Host - Smarthost - Mailer) With Authentication

 

Fisrt install server SMTP, run command.

 apt-get install postfix

 In the wizard, Choose “Internet Site”

 

Second install libsasl2-2, sasl2-bin and libsasl2-modules

apt-get install libsasl2-2 sasl2-bin libsasl2-modules


Edit file config postfix.

nano /etc/postfix/main.cf

""""

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes 


smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = relay.midomain.com
#optional

""""

 

Create or edit this file:

nano /etc/postfix/sasl/smtpd.conf

Add the following lines:
""""
 
pwcheck_method: saslauthd
 mech_list: plain login

""""""


Edit file the config saslauthd, change next options:

nano /etc/default/saslauthd

 

""""

START=yes
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd" 
"""" 
 

Restart deamon the saslauthd.
/etc/init.d/saslauthd restart


 Restart Postfix.

/etc/init.d/postfix restart
 
Add user linux for send mail.

adduser myuserrlay --shell=/bin/false --no-create-home
 

Complete wizard. 

Test your relay.

 

 

 

 



Reacciones:

Post a Comment

0 Comments