Postfix SASL authentication with TLS

Some time we are facing problem to send mail using Email Client Software (Like Outlook)form different ISP/Network. To avoid this kind of inconvenience need to configure authentication from server. 


Step: 1

Ø  #vim /etc/dovecot/conf.d/10-master.conf        [ in older dovecot vim /etc/dovecot/dovecot.conf ]           

[Edit / Add the following Lines]


  # Postfix smtp-auth
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
  }


 Ø  #vim /etc/dovecot/conf.d/10-ssl.conf


Edit / Add the following Lines

# SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>

ssl = yes



Step: 2
#vim /etc/postfix/main.cf


# TLS parameters
smtpd_tls_cert_file=/etc/ssl/
certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/
private/ssl-cert-snakeoil.key
smtpd_use_tls=yes

########## Enable TLS ########
smtpd_tls_security_level = may
smtpd_tls_received_header = yes
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes

##############################
########

smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_
database = btree:${data_directory}/smtp_scache

++++++++++++++++++++++++++++++++++++++++++++++++++++

Step 3: 

SMTP Port 25 disable  and Enable 

To enable port 587, edit the file /etc/postfix/master.cf

vim /etc/postfix/master.cf

and remove the # in front of the line:
#submission inet n – n – – smtpd

so that it looks like this:
submission inet n – n – – smtpd

and restart postfix:
/etc/init.d/postfix restart


Step: 4 

To disable port 25, kill the process
netstat -ap | grep :
That will output the line corresponding to the process holding port . Then, look in the last column, you'll see /. Then execute this:
kill  
If that doesn't work (you can check by re-running the netstat command). Do this:
kill -9 

Comments

Popular posts from this blog

Squid Configuration

Squint Configure

Postfix SASL authentication with SMTP port 465:

How to Change the Logo from Zimbra Admin Console