Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) - Page 5
10 Test Postfix
To see if Postfix is ready for SMTP-AUTH and TLS, run
telnet localhost 25
After you have established the connection to your postfix mail server type
If you see the lines
everything is fine.
to return to the system's shell.
11 Populate The Database And Test
To 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`)
(Please take care you use the ENCRYPT syntax in the second INSERT statement in order to encrypt the password!)
If you want to make entries in the other two tables, that would look like this:
INSERT INTO `forwardings`
(`source`, `destination`) VALUES ('email@example.com', 'firstname.lastname@example.org');
To leave the MySQL shell, type
For most people it is easier if they have a graphical front-end to MySQL; therefore you can also use phpMyAdmin (in this example under http://192.168.0.100/phpmyadmin/) to administrate the mail database. Again, when you create a user, go sure that you use the ENCRYPT function to encrypt the password:
I do not think I have to explain the domains and users table further.
The forwardings table can have entries like the following:
The transport table can have entries like these:
for more details.
Please keep in mind that the order of entries in the transport table is important! The entries will be followed from the top to the bottom.
Important: Postfix uses a caching mechanism for the transports, therefore it might take a while until you changes in the transport table take effect. If you want them to take effect immediately, run
after you have made your changes in the transport table.
Tutorial: ISP-style Email Service with Debian-Sarge and Postfix 2.1: http://workaround.org/articles/ispmail-sarge/
Mail Passwords Encrypted using saslauthd: http://www.syscp.de/docs/public/contrib/cryptedmailpws
Postfix MTA: http://www.postfix.org/
Postfix Quota Patch: http://web.onda.com.br/nadal/