Build anti-Virus anti-spam system (i)

Source: Internet
Author: User
The original qmail system mailbox a day at least more than 10 copies of garbage, virus mail, it is more annoying, not very like qmail, especially the log, let people unintelligible, so simply consider replacing the mail system.

System platform for Debian Woody 3.0

I. Installation of the mail system

1. Package Installation

Postfix+courier-imap+cyrus-sasl+pam_mysql+mysql This installation is simple and easy to install under Debian:

# apt-get Install Courier-pop postfix-mysql postfix-tls courier-authdaemon\
Courier-authmysql libpam-mysql libsasl7 Libsasl-modules-plain courier-imap

If your system does not have MySQL itself, add mysql-server to the list above. Apt in installs the process to have the simple prompt, requests fills in the system domain name and so on information.

2, the Postfix configuration

Modify MAIN.CF:

Add to:
Home_mailbox = maildir/

Tell postfix how to use Maildir

Mydestination = $myhostname, $transport _maps

Tell Postfix to send messages $myhostname (native) and $transport_maps (the domain name in the transport table).

Alias_maps = mysql:/etc/postfix/mysql-aliases.cf
Relocated_maps = mysql:/etc/postfix/mysql-relocated.cf
Transport_maps = mysql:/etc/postfix/mysql-transport.cf
Virtual_maps = mysql:/etc/postfix/mysql-virtual.cf

Tell Postfix where to look for these watches.

Local_recipient_maps = $alias _maps $virtual _mailbox_maps unix:passwd.byname

Postfix a few ways to pass to a local recipient.

Virtual_mailbox_base =/home/vmail
Virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
Virtual_uid_maps = mysql:/etc/postfix/mysql-virtual-uid.cf
Virtual_gid_maps = mysql:/etc/postfix/mysql-virtual-gid.cf

Information for the virtual user.

Broken_sasl_auth_clients = yes
Smtpd_sasl_auth_enable = yes
Smtpd_sasl_security_options = noanonymous

Enable SASL, you must verify to send a letter.

Smtpd_recipient_restrictions = Permit_mynetworks,permit_sasl_authenticated,reject_unknown_recipient_
Domain,reject_non_fqdn_recipient,check_relay_domains

Letter restrictions.

You can also add a few other parameters:

Disable_vrfy_command = yes

Turn off the Vrfy function.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.