Feb 15, 2009

Basic Postfix Configuration

Below I have mentioned the basic configuration of Postfix mail server. This could be useful for SOHO networks & for advanced configuration, postfix documentation at http://www.postfix.org

[root@mail ~]# yum install postfix -y

Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
base
100% |=========================| 1.1 kB 00:00
updates
100% |=========================|
951 B 00:00
addons
100% |=========================|
951 B 00:00
extras
100% |=========================| 1.1 kB 00:00
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
--> Downloading header for postfix to pack into transaction set.
postfix-2.3.3-2.i386.rpm 100% |========================| 41 kB 00:00
--> Package postfix.i386 2:2.3.3-2 set to be updated
--> Running transaction check
Dependencies Resolved
===========================================================
Package Arch Version Repository Size
===========================================================
Installing: i386 2:2.3.3-2 base 3.6 M
Postfix

Transaction Summary
===========================================================
Install 1 Package(s)
Update 0 Package(s)
0 Package(s)
Total download size: 3.6 M
Downloading Packages:
(1/1): postfix-2.3.3-2.i3 100% |====================| 3.6 M 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: postfix #################################### [1/1] Installed: postfix.i386 2:2.3.3-2
Complete!

Open /etc/postfix/main.cf with a text editor of choice (vi in my case) & edit the following parameters.

[root@mail ~]# vi /etc/postfix/main.cf

myhostname = host.domain.tld

mydomain = domain.tld

myorigin = $mydomain

inet_interfaces = all

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

mynetworks = 127.0.0.0/8, 192.168.0.0/24

[root@mail ~]# alternatives --config mta

There are 2 programs which provide 'mta'.

Selection Command
-----------------------------------------------
*+ 1 /usr/sbin/sendmail.sendmail
2 /usr/sbin/sendmail.postfix


Enter to keep the current selection[+], or type selection number: 2

No comments:

Post a Comment