[Hampshire] Seeking Advice on Postfix/Dovecot/MariaDB Config…

Top Page

Reply to this message
Author: Hants LUG via Hampshire
Date:  
To: hampshire
CC: Hants LUG
Subject: [Hampshire] Seeking Advice on Postfix/Dovecot/MariaDB Configuration
Hello all…

The TLDR; is - First time poster here, hoping that someone might be able
to direct me to a guide to help me install a Postfix/Dovecot/MariaDB
setup on a Raspberry Pi 4B running Trixie please?


I appreciate that’s exceedingly brief, so in the hope that it will help,
here’s (quite a bit) more detail…

In readiness for the (hopefully soon) arrival of FTTP, I’d like to get
some experience with a locally-hosted mail service and would like to
build out some Raspberry Pi infrastructure to that effect.

Current setup:-

  * Nominated Mail Server Host – Raspberry Pi 4B / running “Trixie”
  * Proposed MTA – Postfix (“Compatability Level 3.6”)
  * Proposed MDA/IMAP/POP3 – Dovecot 2.4.1-4
  * Proposed SQL Server – MariaDB 11.8.5 [hosted on primary QNAP NAS]
  * Existing DNS Infrastructure – Technitium DNS running on a
    Primary/Secondary pair of Pi4Bs...


Current State of Play:-

* I have set up most of the requirements DNS – all but the DKIM record…

  * I have [I think!] successfully installed and configured Postfix,
    using this guide:-


    https://raw.org/tutorial/seting-up-email-server-with-postfix-dovecot-and-mysql/


  * I’ve been able to get a MariaDB database configured and populated
    and to use the “postmap -q” command to ensure that PostFix has the
    ability to access the “Domain”, “User”, and “Alias” tables – all
    that test OK.


  * I’ve followed the guide all the way through editing Dovecot – the
    section on the above-linked page that has the sub-title, “Update
    Dovecot Configuration Files” – and then in that part of the guide
    and depending on your viewpoint, I am getting stuck and either Step
    4 [Edit /etc/dovecot/conf.d/auth-sql.conf.ext] or Step 5 [Edit
    /etc/dovecot/dovecot-sql.conf.ext]… in that when I add the edits
    described in Step 4 I get errors reported within the “passdb”
    clause… or, if I comment that out, I find that the file
    /etc/dovecot/dovecot-sql/conf.ext simply doesn’t exist in the
    Raspberry Pi package.


However, given that the file defined in Step 5, above, appears to be
explicitly named and linked from Step 4, I did try to simply create an
empty file and populate it as specified… but the error I get suggests
that I am missing some “syntactic wrapping” – headers, block
definitions, or similar. More specifically, I see this in syslog:

    /“dovecot[20420]: doveconf: Fatal: Error in configuration file
    /etc/dovecot/conf.d/auth-sql.conf.ext line 186: passdb_args: Unknown
    setting: passdb_args (passdb_passdb_args or passdb_sql_passdb_args
    not found either.)”/



This is the relevant section of the auth-sql.conf.ext file:

passdb sql {
    driver = sql
    args = /etc/dovecot/conf.d/dovecot-sql.conf.ext
    }

userdb static {
    driver = static
    args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
    }

The error I get in Step 4 – before commenting it out – is an error on
the line that begins “args =” in the sample code listed with that step.

My sense is that a big part of my struggle [other than ignorance] is the
slight deviation in package layout between my Pi setup and the worked
examples.

I have looked at e.g. mail-in-a-box, Citadel, and others and I’m not
opposed to using a different software stack if someone can make a good
recommendation… this is just where I’ve got to so far.

Any recommendations for a workable how-to guide for an Intranet Pi
running a local mail solution would be gratefully received.

Thanks in advance.

--
Please post to: Hampshire@???
Manage subscription: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG website: http://www.hantslug.org.uk
--------------------------------------------------------------