How to Setup Postfix Mail Server and Dovecot with Database (MariaDB) Securely – Part 1

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

32 Responses

  1. Eric Evans says:

    I have a Centos 7 mail and web server combo using the mariadb for email accounts. I would like to add wordpress db for multiple websites instead of the traditional web server.

    Any insights on how to accomplish this? I tried to add the wordpress db and had issues and would like to have multiple instances of wordpress for multiple sites.

    I appreciate any help you can give me.

  2. Viki says:

    Great article series. Quite detailed & extensive but I could not find any way to restrict the user mail accounts in size. I mean how can one restrict the mailboxes maximum size to some arbitrary amount to save the system from getting completely filled up by a runaway user.
    Or maybe I overlooked some configuration detail.
    Thanks…

    • Viki says:

      Hi,
      Replying to my own comment. Well, Isn’t there any configuration for mail quotas in the this setup ? I think that is the missing piece & will complete the scenario. Thanks.

      • Viki says:

        Hello Everybody,

        Is the comment section closed ? I was expecting some sort of a reply to my query on Quota Enforcement. Many Thanks…

  3. Dieter Raith says:

    I was struggling for days to find out, why I always got password mismatches. After debugging dovecot auth-worker and creating the password
    using:

    doveadm pw -p myfirstpassword -s sha512
    {SHA512}NiPagKRP+1ROZ29XI1unx+dqQ9PozCOZpk3AiAKE5vx/ZKCYbND++Jq84QbOM3LTxYIjDLgcn6NBF84rpg6pvg==

    I found that $6$………………………. is no longer valid with dovecot version 2.2.13

    When I took the complete string:

    {SHA512}NiPagKRP+1ROZ29XI1unx+dqQ9PozCOZpk3AiAKE5vx/ZKCYbND++Jq84QbOM3LTxYIjDLgcn6NBF84rpg6pvg==

    and put it into the password field of the SQL Database I could login with user and password.

    I am using maria-db (mysql Ver 15.1 Distrib 10.0.30-MariaDB, for debian-linux-gnu (x86_64)) which is a opensource fork of mysql. I cannot imagine that this caused the problem. So please update Your great tutorial accordingly.

  4. geoff says:

    Thanks for the wonderful tutorial, that’s a lot of work!

    One problem, though in your “Users_tbl”, the password field needs to be longer, maybe “varchar(110)” rather than “varchar(100)”. The SHA512 hash is several characters too long, so gets automatically truncated. I spent quite a few hours on this before I could successfully log in!

  5. David says:

    Hello,
    Thank you very much for these 5 articles, but I would like How to Setup Postfix Mail Server and Dovecot With the directory ldap of samba4 ?

    Thank you for your responses.

  6. yassine says:

    Hello,

    Thank you so much for this article, I am stuck in section 13 I got this error code #1005 – Can’t create table ‘ZeemailServer_db.Users_tbl’ (error: 150)

    maybe I have done something wrong http://imgur.com/a/8kIr0

    regards,

Got something to say? Join the discussion.

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