Re: Routing solution on mail servers with all domain pointing at the same externel IP

Stephen Liu <[email protected]>
Newsgroups gmane.mail.perdition.user
Message-ID <[email protected]>
Hi Jimmy,


I'm now starting test2 putting test1 aside for the time being unsolved.


Xen box
Host OS - Debian Etch

Guests (only 3 guests.  More guests will be created later)
xen12 - OS Debian Etch, routing mail server
xen08 - OS Debian Etch, mail_server-1, domain - satimis.changeip.net
xen09 - OS Debian Etch, mail_server-2, domain - satimis.dnsalias.com
xen10 - OS Debian Etch, mail_server-3, domain - satimis.com


The complete system is working nicely on Intranet.  Incoming mails are
routed/delivered to respective mail server according to domain.  Users
can send/receive mails on their mail client, Evolution


Receiving mails - IMAP
Sending mails - SMTP


Users' password are retained on the mail servers NOT on MySQL database.


There are only 2 tables on MySQL database (maildb) - domains and
transport


perdition and perdition-mysql have been installed on repo


xen12:~# apt-cache policy perdition
perdition:
  Installed: 1.17-7etch1
  Candidate: 1.17-7etch1
  Version table:
 *** 1.17-7etch1 0
        500 http://ftp.au.debian.org etch/main Packages
        500 http://security.debian.org stable/updates/main Packages
        100 /var/lib/dpkg/status

xen12:~# apt-cache policy perdition-mysql
perdition-mysql:
  Installed: 1.17-7etch1
  Candidate: 1.17-7etch1
  Version table:
 *** 1.17-7etch1 0
        500 http://ftp.au.debian.org etch/main Packages
        500 http://security.debian.org stable/updates/main Packages
        100 /var/lib/dpkg/status



--- Jimmy Brake <[email protected]> wrote:

---------------------------------
Wow kind of a busy thread so I am not sure if I fully understand it
..however .. the setup looks similar to mine. Where I have
differentclients in the same or different domains that need to be
routed to theproper server.

I remember it was not easy to setup.


M /usr/lib/libperditiondb_mysql.so.0
msomeIP:3306:dbPerdition:tblPerdition:dbUser:dbPass:servername:concat(user,\'@\',domain):port
server_resp_line

Those are pretty much the only three lines in my config file
forperdition.
--- /Jimmy Brake ---


xen12:~# ls -l /usr/lib/libperditiondb_mysql.so.0
lrwxrwxrwx 1 root root 29 2008-12-05 15:06
/usr/lib/libperditiondb_mysql.so.0 -> libperditiondb_mysql.so.0.0.0


On which perdition config file shall I put the above 3 lines?

I suppose "msomeIP" is the external IP connected to the Xen box?  What
is 'm' at the beginning of the 2nd line for?


--- Jimmy Brake ---
You could change these to suite your
needs:"someIP:3306:dbPerdition:tblPerdition:dbUser:dbPass"
You should probably not change
these:"servername:concat(user,\'@\',domain):port"
--- /Jimmy Brake ---

What are dbUser and dbPass ?


--- Jimmy Brake ---
my mysql table looks like this

mysql> describe perdition;
+------------+--------------+------+-----+---------+-------+
| Field      | Type         | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| user       | varchar(128) | NO   | MUL | NULL    |       |
| domain     | varchar(255) | NO   | MUL | NULL    |       |
| servername | varchar(255) | NO   | MUL | NULL    |       |
| port       | varchar(8)   | NO   | MUL | NULL    |       |
+------------+--------------+------+-----+---------+-------+
--- /Jimmy Brake ---


I shall run following commands to create above database


mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
         -> ON dbPerdition.* TO 'perdition' IDENTIFIED by 'perdition';


mysql> CREATE TABLE `tblPerdition` (
         `user` varchar(128), null '' default '',
         `servername` varchar(255) null '' default '',
         `port` varchar(8) NOT NULL,
         PRIMARY KEY (`user`) (`domain`) (`servername`) (`port`),
 ) ;


If I'm wrong please correct me.  Thanks



--- /Jimmy Brake ---

some rows of users 


mysql> select * from perdition limit 0,10;
+------------+----------------+------------------------+------+
| user       | domain         | servername             | port |
+------------+----------------+------------------------+------+
| donotreply | dwalliance.com | node8.youdomain.com |      |
| jimmy      | dwalliance.com | node8.youdomain.com |      |
| inda      | dwalliance.com | node8.youdomain.com |      |
| support    | dwalliance.com | node8.youdomain.com |      |
| costarica  | dwalliance.com | node8.youdomain.com |      |
| cathe  | dwalliance.com | node7.youdomain.com |      |
| node7      | dwalliance.com | node7.youdomain.com |      |
| node6      | dwalliance.com | node6.youdomain.com |      |
| donnie     | thebrakes.org  | node8.youdomain.com |      |
| ken    |   brake.org  | node8.youdomain.com |      |
+------------+----------------+------------------------+------+

--- /Jimmy Brake ---


It will be a sizable database if including all domains and users.  Is
it possible to create one domain one database?


--- Jimmy Brake ---
We left the port blank .. when we had the port set to a protocol
itwould only allow that protocol.  Leaving it blank and people can
usewhatever suits them best.

Before any of this will work ... make sure imap / pop work on the
mailhosts, make sure the mysql account works from the perdition server.


--- /Jimmy Brake ---

Noted with thanks


B.R.
Stephen L

Send instant messages to your online friends http://uk.messenger.yahoo.com 
______________________________________________
Perdition-users mailing list
[email protected]
http://lists.vergenet.net/listinfo/perdition-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.