Postfix Configuration File Plesk Tutorial

Posted on
Postfix Configuration File Plesk Tutorial

Please follow the tutorial posted for you. It explains clearly how to use external mail servers. Unless you're looking for a set up similar to my setup, users connect to my Plesk mail server which then relays through an external mail server. If this is the case you need to manually add that capability in the postfix config file.

Postfix Basic Configuration. By default, Postfix configuration files are in /etc/postfix. The two most important files are main.cf and master.cf.

There's many guides for this available, use your Google-Fu! Caution: Manually editing the Postfix config file has potential to seriously break things, if you're not sure what you're doing you should leave it alone and have a qualified sys-admin carry out the work.

Before we proceed to our part of the configuration we must disable a feature that was set when Tuomos Postfix RPM was installed. Remember it comes built with support for the Cyrus-IMAP Server?

We're not going to use the Cyrus-IMAP Server in this HOWTO. So let's disable this setting, as we don't want it to interfere with our setup at the moment. Postfix main configuration is done in the /etc/postfix/main.cf. Use your favorite editor to edit the file. We are going to use vi throughout this HOWTO. [root@example.com]# vi /etc/postfix/main.cf.

Search for alias_database = and you'll find #alias_database = dbm:/etc/aliases and three more lines that offer different values. We uncomment the third line and set the value to hash: /etc/postfix/aliases. Our alias_database parameter now reads as follows: alias_database = hash:/etc/postfix/aliases That's it for a start. We're still away from having a sophisticated SMTP server that saves us a lot of work and is a real pain to spammers, but we're very close to fire up Postfix and send our first message. Postfix doesn't want to bother us with information into detailed depth unless we ask it to. Since we are still setting Postfix up and testing functions we might run into problems while doing that. So we'll have Postfix being more detailed about what's going on when it gets its work done.

This will save us lot of time when we look for errors! In order to enable verbose logging we have to append a string that is passed to the smtpd when it is started.

This is done in /etc/postfix/master.cf. [root@example.com]# vi /etc/postfix/master.cf search for smtpd and append -v. Vistapro Renderer Download Lagu. When your done it should look like this: # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (50) # ========================================================================== smtp inet n - n - - smtpd -v That's it for our first basic setup. Postfix should now be configured to accept messages from the local machine and from any machine who's IP matches the IP Range you specified when you answered Q3. Now it's time to start Postfix for the first time: [root@example.com]# /etc/init.d/postfix start You can tell it's up from the feedback the init script provides; but will the Postfix-Server die after a few seconds because something is wrong? Let's check the process list and pipe it's output to grep which will grab for the string postfix in the output.

[root@example.com]# ps axf grep postfix 7547? S 0:00 /usr/libexec/postfix/master Still there. OK, time to send our first mail. If it's gone check /var/log/maillog for error messages.

Did Postfix deliver our mail? We'll check by simply letting less open the file in /var/spool/mail for the user test. [root@example.com]# less /var/spool/mail/test From root@mail.example.com Fri Mar 15 21: Return-Path: Delivered-To: test@mail.example.com Received: by mail.example.com (Postfix, from userid 0) id 029E640789; Fri, 15 Mar 2002 21:09:53 +0100 (CET) To: test@mail.example.com Subject: Test from localhost Message-Id: Date: Fri, 15 Mar 2002 21:09:53 +0100 (CET) From: root@mail.example.com (root) Test #1 So it got delivered. Let's go on to send some mail from another host. Again we telnet 172.16.0.2 25.