Comments on Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV)

Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) This document describes how to install a mail server based on Postfix that is based on virtual users and domains, i.e. users and domains that are in a MySQL database. I'll also demonstrate the installation and configuration of Courier (Courier-POP3, Courier-IMAP), so that Courier can authenticate against the same MySQL database Postfix uses.

20 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Anonymous

Amazing, this tutorial is very good!

Thanks by share what you know!

Tiago Cruz

By: Anonymous

thanks for this tutorial, my server runs fine

found this by google

h**p://blog.b-network.org/index.php?/archives/93-Postfix-Administrations-PHP-Script.html

works fine :)

regards

michael

By: Anonymous

anyone ever have any problems with the quota for users? Im wanting to setup bigger mail accounts for certain users and it doesnt seem as if its reading the value from the mysql database... ive looked all over the net for a solution but am not able to find one.

thanks, P

By: Michael

Hi.

I'm having the same problem, did you find a solution for this problem??? if you did please tell me...

By: Anonymous

everyone wrote handholded tutorials like these !

By: Anonymous

Try to send emails but unable to retrieve email from Outlook Express, getting error such as invalid password. How can I correct this. I am a newbie configuring linux server. Thanks.

By: admin

Please post support requests always to the forums.

https://www.howtoforge.com/forums/

By: Anonymous

why not use postfixadmin instead of phpMyAdmin and custom tables, would make for much easier domain/user management

By: Anonymous

Hi, everything works perfectly except I receive a mail each hour like below

This email is sent by logcheck. If you wish to no-longer receive it,
you can either deinstall the logcheck package or modify its
configuration file (/etc/logcheck/logcheck.conf).

Security Events
=-=-=-=-=-=-=-=
Dec  2 23:02:08 localhost postfix/smtpd[1167]: _sasl_plugin_load failed on sasl_auxprop_plug_init
for plugin: sql
Dec  3 00:00:02 localhost postfix/smtpd[1269]: _sasl_plugin_load failed on sasl_auxprop_plug_init
for plugin: sql

System Events
=-=-=-=-=-=-=
Dec  2 23:02:08 localhost postfix/smtpd[1167]: sql_select option missing
Dec  2 23:02:08 localhost postfix/smtpd[1167]: auxpropfunc error no mechanism available
Dec  3 00:00:02 localhost postfix/smtpd[1269]: sql_select option missing
Dec  3 00:00:02 localhost postfix/smtpd[1269]: auxpropfunc error no mechanism available

By: Anonymous

Thank you. it is a great guide. However, if u can add "auto reply" and "webmail interface", it will be perfect !

By:

I'm not sure about autoreply, but you can install any webamil with IMAP support in order to query the mail via HTTP (i.e: roundcube, squirrelmail, ...)

 Cheers

By: Anonymous

Don't ask me why, but I ran into problems with saslauthd. I was not able to send a mail via my vServer.

Managed to solve the problems by doing

mount --bind /var/run/saslauthd /var/spool/postfix/var/run/saslauthd

But this gets lost on reboot.
So I added the following line to
/etc/fstab

/var/run/saslauthd /var/spool/postfix/var/run/saslauthd none bind

Maybe the problem is related to the chrooted environment.

Still a great HowTo.

By: Anonymous

I would love to add a few notes for those of us not using debian, but for the most part, concisely straight forward. It just works.

By:

the 3 lines of magic are:

echo postfix hold | dpkg --set-selections &&
echo postfix-mysql hold | dpkg --set-selections &&
echo postfix-tls hold | dpkg --set-selections

now you can do ;

apt-get update && apt-get dist-upgrade

Just my .02 ct

Ovis

By: admin

It's howtoforge, as shown here: https://www.howtoforge.com/import_vmware_images

By:

I've downloaded the WMware image of this tutorial. Everything goes fine, but i don't know root password.

I have tried to find it in this tutorial without success.

Thank you 

By:

The filesystem where /var/spool/postfix lies, have to be without noexec flag else postfix can not resolve MX for sending mail to another mailserver. I spent some hours to find it out.

By: Anton N. Petrov

transport table not support forward from "somedomain.com" to "virtual:[email protected]"

make this via forwardings table as "@somedomain.com","[email protected]"

PS "somedomain.com" must be add in table domains

By: Dimitar

It's a great basic tutorial! Love it!

For convenience I'm trying to set domain forwarding, or how should I call it...
I want all mails to example.com to go to the respective user @example.net
Example:
[email protected]>[email protected]
[email protected]>[email protected]
/[email protected]>dropped/
but without doing it by hand in forwardings table.
Is it impossible, or it's just me not able to figure it out...

By: Alex

Hi,

I do have a question: I have a working email system set up with virtual users and everything is running as it should, but when I increase the quota in mysql, the new quota is not seen in the email client nor in roundcube. In restarted postfix, but no luck. Is there anything else I should do so the new quota would be applied?

Thank you.