Page 1 of 1

Postfix Emai Server with Dovecot, MariaDB, Postfixadmin & Roundcube

Posted: 2019/11/08 11:25:38
by harishpatil2608
Hi,

I am new to this forum. :)

I am trying to setup a mail server with Postfix virual mailboxes, Dovecot, PostfixAdmin, MariaDB & RoundCube. I have gone through the articles available online however I am finding it difficult to get the postfix and dovecot communication work. Can you refer me an article or guide to set up a perfect mail server?

Thanks in advance.

Regards,
Harish

Re: Postfix Emai Server with Dovecot, MariaDB, Postfixadmin & Roundcube

Posted: 2019/11/15 22:14:18
by KernelOops
Here is a simple PHP script that does exactly that, run postfix and dovecot together with proper authentication:

postfix module

dovecot module

Re: Postfix Emai Server with Dovecot, MariaDB, Postfixadmin & Roundcube

Posted: 2019/11/16 07:25:21
by harishpatil2608
Thanks for your reply. I will try to see

Re: Postfix Emai Server with Dovecot, MariaDB, Postfixadmin & Roundcube

Posted: 2019/11/16 07:38:27
by KernelOops
Essentially, postfix needs to do 2 things:

1) authenticate with dovecot

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes

2) accept/forward emails to correct mail box:

virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = /etc/postfix/virtual_mailbox_domains
virtual_alias_maps = /path/to/forwarders

while it seems simple enough, there are thousands of different scenarios, so its not easy to give one example. Someone may use SQL storage, someone may use /home directories, while someone else may use /var/mail/vhosts, so on and so forth.

my suggestion, is to separate everything. So each domain gets its own /home directory structure (/home/domain/etc, /home/domain/mail, ...etc...) and have both postfix and dovecot use the individual homes for delivery.