Mail server configuration on linux

Software Requirement :
1. Fedora Core 13
2. Mail Server Postfix version 2.7.0
3. Fetchmail version 6.3.17
4. Dovecot Version 1.2.16

Mail server configuration:
Local domain : deepakshionline.local
Register domain :

Postfix Configuration
1. Edit
myhostname = mail.deepakshionline.local
mydomain = deepakshionline.local
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks =,
relay_domains = $mydestination
#configuration for SMTP authentication
relayhost = []
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
smtp_generic_maps = hash:/etc/postfix/generic
home_mailbox = Maildir/

2. create a file sasl_passwd and enter mail server address username and password then save

3. then open terminal and type

postmap hash:/etc/postfix/sasl_passwd
4. Open /etc/postfix/canonical and enter
Note:- It is required so that localuser mail id will change to .com for local user only
5. Open /etc/postfix/generic and enter

Note:- It is required so that localuser mail id will change to .com when mail is delivered to remote users.
6. Open /etc/postfix/virtual manojsingh production
Note: It is required so that if you enter instead of manojsingh@deepakshionline.local delivered to manojsingh locally.
7. Type following command to create hash file.
postmap hash:/etc/postfix/canonical
postmap hash:/etc/postfix/generic
postmap hash:/etc/postfix/virtual
8. Reload postfix using command
postfix reload
Fetchmail configuration 
1. Create a file .fetchmailrc and enter following command to fetch mail from ISP.
set no bouncemail
poll with protocol POP3, with options
localdomains deepakshionline.local
envelope "Envelope-to"
user "" there with password "password" is *
with options rewrite mimedecode fetchall
2. chmod 600 .fetchmailrc
3. Use command "fetchmail" to fetch mail from ISP

Create Users and Permission

1. create user manojsingh then type following command for permission
mkdir /home/manojsingh/Maildir
chown manojsingh:manojsingh /home/manojsingh/Maildir
chmod -R 700 /home/manojsingh/Maildir 
Enable SASLAuthentication
1. service saslauthd start

1 comment: