Some Linux Tips




LINKS

Some Debian Tips
awardspace.com "free webhost"
drivehq.com "free storage"
spideroak.com "free storage"
dnsexit dynamic dns server
freedns.afraid dynamic dns server
dns.he.net dynamic dns server




index   Previous   Next


1) Setup the virtual per user mail boxes
2) Setup the virtual domains for virtual users mail boxes

1) Setup the virtual per user mail boxes:
Install the postfix and dovecot, desable the sendmail from the services.
We suppose has to domains example.net and example.com the example.com is the virtual domain, and two users sohail and salman these users must have linux system accounts , now open the /etc/postfix/main.cf and edit these lines for your mail server:

servername = example.net
myhostname = example.net
mydomain = example.net
myorigin = $myhostname
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
relay_domains = $mydestination

And add these line to the end of the /etc/postfix/main.cf for the virtual:

virtual_alias_maps = hash:/etc/postfix/virtual
masquerade_domains = example.com
masquerade_exceptions = root


Now create a file virtual in the /etc/postfix to manage the mail delivery to the user mail boxes:

postmaser@example.net   sohail
admin@example.net    sohail
sohail@example.net   sohail
sohail@example.com   sohail
salman@example.net   salman
salman@example.com   salman
*@example.net   sohail

The left are the email addresses and the right are system users for which the postfix delivering the mail, the last one is the catchmail the unknown users mail will go to this mail box.
Run the postmap in the /etc/postfix as:

postmap    virtual

This will create the virtual.db file.
Open the /etc/dovecot.conf and enable these:

protocols =  imap  imaps  pop3  pop3s

Start or restart the postfix and dovecot, use a webmail like squirrelmail to login to the accounts with the system user name and password.