Dealing with Identical Users in the system
Well you got the virtual domain working, but in a practical environment there are times when you have identical users. For example, you have two users named John Doe, one logs in as john and the other logs in as doe.
[root@server2 postfix]# vi virtual_maps
onetraining.net DOMAIN
velasco@onetraining.net velasco
john@onetraining.net john
Analyze this carefully! When you first created the users (John & Doe), by default they belong to the physical host netcontrol.org. But I will assume that john will receive email from the virtual domain “onetraining.net” and Doe will receive emails from netcontrol.org; therefore I will only include john in the virtual_maps file.
The real name may be the same: John Doe, but it has nothing to do with the account name. Note that they are a different physical identity
Forwarding Email
The interesting thing is that you can forward email to another account.
For example:
John can forward his emails to Doe; here is how to do it:
[root@server2 postfix]# vi virtual_maps
From | To
| onetraining.net | DOMAIN | |
| velasco@onetraining.net | velasco | |
| john@onetraining.net | john | doe@netcontrol.org |
Note. Each time you update the virtual_maps, remember to update the database; use postmap virtual_maps < virtual_maps and restart postfix.
Which Clients can relay mail
By default, postfix relays mail for authorized networks and authorized domains. If you are in a local area network, you need to enable the mynetworks directive.
In
# TRUST AND RELAY CONTROL
#mynetworks = 168.100.189.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
Insert your appropriate network in here. Make sure not to include relays to the public. If you are having difficulties getting out from your local area network to the outside world; check these settings. Most likely the problem is here.
Note: Perhaps you will see localhost in this trust and relay control section, if you can't sent emails comment the line and try again.
Here is a good command to find out about your network:
[root@server2 postfix]# postconf | grep mynetworks
Which Domains can relay mail
By default all domains listed in mydestination are trusted domains.
Well folks that's it…
|