Install a Complete Mail Server with Postfix and Webmail in Debian 9

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

25 Responses

  1. Moreno Andreo says:

    Does it work with multiple mail domains? (say [email protected], [email protected], and so on).


  2. fatemeh karimi says:

    Thanks for your perfect article. it workes without any problem :))

  3. Thomas says:

    Hi, When I execute the following code:

    nc localhost 143
    x1 LOGIN user pass

    The return is: x1 OK ……. Logged in. But I can’t login with those credentials in the web interface

    Any ideas?

  4. James R says:

    Hi, would this work with an apache server running at the same time?

  5. Simone says:


    I’m getting a ‘Temporary lookup failure’ when trying to send an email to a valid mail address. From logs:

    (451, '4.3.0 : Temporary lookup failure')}

    Any suggestion?


    • Simone Ceccolini says:

      Please consider the mail sending is failing from any host outside the mail server. In parameter I put the corresponding host ip but the mail sending is failing.


  6. igaz says:


    In postfix (install mailserver rainlop)


    should i change it to

    • Ravi Saive says:


      The ssl-cert-snakeoil.pem and ssl-snakeoil.key is created by ssl-cert for snakeoil user and should not be deleted:..

  7. Imed says:

    Hi, I’m following this article to install mail server at work. I’m stuck at this step:

    nc localhost 143
    x1 LOGIN user pass
    the terminal replies: 
    x1 NO [AUTHENTICATIONFAILED] Authentication failed.

    But I am sure from user and pass, I created it from the guide, you used “Matie“, I user “imed”, username and password are the same.

    Any Idea?

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.