Full Mail Server Solution w/ Virtual Domains & Users - Page 04 (Postfix on the MX Servers - Virtual Users)
B. Setting up Postfix for Virtual Users & DomainsEven though the mail exchangers won't be delivering mail to the virtual users and domains, they will be rejecting based on valid/invalid destinations. We therefore need the mx servers to be able to connect to the SQL server to verify destinaions. Go ahead and put the information into postconf: # postconf -e 'virtual_alias_domains =' There are several 'gotchas' here. This configuration will host the virtual user mailboxes in /vmail. Should you need to store your mailboxes in another location, change the virtual_mailbox_base line accordingly. The virtual_minimum_uid and virtual_uid_maps point to user id 150. This user id is for a specifically create "Virtual Mail" user. It uses the standard "mail" group, with the default (Debian) gid of 8. You can create the user and directory like this: # useradd -r -u 150 -g mail -d
/var/vmail -s /sbin/nologin -c "Virtual Mailbox" vmail Now we need to install the NFS client tools: # apt-get install nfs-common portmap The directory then needs to be mounted to the NFS share. To do a simple test, run the following: # mount files-1.internal.example.com:/vmail /vmail You should now have access to the /vmail share from files-1. Try writing a file (It shouldn't work!):
# cd /vmail NOTE: You should get a read-only error! Assuming everything is working, go ahead and unmount the NFS: # cd / And then make the mount permanent by putting the following into your /etc/fstab: [...] Go ahead and mount the file system one last time: # mount /vmail ... and you're good to go! C. Postfix MySQL ConfigurationPostfix was installed with MySQL support, but that doesn't mean it already knows how to use our database. It needs to be provided with various SQL-query information for each type of table in our database. This information is stored in the MySQL files defined in the main.cf file. Note that in the following files, the last line contains a single comment (Preceeded by #) with the full query. Recent versions of Postfix can use this instead of the other statements. If you're using a newer version, just comment out all of the other lines, and uncomment the query statement. /etc/postfix/mysql_virtual_alias_maps.cf user = vmail_user /etc/postfix/mysql_virtual_domains_maps.cf user = vmail_user /etc/postfix/mysql_virtual_mailbox_limit_maps.cf user = vmail_user /etc/postfix/mysql_virtual_mailbox_maps.cf user = vmail_user /etc/postfix/mysql_virtual_transports.cf user = vmail_user
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com




![Creative Commons Attribution License [Creative Commons Attribution License]](http://creativecommons.org/images/public/somerights20.gif)

print: 
Recent comments
21 hours 48 min ago
23 hours 17 min ago
1 day 2 hours ago
1 day 5 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 12 hours ago