Comments on Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft)
Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft) 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. The resulting Postfix server is capable of SMTP-AUTH and TLS and quota. In addition to that, this tutorial covers the installation of Amavisd, SpamAssassin and ClamAV so that emails will be scanned for spam and viruses.
2 Comment(s)
Comments
page 1
debian etch uses a different postfix version so you ll find the patch for this version on the blow url
http://vda.sourceforge.net/VDA/postfix-2.3.8-vda.patch.gz
for compiling this newer postfix version you need to get a few more libraries
apt-get install lsb-release libcdb-dev
page 3
/etc/default/saslauthd
change
START=no
into
START=yes
and add these lines to the end of the file (PARAMS has been changed to OPTIONS)
OPTIONS="-m /var/spool/postfix/var/run/saslauthd -r"
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
close file and run
dpkg-statoverride --add root sasl 710 /var/spool/postfix/var/run/saslauthd
adduser postfix sasl
page 4
NotifyClamd /etc/clamav/clamd.conf
already ok
Followed Falko's The Perfect Server - Ubuntu Gutsy Gibbon (Ubuntu 7.10) tutorial (which is excellent and very timely), but for postfix and apache, substituted the procedures in here.
The only part that did not work at all was the Postfix patch for quotas. Gutsy installed Postfix-2.4.5; I found what may be the updated quota patch here:
http://vda.sourceforge.net/VDA/postfix-2.4.5-vda-ng.patch.gz
but was unable to build the .deb package; there were some issues with libdb4.3-dev among others. If someone would care to elaborate, it would be a great service.
I also skipped the spam/virus portions since I already use a hosted service for this.
Postfix / courier seem to be up and running as described.
-- DrJohn
Some other quick notes on the installs:
2. Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin
:
:
To install Postfix, Courier, Saslauthd, MySQL, and phpMyAdmin, we simply run:
<changed libsasl2 to libsasl2-2>
apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl postfix-tls libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl phpmyadmin apache2 libapache2-mod-php5 php5 php5-mysql
extra qestion appears re phpMyAdmin:
ââââââââââââââââââââââââ⤠Configuring phpmyadmin âââââââââââââââââââââââââ
â phpMyAdmin supports any web server that PHP does, but this automatic â
â configuration process only supports Apache. â
â â
â Web server to reconfigure automatically: â
â â
â [*] apache2 â
â [ ] apache â
â [ ] apache-ssl â
â [ ] apache-perl â
â â
â â
â <Ok> â
â â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
create the SSL certificate that is needed for TLS:
<questions asked are different than the tutorial>
root@myserver/etc/postfix# openssl req -new -outform PEM -out smtpd.cert -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM -days 365 -x509
Generating a 2048 bit RSA private key
................+++
...........................+++
writing new private key to 'smtpd.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:MyState
Locality Name (eg, city) []:MyCity
Organization Name (eg, company) [Internet Widgits Pty Ltd]:MyCompany
Organizational Unit Name (eg, section) []:.
Common Name (eg, YOUR name) []:Postmaster
Email Address []:[email protected]
root@myserver/etc/postfix#