Configure main. cf with postfix

Source: Internet
Author: User
Tags dovecot ssl certificate
Article Title: Configure main. cf with postfix. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Main. cf

See/usr/share/postfix/main. cf. dist for a commented, more complete version

Debian specific: Specifying a file name will cause the first

Line of that file to be used as the name. The Debian default

Is/etc/mailname.

Used to limit the maximum length of a single email received by the system. Limit the size of the postfix queue file. The default value is #10240000 bytes.

Message _ size_limit = 1572864000

Restrict the header length. The default value is 102400 bytes.

Header_size_limit =

This is used to set the version information to be displayed when an SMTP connection comes.

Smtpd_banner = $ myhostname ESMTP $ mail_name (Debian/GNU)

Biff is a small program that can send a notification to a local user when receiving a new email. If your user does not log on to the mail # system, we recommend that you disable the biff notification, because this helps improve the efficiency of the mail system.

Biff = no

Appending. domain is the MUA's job.

Append_dot_mydomain = no

Uncomment the next line to generate "delayed mail" warnings

Delay_warning_time = 4 h

TLS parameters

Smtpd_tls_cert_file =/etc/ssl/certs/ssl-cert-snakeoil.pem # ssl Certificate location required by TLS

Smtpd_tls_key_file =/etc/ssl/private/ssl-cert-snakeoil.key # ssl private Key location required by TLS

Smtpd_use_tls = yes # use ssl to encrypt and authenticate SMTP sessions

Smtpd_tls_session_cache_database = btree: $ {queue_directory}/smtpd_scache

Smtp_tls_session_cache_database = btree: $ {queue_directory}/smtp_scache

Sasl parameters

Smtpd_sasl_type = dovecot # Use dovecot for verification

Smtpd_sasl_auth_enable = yes # enable sasl authentication

Smtpd_sasl_path = private/auth #

This parameter limits who can use your email server to relay and forward emails.

Smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

See/usr/share/doc/postfix/TLS_README.gz in the postfix-doc package

Information on enabling SSL in the smtp client.

Set your host name, and this setting value is referenced by many other parameters.

Myhostname = localhost

The parameter determines which domain emails can be delivered by the Postfix.

Relay_domains = $ mydestination, 126.com

The mynetworks parameter specifies the network address of your network. The postfix system determines whether the user is remote or local based on the value. If the user is a local network, the user is allowed to access the network. You can use standard A, B, and C network addresses, or CIDR (classless Inter-Domain Routing) addresses, if you have not set mynetworks, you must set mynetworks_style to host! Otherwise, the IP address of the subdomain where your IP address is located will be automatically considered as 'legitimate '!)

Mynetworks = 127.0.0.0/8, 192.168.1.0/24

Used to specify the file path with the user alias Definition

Alias_maps = hash:/etc/aliases

Used to specify the path of an alias table database file

Alias_database = hash:/etc/aliases

This item is used to set the Mail from address above the Mail header, that is, the outgoing Mail from the MTA will be subject to this setting value.

Myorigin =/etc/mailname

Mailbox_command = procmail-a "$ EXTENSION"

Default_transport = smtp

The specified postfix uses the Maildir method similar to Qmail for mail delivery. In this method, each mail is an independent file, which is easier to manage, in addition, IMAP accesses the mailbox in Maildir of the user directory by default. When selecting the Maildir method, the mailbox_command option should be left empty.

Home_mailbox = Maildir/

Set the "host name that can receive emails". Your postfix is only written to the project mydestination.

When the host name is used as the receiving host, the mail will be received!

Mydestination = debian. domain, localhost, localhost. localdomain, localhost

To determine whether your email is directly transmitted to the internet or through other hosts.

Relayhost =

Mailbox_size_limit = 0

Extended user name

Recipient_delimiter = +

Network Interface for Postfix Mail System Monitoring

Inet_interfaces = all

"Virtual_gid_maps" and "virtual_uid_maps" are postfix users' gid and uid

Virtual_uid_maps = static: 5566

Virtual_gid_maps = static: 5566

Virtual_mailbox_maps Parameter definition virtual mailbox query table location

Virtual_mailbox_maps = mysql:/home/postfix/-mailbox-maps.cf

This parameter is used by the virtual shipping agent. It indicates a list of domain names. Only emails with these domain names can be processed by the postfix virtual shipping agent. It also represents a long string of domain names in place of the $ mydestination parameter.

Virtual_mailbox_domains = mysql:/home/postfix/-mailbox-domains.cf

The virtual_alias_maps parameter points to a virtual alias table.

Virtual_alias_maps = mysql:/home/postfix/-alias-maps.cf

Virtual_alias_maps = mysql:/home/postfix/-alias-maps.cf, mysql:/home/postfix/-email2email. cf

Emails sent via postfix

Sender_bcc_maps = mysql:/home/postfix/-mail-watch.cf

Emails received through postfix

Recipient_bcc_maps = mysql:/home/postfix/-mail-watch.cf

Specify the dovecot shipping agent to be responsible for shipping

Virtual_transport = dovecot

Dovecot_destination_recipient_limit = 1

Content_filter = smtp-amavis: [127.0.0.1]: 10024

Receive_override_options = no_address_mappings

Multiple backup email relay can be used at the same time

Smtp_fallback_relay =

The transport_maps parameter can point to one or more transmission tables.

Transport_maps = hash:/home/postfix/transport

-----------------------------------------------------

The main configuration file of Postfix. Most of the instructions are deleted,

And try to set and explain in sequence according to the most common mail host settings,

Many uncommon settings are not listed.

0. The main setting parameters of several Postfix values do not need to be changed in general.

Queue_directory =/var/spool/postfix

Command_directory =/usr/sbin

Daemon_directory =/usr/libexec/postfix

Mail_owner = postfix

[1] [2] [3] Next page

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.