Postfix Configuration File Plesk
Basic settings in the Postfix main.cf file • Last updated on: 2015-12-29 • Authored by: Rackspace Support After you have installed Postfix, you can work with settings in the main.cf file to further configure Postfix. Note: This article assumes that you are using a single domain for your email needs. Modular nature of Postfix One of the key aspects of Postfix is that it is designed to be a modular package. The base installation itself is fairly small, and the vast majority of the “usual” mail administration, such as anti-spam and anti-virus, is actually conducted by third-party packages like SpamAssassin.
In Plesk for Linux with the Postfix mail server. Plesk changes the mail server configuration so that the. Locate the file root.controls.lock in your Plesk.
You can begin to see the modular nature of Postfix when you look at the main.cf file. Many settings refer to other files on the server. This setup can seem slightly confusing at first, and your initial reaction might be to hard code the data rather than reference another file with a single word in it. However, we recommend retaining the modularity of Postfix and editing multiple files for what might seem like simple settings. Such modularity will be useful when you start adding multiple domains, users, and aliases to your setup.
The main.cf file To see the main.cf file, issue the following command: sudo nano /etc/postfix/main.cf The file consists of basically three sections. The first section includes several settings such as the smtpd_banner and biff parameters. The second section has settings for TLS parameters.
This article focuses on the last section, which looks as follows on the democloud server: myhostname = mail.democloud.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = mail.democloud.com, localhost.democloud.com,, localhost relayhost = mynetworks = 127.0.0. Download Project Blackout Offline Full Version. 0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all Note: Some of the settings already have the host name from the base Postfix installation. Although some of the settings might be self-explanatory, the following sections describe them so that you can get a better understanding of Postfix and what you can do with it. Myhostname The myhostname value was set during the Postfix installation when you entered the domain name that you want to use.
This name also matches the cloud server host name. Aliases Aliases provide a method for delivering mail to different users without having to set up dozens of different accounts. The default settings in the main.cf reference another file: alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases Open that file, as follows: sudo nano /etc/aliases The file shows a list of names followed by root. Mail delivered to the first name is actually delivered to the second name. You do not need to set up the postmaster, news, webmaster, abuse, and other users for Postfix because mail delivered to those names is sent to root. Using the same syntax, you can have all mail for root delivered to the admin user by adding the following line ( demo is the main admin user for the democloud server): root: demo As a result, the delivery destination would change as follows: • Mail sent to mailer-daemon is sent to postmaster.
• Mail to postmaster is sent to root. • Mail sent to root is sent to the main admin user demo. Janome 6019 Service Manual. You can adjust the aliases as you see fit, but instead of changing all the root users in the file, it is easier to add the one line as shown. Adding that line also makes future migration and administration easier.
After you change the aliases file, you must refresh the aliases database for any changes to occur. Use the following command: sudo newaliases myorigin Internal emails from packages such as cron jobs do not supply full mail credentials; they use the myorigin setting instead. As such, you need to set this parameter to the main host name of the server. By default, the setting refers to the /etc/mailname file. To look at the contents, run the following command: cat /etc/mailname Example output for the democloud server is as follows: mail.democloud.com However, you can also set myorigin by using $mydomain in the main.cf file, as follows: myorigin = $mydomain Although you haven’t specifically set the $mydomain variable, Postfix gets the information from the myhostname setting, parsing the host name to gain the main domain name. Setting the myorigin parameter this way allows for easier administration at a later date because only one setting ( myhostname) needs to change. All the other parameters take the change from that.
Mydestination Although you have not yet set the server to receive mail, the mydestination parameter defines the domains from which the server will accept mail. The default looks as follows: mydestination = mail.democloud.com, localhost.democloud.com,, localhost The default is adequate when you are setting up mail for a single domain. However, like with the myorigin setting, you can reduce future administration by using the $mydomain variable as follows: mydestination = $mydomain, localhost.$mydomain, localhost relayhosts For the setup in this series of articles, you do not need this setting. You can leave it blank. Mynetworks The mynetworks parameter defines the network to use.
The default value includes IPv6 settings, which you can remove. The remaining value looks as follows: mynetworks = 127.0.0.0/8 The rest You can use the default values for the remaining settings. They are relevant for more complex configurations.