How to Configure Postfix and Dovecot with Virtual Domain Users in Linux – Part 2

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

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.

Gabriel Cánepa

Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

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...

94 Responses

  1. DAVE says:

    Good evening Gabriel Cánepa,

    Thank you very much for your presentation.
    What should I change if I want the Samba4 LDAP instead of MariaDB? Thank you.

  2. woppywush says:

    I can’t login into the mail server

    May 19 17:29:28 imap-login: Info: Aborted login (auth failed, 5 attempts in 10 secs): user=, method=PLAIN, rip=, lip=, TLS: Disconnected, session=

  3. Eric Evans says:

    I have a small issue and I can’t seem to find a reason for it. about 5 times a day, I get email addressed to other users on my server. I have enabled verbose logging on postfix and dovecot but I can find no correlation between the logs and the email being sent to the wrong inbox. I am perplexed. Any ideas?

    • Gabriel A. Cánepa says:

      Hi Eric,
      This is very strange. If you can post the logs somewhere and indicate what are the right and wrong email addresses, I would be glad to take a look.

      On a side note, when an email is sent to the wrong inbox, does the “right” recipient also get a copy or not? Additionally, how did you become aware of this issue and how were you able to determine where the email had gone?

      • Eric Evans says:

        I’ll have to work on getting the logs. I will have to search logs by message ID and figure out which ones are being delivered incorrectly.

        The reason I know this is happening is I get other users email, email not addressed to me, but others in the database.

        I’ll work on the logs and get back to you.

      • Eric Evans says:

        I believe whats happening is my email gateway, ScrolloutF1, is marking these messages and sending them to a collector email that aliases to my email. I traced one email in particular and it is forwarded to the collector email address and then it gets delivered to me.

        That may be the issue.I’ll keep you posted.

        Thank you for the prompt reply.

  4. shany abady says:

    Hi, great article,

    After setting everything up I successfully telnet to the server over port 993 (143 does not pass the SSL routine), but I am unable to login.

    any ideas?

  5. Eric Evans says:

    I’m using ScrolloutF1 for email security and it seems to work great, but I want to send spam reports to the Admin user for each domain. In other words, I would like to forward my spam filter collector address to a distribution group.

    Can you explain how to “Alias” a distribution group so an email can be sent to many recipients at once?

    Besides creating the group, I would need to add members.

    Any help would be greatly appreciated.

  6. Eric Evans says:


    You need a leading space in front of the line and the error will be resolved. With no space, it does give a config error.
    I hope this helps.

  7. Tomthevth says:

    I’m getting postfix error when editing the /etc/postfix/
    /usr/sbin/postconf: fatal: file /etc/postfix/ line 131:

    Line 131 is the added flag line:
    flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

    Someone any idea?


    • S Shah says:

      I had a same issue because of white spaces copy any similar line
      from the file ( and change it as given instruction should work

  8. Eric Evans says:

    S Shah, If you created the user table with password VARCHAR(100) thats the issue. Recreate it with VARCHAR(250) and it will work. The SHA512 encryption makes the password longer than the 100 characters defined.
    Hope this helps.

  9. S Shah says:

    Very nice article but I am stuck unable to login using thunderbird or any other email client

    • T.S says:

      I have the same problem here. Roundcube works fine, also telnet and openssl. But I cannot login via client.
      Any ideas?

  10. Eric Evans says:

    I got it fixed. Thank you for a great article.

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.