Selasa, 10 Juni 2014

With this approach, every hosted domain can have its own info etc. email address. However, it still uses Linux system accounts for local mailbox deliveries.
With virtual alias domains, each hosted address is aliased to a local UNIX system account or to a remote address. The example below shows how to use this mechanism for the fossedu.org and linuxelabs.com domains.
Inside the main.cf file, we tell it how to handle these virtual domains:
sudo postconf -e "virtual_alias_domains = fossedu.org linuxelabs.com"
sudo postconf -e "virtual_alias_maps = hash:/etc/postfix/virtual"
Edit the /etc/postfix/virtual file:
Add two Linux system accounts
sudo useradd -m -s /bin/bash sigiri
sudo useradd -m -s /bin/bash kala
Set passwords for the above users.
sudo passwd sigiri
sudo passwd kala
sudo vi /etc/postfix/virtual
Add the following code segment:
info@fossedu.org       sigiri
info@linuxelabs.com    kala
To create a Map Database type :
sudo postmap /etc/postfix/virtual
postmap is utility program that will convert /etc/postfix/virtual to /etc/postfix/virtual.db in Berkley DB format, so that Postfix can access the data faster.
Restart Postfix to make changes take effect:
sudo /etc/init.d/postfix restart

Send mails to both info@fossedu.org and info@linuxelabs.com and those mails should come to mailboxes of sigiri and kalarespectively.

0 komentar:

Posting Komentar