Enable authentication on postfix

Posted July 24, 2016 27.4k views
Linux BasicsUbuntuEmail

i have installed postfix on ubuntu server 14.04.4. i am able to telnet to the server as send emails from my smtp server. but since there is no authentication needed for this everybody is having access to the server. so,

  1. how to setup authentication. i would like username password way
  2. can i use local ubuntu account use for the authentication.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

You have an article about it on DO :

Uses dovecot and mysql for TLS authentication.

by Nestor de Haro
In this tutorial we are going to configure a mail server using Postfix, Dovecot, MySQL, and SpamAssassin on Ubuntu 12.04.

Append these lines in /etc/postfix/ and restart postfix service.

smtptlsauthonly = yes
tlssecuritylevel = encrypt

The email messages i’ll be encrypted as TLS and verified by your hostname.