Postfix configuration installation in Linux

Source: Internet
Author: User
Tags mail dovecot

Postfix is the MTA (Mail transfer agent) software developed by Wietse Venema under the IBM GPL protocol. Postfix is an attempt by Wietse Venema to provide alternatives to the widest possible sendmail, let's look at the Postfix configuration installation method.

Install Postfix

The code is as follows

Yum install postfix System-switch-mail

Set Postfix

The code is as follows

Vi/etc/postfix/main.cf

Myhostname = ha.xxx.kh.edu.tw
Myorigin = $myhostname
myorigin= xxx.kh.edu.tw
Inet_interfaces = All
#inet_interfaces = Local
mydestination = $myhostname, localhost $mydomain, localhost
Mynetworks = 163.32.x.0/24, 127.0.0.0/8
Relay_domains = $mydestination

power-on Boot

The code is as follows

Vi/etc/rc.d/rc.local

/usr/sbin/postfix start

Installation and setting Dovecot (Centos6.4)

Installing software

The code is as follows

Yum-y Install Dovecot
Cp/etc/dovecot.conf/etc/dovecot.conf.bak
Vi/etc/dovecot.conf

protocols = POP3
Ssl_disable = yes

Modify Dovecot Receipt Preset location

The code is as follows

Vi/etc/dovecot/conf.d/10-mail.conf

Mail_location = mbox:~/mail:inbox=/var/mail/%u

Vi/etc/dovecot/conf.d/10-auth.conf

Disable_plaintext_auth = No
Auth_mechanisms = Plain Login

Reboot

The code is as follows
Service Dovecot Restart
Chkconfig Dovecot on

setting Postfix SMTP Authentication

The code is as follows

Vi/etc/postfix/main.cf

Smtpd_sasl_auth_enable = yes
Smtpd_sasl_security_options = noanonymous
Broken_sasl_auth_clients = yes
Smtpd_recipient_restrictions = Permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

Chkconfig SASLAUTHD on
Service SASLAUTHD Restart

Virus filtration Software AMAVISD + Clamav antivirus and spam

Install ClamAV amavisd-new Software

The code is as follows

Yum-y Install ClamAV amavisd-new

Service CLAMD Start

Chkconfig--level 3,5 Freshclam on

Service AMAVISD Start

Chkconfig--level 3,5 AMAVISD on

Specify Mail server network domain

The code is as follows

Vi/etc/amavisd/amavisd.conf

$mydomain = Www.111cn.net

First, define a virus filtering service in MASTER.CF

The code is as follows

Vi/etc/postfix/master.cf

Amavis Unix----2 Smtp-o smtp_data_done_timeout=1200

Add the following lines to the set

  code is as follows &nbs P;

127.0.0.1:10025    inet    N &N bsp;  -   -   -   -      smtpd
   -o content_filter=
   -o local_recipient_maps=
   -O relay_recipient_maps=
   -o smtpd_restriction_classes=
   -o smtpd_client_ restrictions=
   -o smtpd_helo_restrictions=
   -o smtpd_sender_restrictions =
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -O MYNETWORKS=127.0.0.0/8
   -o strict_rfc821_envelopes=yes
   -o smtpd_error_ Sleep_time=0
   -o smtpd_soft_error_limit=1001
   -o smtpd_hard_error_limit=1000

Content_filter parameter setting

Vi/etc/postfix/main.cf

Content_filter = amavis:[127.0.0.1]:10024

SMTP inet ....... The middle field does not need to be modified ... smtpd

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.