|
General software and network General OS-independent software and network questions, X11, MTA, routing, etc. |
|
Thread Tools | Display Modes |
|
|
|||
Virtual domains on multiple mail servers running Exim4 as MTA
Hi folks,
Exim as MTA What I'm exploring is as follow; - building multiple mail servers on guests of a Xen box running Debian Etch (I can make it without problem) - all mail servers running Exim4 as MTA. Each guest being a mail server has its own servername and local IP. - the most important goal is how to run multiple domains on one external IP. Each incoming mail can be delivered to its own mail server. It is similar to virtual domain. I made it on one mail server before without problem running other MTA. But I have no idea how to build virtual domain on multiple mail servers. Could you please shed me some light? Pointer would be appreciated. Regarding DNS server, bind9, do I need building it on each mail server? Can I build only DNS on one mail server to be shared by others? TIA B.R. satimis |
|
|||
Quote:
Xen - virtualization package host - Debian Etch, basic workstation guest - Debian Etch MTA - Postfix virtual Database - MySQL I just finished setting up a mail server on the guest of a Xen box running Postfix virtual. The said server serves multiple domains but connected to ONE external IP. On each domain there are multiple users. The mail server is now working. Incoming mails are routed to respective domain directory by MySQL. Users can login the server with their own login and password to send/receive mails on their mail client, Evolution. Or they can send/read mails direct on Webmail, SquirrelMail. Now my further exploration is instead of making MySQL route all incoming mails to respective domain directories created for this purpose can MySQL route the mails to other mail servers also running as guest on the same Xen box? Each mail server has its own hostname (the domain) and local IP. The working mail server together with MySQL do the routing. Quote:
Thanks B.R. satimis |
|
|||
Quote:
Thanks for your advice. Still I can't resolve if I install BIND9 on a guest of Xen box, only a base OS, BIND9 and some other required packages. Do I need to forward any port to it? If the local IP of this guest is 192.168.0.201 then on other guests (mail server) I'll edit /etc/resolv.conf Code:
nameserver 192.168.0.201 Quote:
/etc/postfix/mysql_transport.cf Code:
user=mail password=apassword dbname=maildb table=backups select_field=transport where_field=domain hosts=127.0.0.1 additional_conditions = and enabled = 1 mysql> SHOW tables; Code:
+------------------+ | Tables_in_maildb | +------------------+ | aliases | | domains | | users | ... ... mysql> SELECT * from domains; Code:
+------+-----------------------+-----------+---------+ | pkid | domain | transport | enabled | +------+-----------------------+-----------+---------+ | 1 | localhost | virtual: | 1 | | 2 | localhost.localdomain | virtual: | 1 | | 3 | satimis.com | virtual: | 1 | | 4 | satimis.dnsalias.com | virtual: | 1 | | 5 | satimis.changeip.net | virtual: | 1 | ..... .... mysql> SELECT * from users; Code:
+------------------------------+---------------+------+------+-------------------------+-------------------+---------+-----------------+----------------+---------------+-------+------------+----------------+ | id | name | uid | gid | home | maildir | enabled | change_password | clear | crypt | quota | procmailrc | spamassassinrc | +------------------------------+---------------+------+------+-------------------------+-------------------+---------+-----------------+----------------+---------------+-------+------------+----------------+ | root@localhost | root | 5000 | 5000 | /var/spool/mail/virtual | root/ | 1 | 1 | passwd1 | sdtrusfX0Jj66 | | | | | satimis@satimis.com | Satimis | 5000 | 5000 | /var/spool/mail/virtual | Satimis/ | 1 | 1 | passwd2 | sdtrusfX0Jj66 | | | | | lms@satimis.com | lmsoomn | 5000 | 5000 | /var/spool/mail/virtual | LMS/ | 1 | 1 |passwd3 | sdtrusfX0Jj66 | | | | | albert@satimis.com | Albert Conong | 5000 | 5000 | /var/spool/mail/virtual | Albert/ | 1 | 1 | passwd4 | sdtrusfX0Jj66 | | | | | lms@satimis.dnsalias.com | lmsoomn | 5000 | 5000 | /var/spool/mail/virtual | dnsalias/LMS/ | 1 | 1 | passwd5 | sdtrusfX0Jj66 | | | | | satimis@satimis.dnsalias.com | Satimis | 5000 | 5000 | /var/spool/mail/virtual | dnsalias/Satimis/ | 1 | 1 | passwd6 | sdtrusfX0Jj66 | | | | | satimis@satimis.changeip.net | Satimis | 5000 | 5000 | /var/spool/mail/virtual | changeip/Satimis/ | 1 | 1 | passwd7 | sdtrusfX0Jj66 | | | | | lms@satimis.changeip.net | lmsoomn | 5000 | 5000 | /var/spool/mail/virtual | changeip/LMS/ | 1 | 1 | passwd8 | sdtrusfX0Jj66 | | | | ....... IF; 1) domain "satimis.dnsalias.com" is on MailServerB local IP=192.168.111.301 directory of user "satimis@satimis.dnsalias.com" = /home/Satimis directory fo user "lms@satimis.dnsalias.com" = /home/LMS etc. 2) domain "satimis.changeip.net" is on MailServerC local IP=192,168.111.302 directory of user "satimis@satimis.changeip.net" = /home/Satimis directory of user "lms@satimis.changeip.net" = /home LMS etc. 3) etc. Then how to edit those 2 MySQL files? Any further file needs to create? TIA I think I'll make MailServerA, the current running mail server, for routing ONLY. B.R. satimis |
|
||||
Quote:
If you only use it only locally* then I don't think any port forwarding is necessary. * locally - in host system or in any of the guest systems. Quote:
Quote:
Check mysql_table man page. New interface would be with the example above like this: Code:
hosts = 127.0.0.1 user = mail password = apassword dbname = maildb query = SELECT transport FROM backups WHERE domain='%s' AND enabled=1 Quote:
__________________
Fhtagn nagh Yog-Sothoth Last edited by deemon; 24th November 2008 at 04:29 PM. |
|
|||
Quote:
Quote:
Quote:
B.R. satimis |
|
||||
Quote:
I can't help you with linux packages though, I don't have much experience on that field. Quote:
Quote:
Code:
CREATE TABLE domains ( domain VARCHAR(255) NOT NULL AUTO_INCREMENT, transport VARCHAR(255) NOT NULL, PRIMARY KEY (domain) ); query for relay_domains map would be: SELECT 't' FROM domains WHERE domain='%s'; and for transport_maps: SELECT transport FROM domains WHERE domain='%s'; .. where transport is smtp:HOSTNAME. For example: domain: satimis.dnsalias.com, transport: smtp:MailServerB domain: satimis.changeip.net, transport: smtp:MailServerC
__________________
Fhtagn nagh Yog-Sothoth |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Best way to manage multiple freebsd servers? | WaBBiT | FreeBSD General | 1 | 4th April 2009 10:37 PM |
Problems with Postfix virtual domains | juris98 | General software and network | 2 | 11th February 2009 12:14 AM |
About Dedicated Servers | qmemo | Off-Topic | 7 | 4th September 2008 02:15 PM |
SquidGuard fails when building the Berkeley DB files for domains | costy | OpenBSD Packages and Ports | 1 | 31st July 2008 09:22 PM |
Serving 2 domains through firewall using a Jail? | krreagan | General software and network | 1 | 4th May 2008 09:38 PM |