How to Enable the SMTP Send Mail Authentication for Ubuntu 15.04 Vivid Postfix Mail Server

March 17, 2015 | By the+gnu+linux+evangelist.

Ubuntu 15.04 Vivid Enabling SMTP Sendmail Authentication

You are Welcome! The Tutorial shows you Step-by-Step How to Install the Packages for Required SMTP Sendmail Authentication on a Ubuntu 15.04 Vivid Vervet Postfix Secure Mail Server.

With this SMTP Setup we are Stopping Unauthorized Mails Relaying and so the Users will Need to Authenticate for sending mails.

Ubuntu 15.04 Vivid Linux Mail Server Stopping SMTP Sendmail Mail Relaying - Featured
  1. Open a Shell Session
    Ctrl+Alt+t on Desktop
    (Press “Enter” to Execute Commands)

    Installing Posfix on Ubuntu 15.04 Vivid Linux - Open Terminal
  2. Installing SMTP Cyrus SSL Auth Packages.

    sudo apt-get install libsasl2-2 libsasl2-modules libsasl2-modules-sql

    If Got “User is Not in Sudoers file” then see: How to Enable sudo

  3. Configuring SMTP Authentication

    sudo nano /etc/postfix/


    smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain reject_unauth_destination, check_policy_service inet:, permit
    # modify the existing smtpd_sender_restrictions
    smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
    # then add these
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_local_domain =

    Ctrl+x to Save & Exit from nano :)
    Then Edit the Postfix SSL Config File:

    sudo nano /etc/postfix/sasl/smtpd.conf


    pwcheck_method: auxprop
    auxprop_plugin: sql
    mech_list: plain login cram-md5 digest-md5
    sql_engine: mysql
    sql_user: postfixamdin
    sql_passwd: [postfixadminMySqlPass]
    sql_database: postfixadmin
    sql_select: select password from mailbox where username='%u@%r' and active = 1

    Change the ‘postfixadminMySqlPass’!
    Save & Exit
    Then Test Setup Restarting the Postfix MTA

    sudo service postfix restart
  4. How to Setup a Multi Virtual Domain/Alias Ubuntu Mail Server.

    Get Multi Domains Posfix Mail Server Setup

QuickChic Theme • Powered by WordPress