archives
Installing courier-base - debian prompt"E-Mail account"" style="color:#039;">scr02 - Selecting "tools" -> "E-Mail account"scr03 - MS Outllok: Add new e-mail account optionVirtual Users And Domains With Postfix, Courier And MySQL (Debian Etch)
Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) 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. Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) - Page 2
4 Create The MySQL Database For Postfix/CourierBy default, MySQL is installed without a root password, which we change immediately (replace yourrootsqlpassword with the password you want to use): mysqladmin -u root password yourrootsqlpassword Now we create a database called mail: mysqladmin -u root -p create mail Next, we go to the MySQL shell: mysql -u root -p On the MySQL shell, we create the user mail_admin with the passwort mail_admin_password (replace it with your own password) who has SELECT,INSERT,UPDATE,DELETE privileges on the mail database. This user will be used by Postfix and Courier to connect to the mail database: Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) - Page 3
6 Configure SaslauthdFirst run mkdir -p /var/spool/postfix/var/run/saslauthd Then edit /etc/default/saslauthd. Set START to yes and change the line OPTIONS="-c" to OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r": vi /etc/default/saslauthd
Then create the file /etc/pam.d/smtp. It should contain only the following two lines (go sure to fill in your correct database details): Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) - Page 4
9 Install amavisd-new, SpamAssassin, And ClamAVTo install amavisd-new, spamassassin and clamav, run the following command: apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 unzoo libnet-ph-perl libnet-snpp-perl libnet-telnet-perl nomarch lzop pax Afterwards we must configure amavisd-new. The configuration is split up in various files which reside in the /etc/amavis/conf.d directory. Take a look at each of them to become familiar with the configuration. Most settings are fine, however we must modify three files: Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) - Page 5
11 Quota Exceedance NotificationsIf you want to get notifications about all the email accounts that are over quota, then do this: cd /usr/local/sbin/ Open /usr/local/sbin/quota_notify and edit the variables at the top. Further down in the file (towards the end) there are two lines where you should add a % sign: vi /usr/local/sbin/quota_notify
Run Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) - Page 6
13 Populate The Database And TestTo populate the database you can use the MySQL shell: mysql -u root -p At least you have to create entries in the tables domains and users: INSERT INTO `domains` (`domain`) VALUES ('example.com'); (Please take care you use the ENCRYPT syntax in the second INSERT statement in order to encrypt the password!) |



Recent comments
7 hours 43 min ago
12 hours 33 min ago
17 hours 21 min ago
19 hours 42 min ago
19 hours 59 min ago
20 hours 10 min ago
1 day 11 min ago
1 day 57 min ago
1 day 3 hours ago
1 day 10 hours ago