Linux certification guide: Postfix configuration in RHEL5

Source: Internet
Author: User
Tags email account
1./etc/postfix/main. cf code metadata = noqueue_directory =/var/spool/postfixcommand_directory =/usr/sbindaemon_directory =/usr/libexec/postfixmail_owner = fixmyhostname = mail. unicoms

1./etc/postfix/main. cf code
Smtp_delay_reject = no
Queue_directory =/var/spool/postfix
Command_directory =/usr/sbin
Daemon_directory =/usr/libexec/postfix
Mail_owner = postfix
 
Myhostname = mail.unicomsys.cn
Mydomain = unicomsys.cn
Myorigin = $ mydomain
Inet_interfaces = 10.100.143.254
Mydestination = $ myhostname, localhost. $ mydomain, localhost, $ mydomain
 
Unknown_local_recipient_reject_code = 450
 
Alias_maps = hash:/etc/aliases
Alias_database = hash:/etc/aliases
 
Debug_peer_level = 2
Debugger_command =
PATH =/bin:/usr/local/bin:/usr/X11R6/bin
Xxgdb $ daemon_directory/$ process_name $ process_id & sleep 5
 
Sendmail_path =/usr/sbin/sendmail. postfix
Newaliases_path =/usr/bin/newaliases. postfix
Mailq_path =/usr/bin/mailq. postfix
Setgid_group = postdrop
 
Html_directory = no
 
Manpage_directory =/usr/share/man
Sample_directory =/usr/share/doc/postfixed-2.3.3/samples
Readme_directory =/usr/share/doc/postfix-2.3.3/README_FILES
 
 
Smtpd_sasl_auth_enable = yes
Smtpd_sasl_security_options = noanonymous
Broken_sasl_auth_clients = yes
Smtpd_client_restrictions = permit_sasl_authenticated
Smtpd_recipient_restrictions = permit_sasl_authenticated, reject

Always_bcc = backupmail@unicomsys.cn # backup mail
2. Description
Modify the configuration of/etc/postfix/main. cf:
Myhostname = mail.cngnu.org
Host Name (FQDN name) of the mail host running the postfix Service)
Mydomain = cngnu.org
Domain Name of the email host running the postfix Service
Myorigin = $ mydomain
Set the mail from address in the mail header of each mail sent by the current mail host
Inet interfaces = all
By default, the value of the inet interfaces parameter is set to localhost, which indicates that messages can only be sent on the local email host. If the email host has multiple network interfaces and you do not want to enable the Postfix service for all network interfaces, you can use the host name to specify the network interfaces to be opened. However, generally all network interfaces are open to receive emails from any network interface, which sets the inet interfaces parameter value to "all ".
Mydestination = $ mydomain, $ myhostname
The Postfix will receive the email only when the recipient address of the sent Email matches the value of this parameter. For example, here you set this parameter value to $ mydomain, $ myhosname, indicating whether the recipient address of a mail is a xxx@cngnu.org (where XXX represents the email account name of a user) or a xxx@mail.cngnu.org, postfix will receive these emails.
Mynetworks_style = host
Mynetworks = 127.0.0.0/8, 192.168.1.0/24
You can use the mynetworks parameter to set which network mails can be forwarded (Relay. You can set this parameter value to the IP address of a trusted host, or to a trusted IP subnet or multiple IP subnets. separated by commas ). Here, setting the mynetworks parameter value to 192.168.16.0/24 indicates that this mail host only forwards emails sent from clients in the subnet 192.168.16.0/24, and rejects emails forwarded to other subnets.
Relay_domains = gdvcp.net
The mynetworks parameter is set for the mail source IP address, while the relay_domains parameter is set for the mail source domain name or host name. For example, setting this parameter value to gdvcp.net indicates that any emails sent from the domain gdvcp.net are considered to be trusted, and Postfix will automatically forward these emails.
Virtual_alias_domains = dzxx.cn, panda.com
Specifies the name of the virtual alias domain.
Virtual_maps = hash:/etc/postfix/virtual #, mysql:/etc/postfix/virtual. mysql
The file path that contains the virtual alias domain definition.
Alias_maps = hash:/etc/aliases
Specify the file path with the user alias Definition
Alias_database = hash:/etc/aliases
Specifies the path of the database file in the alias table.
Home_mailbox = Maildir/
Mailbox_transport = cyrus
Fallback_transport = cyrus
Smtpd_sasl_auth_enable = yes
Specifies whether to enable SASL as the SMTP authentication method. This parameter is disabled by default, and must be enabled here. Therefore, set this parameter value to "yes ".
Smtpd_sasl_local_domain =''
If Cyrus-SASL V2.
 
 
Smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
The recipient address is used to filter emails sent from the client. There are usually the following restrictions.
Permit_mynetworks: indicates that emails can be forwarded as long as the recipient address is located in the network segment specified in the mynetworks parameter.
Permit_sasl_authenticated: allows forwarding of SASL-authenticated emails.
Reject_unauth_destination: indicates that emails containing untrusted target addresses are rejected.
Broken_sasl_auth_clients = yes
Indicates whether it is compatible with non-standard SMTP authentication. Some Microsoft SMTP clients (such as Outlook Express 4.x) use non-standard SMTP authentication protocols. You only need to set this parameter to "yes" to solve such incompatibility problems.
Smtpd_client_restrictions = permit_sasl_authenticated
Restrict clients that can initiate SMTP connections to postfix. If you want to disable unauthenticated clients from initiating SMTP connections to postfix, you can set this parameter value to permit_sasl_authenticated.
Smtpd_sasl_security_options = noanonymous
Used to restrict certain logon methods. If this parameter is set to noanonymous, anonymous logon is prohibited.

Related Article

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.