This is the process I used to setup a mailserver on a Ubuntu 10.04 Server for handling email for multiple email addresses and domains and integrated with Spam and Virus scanners. The instructions presume you have the Ubuntu 10.04 server installed.
This will install Postfix as the SMTP Server, Dovecot as the IMAP/POP Server, PostfixAdmin to manage email domains and accounts, Mysql for the database, Amavis-new for managing Viruses and Spam, RoundCube for a Web access to a mailbox.
Install Mail Server
The first step is to install the mail server. Ubuntu has an option which will install all the essential components we need for this setup in one go: Enter:
sudo apt-get install mail-server^

You simply need to follow the prompts as you go through the installation.

Use the Tab key to highlight <OK> and then press Enter

we are setting up a Internet mail server which will send and receive email from anyone over the internet so we choose Internet Site.

Here you need to replace mail.example.com with the valid address of your mailserver.
Install Webserver
We need to install the webserver package primarily so that we are able to manage the mailserver through a web interface for adding domains, email addresses etc.
sudo apt-get install lamp-server^

During this process you will be asked to set the password for the mysql database unless you already have the mysql server installed.. It is important you choose a secure password and remember what it is as you will need to use this again later in the installation process.
Install PostfixAdmin
When I install PostfixAdmin it was not yet in the Ubuntu repositories so I had to download it manually and then install it. I think for later versions of Ubuntu this is now available via apt-get.
Download Postfixadmin from:
http://sourceforge.net/projects/postfixadmin/files/
I got the latest version debian version which was: postfixadmin-2.3.2_all.deb
Before installing postfix admin there are a few dependancies which need to be install;
sudo apt-get install dbconfig-common libc-client2007e mlock php5-imap wwwconfig-common postfix-mysql sasl2-bin
Then install PostfixAdmin
sudo dpkg -i postfixadmin-2.3.2_all.deb

You will need to tell postfixadmin which webserver you have installed. In our case it was apache2 so make sure you highlight this in the box above (use the spacebar to bring up the asterisk). Then press TAB until the OK is highlighted to continue.

No we choose which Database to use. We choose MYSQL as this is the one we have install previously.

Enter your mysql password here.

You will then be asked to add password for the postfixadmin database user. Remember this password.

Configuring postfix admin. Accept the default is okay here.
Now we need to configure PostfixAdmin. We need to make a change to the
I’ll use sed to find&replace all occurrences of ‘change-this-to-your.domain.tld’ to ‘example_domain.tld’.
MYSQL
We now need to grant user privaliges on postfixadmin database: Enter the mysql command line interface by typing:
mysql -u root -p
you will then be asked for the password. Enter the password you used when you installed the mysql database originally and you will find yourself within mysql. Cut and paste the following bold commands into the database replacing the 'my_password_1 and 'my_password_2 with actual passwords of your own choosing.
mysql> GRANT ALL PRIVILEGES ON postfixadmin.* TO 'postfixadmin'@'%' IDENTIFIED BY 'my_password_1';Query OK, 0 rows affected (0.00 sec)mysql> GRANT SELECT ON postfixadmin.* TO 'postfix'@'localhost' IDENTIFIED BY 'my_password_2';Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;mysql> quit;
PostAdmin Configuration.
Update PostAdmin configuration files as follows, replacing myreal.domain.com with your actually mailservers domain name.
sudo sed -i 's/change-this-to-your.domain.tld/myreal.domain.com/g' /etc/postfixadmin/config.inc.php
$CONF['configured'] = true;$CONF['encrypt'] = 'md5crypt';$CONF['database_type'] = 'mysqli';$CONF['database_host'] = 'mysql_host'; #usually localhost$CONF['database_user'] = 'postfixadmin';$CONF['database_password'] = 'my_passwd_1'; #replace with the password you set above.$CONF['database_name'] = 'postfixadmin';$CONF['fetchmail'] = 'NO';$CONF['domain_path'] = 'YES';$CONF['domain_in_mailbox'] = 'NO';
Open url http://your_host.domain.ltd/postfixadmin/setup.php and if everything is OK, database structure will be created and you’ll be asked for your setup password… enter something and click ‘Generate password hash’, then copy this hash to config.inc.php, e.g.:
$CONF['setup_password'] = '7e350bf1721579341d662bc3cea01d80:3c5d73ab1894e388e1466bd0df6c3aa2d1cc117e';
Now enter superadmin account details on setup page and click ‘Add Admin’.
PostfixAdmin installation is complete, you should be able to log-in with your new superadmin account.
Now we need to configure postfix to read PostfixAdmin virtual tables. Create user & group for virtual mail:
sudo groupadd -g 5000 vmail
sudo useradd -d /home/vmail -m -u 5000 -g 5000 vmail
Postfix
This is the minimum configuration to get postfix working and good for testing. It will allow you to send unsecure email on port 25. Note, it is avisable to secure your email connection to at least protect your password which is discussed below, but first make sure your basic configuration is working.
Append this to /etc/postfix/main.cf:
virtual_uid_maps = static:5000virtual_gid_maps = static:5000virtual_mailbox_base = /home/vmailvirtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cfvirtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cfvirtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cfrelay_domains = mysql:/etc/postfix/mysql_relay_domains.cfsmtpd_recipient_restrictions =permit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_hostname,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unauth_destination,reject_unauth_pipelining,reject_invalid_hostnamesmtpd_sasl_auth_enable = yessmtpd_sasl_security_options = noanonymous
Create the following files with the content:
/etc/postfix/mysql_virtual_mailbox_domains.cf
hosts = 127.0.0.1user = postfixpassword = my_passwd _2 #replace with the password you set abovedbname = postfixadminquery = SELECT domain FROM domain WHERE domain='%s' and backupmx = 0 and active = 1
/etc/postfix/mysql_virtual_mailbox_maps.cf
hosts = 127.0.0.1user = postfixpassword = my_passwd_2 #replace with the password you set abovedbname = postfixadminquery = SELECT maildir FROM mailbox WHERE username='%s' AND active = 1
/etc/postfix/mysql_virtual_alias_maps.cf
hosts = 127.0.0.1user = postfixpassword = my_passwd _2 #replace with the password you set abovedbname = postfixadminquery = SELECT goto FROM alias WHERE address='%s' AND active = 1
/etc/postfix/mysql_relay_domains.cf
hosts = 127.0.0.1user = postfixpassword = my_passwd _2 #replace with the password you set abovedbname = postfixadminquery = SELECT domain FROM domain WHERE domain='%s' and backupmx = 1
/etc/postfix/sasl/smtpd.conf
pwcheck_method: saslauthdmech_list: PLAIN LOGINauxprop_plugin: rimap
Update /etc/default/saslauthd with:
START=yesMECHANISMS="rimap"#imap server addressMECH_OPTIONS="localhost"OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
Add postfix user to sasl group:
sudo adduser postfix sasl
Dovecot
Create file /etc/dovecot/dovecot-mysql.conf:
driver = mysqlconnect = host=127.0.0.1 dbname=postfix_mail user=postfix password=my_passwddefault_pass_scheme = MD5-CRYPTuser_query = SELECT '/home/vmail/%d/%n' as home, 3000 AS uid, 3000 AS gid FROM mailbox WHERE username = '%u'password_query = SELECT password FROM mailbox WHERE username = '%u'
Edit /etc/dovecot/dovecot.conf and make sure the options below are set correctly.
disable_plaintext_auth = nomail_location = maildir:/home/vmail/%d/%n/Maildir:INDEX=/home/vmail/%d/%n/Maildir/indexesauth default {userdb sql {args = /etc/dovecot/dovecot-mysql.conf}passdb sql {args = /etc/dovecot/dovecot-mysql.conf}}
Restart services:
suso /etc/init.d/dovecot restartsudo /etc/init.d/saslauthd restartsudo /etc/init.d/postfix restart
Testing the Server.
At this stage you need to test everything and make sure it works before you do anything else. If it is not working now then it will be harder to find the problem as you add features to your mail system. As each feature is added it is always good to try things out before moving forward.
Keep an eye on the log files, especially /var/log/mail.log or /var/log/mail.err
Dovecote for Deliver mail.
Dovecot has better facilities for delivering email to mailboxes than postix so changing this is a good idea. Yoi need to make several changes.
Add the following to /etc/postfix/master.cf
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
And to /etc/postfix/main.cf
virtual_transport=dovecotdovecot_destination_recipient_limit=1
Make the following changes to /etc/dovecot/dovecot.conf
Tell dovecote where the mailboxes are located:
userdb static {args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes}
Now look for another section called socket listen. Here you define socket files that are used to interact with Dovecot's authentication mechanism. Make the section read:
socket listen {master {path = /var/run/dovecot/auth-mastermode = 0600user = vmail}client {path = /var/spool/postfix/private/authmode = 0660user = postfixgroup = postfix}}
The master section is needed to give Dovecot's delivery agent (the program that saves a new mail to the user's mailbox) access to the userdb information. The client section creates a socket inside the "chroot" directory of Postfix. chroot means that parts of Postfix are jailed into /var/spool/postfix and can only access files beneath that directory. It is a good security measure so that even if Postfix had bugs and were attacked the attacker would not be able to access /etc/passwd for example.
And finally the protocol lda section needs to be customized. The LDA (local delivery agent) is more capable than Postfix' built-in virtual delivery agent. It allows for quotas and Sieve (ships with the dovecot-common package) filtering. Let the section be:
protocol lda {log_path = /home/vmail/dovecot-deliver.logauth_socket_path = /var/run/dovecot/auth-masterpostmaster_address = postmaster@example.commail_plugins = sieve # on ubuntu otherwise cmusieveglobal_script_path = /home/vmail/globalsieverc}
Please change the above postmaster email address to a valid address where the administrator can be reached.
Create an an empty log file for deliver
sudo touch /var/log/dovecot-deliver.logsudo chmod a+w /var/log/dovecot-deliver.log
Finally restart postfix and dovecot and test it all works.
sudo /etc/init.d/dovecot restart
sudo /etc/init.d/postfix restart
TLS and SSL
Currently all your mailserver and imap/pop3 requests will travel across the net as plan text which will expose your emailaddress and password to anyone along the route who may be looking. This might not have been an issue back in the early 1990's but today we are foolish to take such risks and therefore you would be wise to enable encryption on your postfix and doveoct servers. You can do this in several ways depending on how public your server is going to be.
If the server is to be used for private use then perhaps the simplist option it to create your own self-signed certificate on the server. This will generate a warning message when the email clients first connect, but they should be able to save it for further use. It is not really secure, since anyone can execute a man-in-the-middle attack if you don’t save the certificate.
The next level is using a server certificate signed by a Certificate Authority (CA), either a commercial one, or perhaps the company internal CA. This way, the server certificate will be trusted, and if you now receive a warning, there is potentially something bad going on.
Last but definitely not least is using client certificates for logging in to the server, and using a server certificate to authenticate the server to the clients. This is quite secure, but it is not supported in all mail clients. Thunderbird among others do have support for it.
Self-signed server certificate
First create the directories to store the appropriate fule, create the private key, and lastly create the certificate.
mkdir -p /etc/ssl/myhostname/mailserver/cd /etc/ssl/myhostname/mailserver/openssl genrsa 1024 > mail-key.pemchmod 400 mail-key.pemopenssl req -new -x509 -nodes -sha1 -days 365 -key mail-key.pem > mail-cert.pem
You can also increase the -days 365 to how ever long you wish the certificate to be valid for.
Dovecot SSL configuration
When you have the certificate ready, it needs to be enabled in both Dovecot and Postfix. You will need to uncomment the following directives in dovecot.conf
protocolsssl_listen =ssl_cert_file = /etc/ssl/myhostname/mailserver/ mail-cert.pemssl_key_file = /etc/ssl/myhostname/mailserver/ mail-key.pemssl_parameters_regenerate = 168verbose_ssl = no
Dovecot should now be accepting SSL-connections on port 993. Check the log-file for an entry like this when you login using IMAP.
dovecot: imap-login: Login: user=, method=PLAIN, rip=127.0.1.1, lip=127.0.1.1, TLS
The keyword is TLS to the right, which shows that you are using a TLS encrypted session.
Postfix TLS configuration
You will need to add a few lines to your main.cf configuration file to enable TLS.
smtpd_tls_cert_file = /etc/ssl/myhost/mailserver/mail-cert.pemsmtpd_tls_key_file = /etc/ssl/myhost/mailserver/mail-key.pemsmtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_session_cachesmtp_tls_session_cache_database = btree:/var/spool/postfix/smtp_scachesmtpd_tls_security_level = maysmtpd_tls_received_header = nosmtpd_tls_loglevel = 0tls_random_source = dev:/dev/urandomsmtpd_use_tls=yes
Now you should be able to authenticate with Postfix using STARTTLS and send mail anywhere.
CA-signed certificate
Using a real CA-signed certificate is no different from using a self-signed one. It’s just another step in the key-pair creation. If your company has its own CA, then they should issue a certificate for the mail server. A Google search for be your own ca will give you enough answers to create one yourself, if you have the need.
CA-signed client and server certificates
If you want to use CA-signed client certificates, you will need to take further steps, both in Postfix and in Dovecot to make this work. If you want the user names to be taken from the certificate itself, you currently must set the common name to the user name, for example joch@mycompany.com, which has been used in this document.
In Postfix, you can either use a directory of CA certificates, or a composite file with all the certificates concatenated together.
smtpd_tls_CAfile = /etc/ssl/mycompany/ca/all.pem#smtpd_tls_CApath = /etc/ssl/mycompany/ca/
ssl_ca_file = /etc/ssl/mycompany/ca/all.pemssl_verify_client_cert = yesssl_require_client_cert = yesssl_username_from_cert = yes
You will also need to change the password_query to the commented one in /etc/dovecot/dovecot-sql.conf
If you are running Dovecot release candidate 28 or older, the server will not send out the list of accepted CA names, which could make clients with multiple client certificates unable to connect. Please upgrade or install this patch. http://johnny.chadda.se/2007/04/03/get-client-certificates-working-corre...
If you have several CAs and CRLs, it could be difficult to concatenate them each time, so I have created a small script which will do that for you. Just stick it in your /etc/ssl/mycompany/ca/ directory and run it. It will create an all.pem with all certificates and all CRLs.
make.sh:
#!/bin/bashrm all.pem 2> /dev/nullcat *.pem *.crl > all.pem
Like I said before, there are some settings in Postfix that need to be changed as well, so open up main.cf and note the following.
smtp_tls_CAfile = /etc/ssl/mycompany/ca/all.pemsmtpd_tls_ask_ccert = yessmtpd_tls_req_ccert = nosmtpd_recipient_restrictions =permit_mynetworkspermit_tls_all_clientcertsreject_unauth_destinationpermit
Anti-spam measures
Spam has become the biggest headache for mailserver admins and requires constant vigilance. There are many measures you can put into place to make life a little easier. Below are some of the options I use which you may find helpful.
Postgrey
Greylisting is a new method of blocking significant amounts of spam at the mailserver level. Greylisting relies on the fact that most spam sources do not behave in the same way as "normal" mail systems. Although it is currently very effective by itself, it will perform best when it is used in conjunction with other forms of spam prevention.
First of all, let’s get Postgrey installed and as always, that is very easy in Debian and Ubuntu.
sudo apt-get install postgrey
Postgrey will be injected before Postfix handles over the delivery to Dovecot, so we need to add it in the very end of “smtpd_recipient_restrictions” in main.cf, just before the final “permit” rule.
check_policy_service inet:127.0.0.1:60000
Open up /etc/default/postgrey in your favourit editor and change the options line to the following. Yes, there should be two dashes, – -, but WordPress makes them to one long.
POSTGREY_OPTS=”--inet=127.0.0.1:60000 –delay=55”
Then restart postgrey and incoming mail will be delayed 55 seconds, and you will hopefully get a lot less spam!
sudo invoke-rc.d postgrey restart
Postfix RBL and other rules
There are other rules you can add to Postfix which will reduce spam. Incorporate the following into your main.cf configuration.
smtpd_recipient_restrictions =permit_mynetworkspermit_sasl_authenticatedreject_non_fqdn_hostnamereject_non_fqdn_senderreject_non_fqdn_recipientreject_unauth_destinationreject_unauth_pipeliningreject_invalid_hostname#reject_unknown_sender_domain#reject_unknown_hostnamereject_rbl_client sbl-xbl.spamhaus.org,reject_rbl_client dnsbl.ahbl.org,reject_rbl_client cbl.abuseat.org,reject_rbl_client zen.spamhaus.org,reject_rbl_client bl.spamcop.net,reject_rbl_client cbl.abuseat.org,reject_rbl_client dnsbl.njabl.org,reject_rbl_client dnsbl.sorbs.net,reject_rhsbl_sender dsn.rfc-ignorant.org,check_policy_service inet:127.0.0.1:60000permitsmtpd_data_restrictions =reject_unauth_pipelining,reject_multi_recipient_bounce,permit
Note that I have commented out “reject_unknown_hostname”, because there are some legit mail servers out there that send the wrong host name. That rule does however catch lots of spam, so it’s a call you will have to make.
You now have a reasonable protection against spam.
Amavis-new + Spamassassin + Clamav.
Amavis-new is a made of several pieces of software that will do virus scanning and spam detection of your email. These programs integrate easily into postfix and certainly I have found them very valuable ove the years in help the fight against spam and viruses.
To begin, install the following packages:
sudo apt-get install amavisd-new spamassassin clamav-daemon
Install the optional packages for better spam detection (who does not want better spam detection?):
sudo apt-get install libnet-dns-perl libmail-spf-query-perl pyzor razor
Install some compress/uncompress utils. Install the following packages:
sudo apt-get install arj bzip2 cabextract cpio file gzip lha nomarch pax rar unrar unzip zoo zip zoo
Clamav
The default behaviour of Clamav will fit our needs. A daemon is launched (clamd) and signatures are fetched every day. For more Clamav configuration options, check the configuration files in /etc/clamav.
Add clamav user to the amavis group and vice versa in order for Clamav to have access to scan files:
sudo adduser clamav amavissudo adduser amavis clamav
Spamassassin
Spamasssassin autodetects optional components and will use them if they are present. This means that there is no need to configure dcc-client, pyzor and razor.
Edit /etc/default/spamassassin to activate the Spamassassin daemon change ENABLED=0 to:
ENABLED=1
Now start Spamassassin:
sudo /etc/init.d/spamassassin start
Amavis
First, activate spam and antivirus detection in Amavis by editing /etc/amavis/conf.d/15-content_filter_mode:
use strict;# You can modify this file to re-enable SPAM checking through spamassassin# and to re-enable antivirus checking.## Default antivirus checking mode# Uncomment the two lines below to enable it#@bypass_virus_checks_maps = (\%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);## Default SPAM checking mode# Uncomment the two lines below to enable it#@bypass_spam_checks_maps = (\%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);1; # insure a defined return
Bouncing spam can be a bad idea as the return address is often faked, so it may have your server put on a blacklist. Consider editing /etc/amavis/conf.d/20-debian_defaults to set $final_spam_destiny to D_DISCARD rather than D_BOUNCE, as follows:
$final_spam_destiny = D_DISCARD;
After configuration Amavis needs to be restarted:
sudo /etc/init.d/amavis restart
Postfix integration
For postfix integration, you need to add the content_filter configuration variable to the Postfix configuration file /etc/postfix/main.cf. This instructs postfix to pass messages to amavis at a given IP address and port:
content_filter = smtp-amavis:[127.0.0.1]:10024
The following postconf command, run as root because of the preceding sudo command, adds the content_filter specification line above to main.cf:
Next edit /etc/postfix/master.cf and add the following to the end of the file:
smtp-amavis unix - - - - 2 smtp-o smtp_data_done_timeout=1200-o smtp_send_xforward_command=yes-o disable_dns_lookups=yes-o max_use=20
127.0.0.1:10025 inet n - - - - smtpd-o content_filter=-o local_recipient_maps=-o relay_recipient_maps=-o smtpd_restriction_classes=-o smtpd_delay_reject=no-o smtpd_client_restrictions=permit_mynetworks,reject-o smtpd_helo_restrictions=-o smtpd_sender_restrictions=-o smtpd_recipient_restrictions=permit_mynetworks,reject-o smtpd_data_restrictions=reject_unauth_pipelining-o smtpd_end_of_data_restrictions=-o mynetworks=127.0.0.0/8-o smtpd_error_sleep_time=0-o smtpd_soft_error_limit=1001-o smtpd_hard_error_limit=1000-o smtpd_client_connection_count_limit=0-o smtpd_client_connection_rate_limit=0-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
Also add the following two lines immediately below the "pickup" transport service:
-o content_filter=-o receive_override_options=no_header_body_checks
It should look like this:
pickup fifo n - - 60 1 pickup-o content_filter=-o receive_override_options=no_header_body_checks
This will prevent messages that are generated to report on spam from being classified as spam.
Reload postfix:
sudo /etc/init.d/postfix reload
Now content filtering with spam and virus detection is enabled.
Test
First, test that the amavis SMTP is listening:
telnet localhost 10024Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.220 [127.0.0.1] ESMTP amavisd-new service ready^]
Check on your /var/log/mail.log that everything goes well. If you raise the log level, you can check every step of the content filtering: spam check, virus check, etc. Don't forget to lower the log level after your checks!
On messages that go through the content filter you should see:
Troubleshooting
If the filtering is not happening, adding the following to /etc/amavis/conf.d/50-user may help:
@local_domains_acl = ( ".$mydomain" );
If you receive mail for other domains, add them to the list. This information was obtained from the Amavis-New FAQ here.
If you see the following error in /var/log/syslog when amavisd is trying to scan a message:
amavis[30807]: (30807-01) (!!) ask_av (ClamAV-clamd) FAILED - unexpected result: /var/lib/amavis/tmp/amavis-20070615T125025-30807/parts: lstat() failed. ERROR\n
Try changing the permissions on /var/lib/amavis/tmp:
chmod -R 775 /var/lib/amavis/tmp
Another way to trouble shoot errors associated with Amavisd-new, Spamassassin, Postfix, or Clamav is to restart all the services with Amavisd-new being the last one to start:
sudo /etc/init.d/postfix restartsudo /etc/init.d/spamassassin restartsudo /etc/init.d/clamav-daemon restartsudo /etc/init.d/amavis restart
Then check /var/log/mail.log and see if the error has gone away.
Amavis Performance
To increase the number of processes that amavisd-new uses above the default 2 edit the file /etc/amavis/conf.d/50-user inserting the line:
$max_servers = X;
above the line:
#------------ Do not modify anything below this line -------------
where X is the number of processes you wish amavis to use.
Amend the following line in /etc/postfix/master.cf with the same value for the max_procs (marked below as X)
smtp-amavis unix - - - - X smtp
Restart amavis and reload postfix's config
sudo /etc/init.d/amavis restart
sudo postfix reload
You can check the configuration change has taken affect by running amavisd-nanny:
sudo amavisd-nanny
For guidance on how many processes to set this value to please see:
zcat /usr/share/doc/amavisd-new/README.performance.gz | less
and http://www.ijs.si/software/amavisd/amavisd-new-magdeburg-20050519.pdf
Roundcube
Roundcube webmail is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an e-mail client, including MIME support, address book, folder manipulation, message searching and spell checking. More details canbe found at http://roundcube.net/
Ubuntu Licid has it in the repository so it is easy to install. Because we already have a mysql database we will install the mysql version:
sudo apt-get install roundcube-mysql roundcube
Simply answer the questions as you can see in the screenshots below.


Select the mysql database.

Enter the administrator password below:

Chose a password for the application and enter it below:

Now you need to restart the webserver:
sudo /etc/init.d/apache2 restart
You should be able to login to your roundcube:
Acknowledgments:
In compiling this information I have referenced the following sites:
Johnny Chadda: http://knol.google.com/k/how-to-set-up-an-email-server-using-linux-and-postfix#
Ubunty Wiki: https://help.ubuntu.com/community/PostfixAmavisNew
Comments
wew, thanks!!
nice share. But how to set amavis just tag the message, not blocked. Because I need report on mailgraph that indicate the message spam exist. I'm follow this tutorial and get the log like this when the email spam detected.
Mar 22 04:58:13 mail amavis[2637]: (02637-01) Blocked SPAM, LOCAL [192.168.30.2] [192.168.30.2] <venol@venom.com> -> <guest-indra@indra.com>, quarantine: i/spam-i00k++Ps0IvO.gz, Message-ID: <20110404111215.GA27127@mail.venom.com>, mail_id: i00k++Ps0IvO, Hits: 1002.028, size: 1484, 1308 ms
so, the graph on mailgraph nothing counting about spam message.
thanks..
n_n