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 : deepakshionline.com
Postfix Configuration
1. Edit main.cf
myhostname = mail.deepakshionline.local
mydomain = deepakshionline.local
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.0.0/24, 127.0.0.0/8
relay_domains = $mydestination
mydomain = deepakshionline.local
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.0.0/24, 127.0.0.0/8
relay_domains = $mydestination
#configuration for SMTP authentication
relayhost = [mail.deepakshionline.com]
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/
relayhost = [mail.deepakshionline.com]
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
mail.deepakshionline.com username@deepakshionline.com:password
3. then open terminal and type
postmap hash:/etc/postfix/sasl_passwd
4. Open /etc/postfix/canonical and enter
@deepakshionline.local @deepakshionline.com
Note:- It is required so that localuser mail id will change to .com for local user only
5. Open /etc/postfix/generic and enter
@deepakshionline.local @deepakshionline.com
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@deepakshionline.com manojsingh
production@deepakshionline.com production
Note: It is required so that if you enter manojsingh@deepakshionline.com 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 deepakshionline.com with protocol POP3, with options
localdomains deepakshionline.local
envelope "Envelope-to"
user "username@deepakshionline.com" there with password "password" is *
here
with options rewrite mimedecode fetchall
pass8bits
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
Good Job
ReplyDelete