Stephen Liu | 1 Dec 2008 02:38
Picon
Favicon

About virtual domain routing

Hi folks,

Can dbmail help me.?

I'm searching around for a solution to solve my problem as mentioned
hereinbelow;

I have a Xen box (a virtualizaion box) with following setup:-

MTA - Postfix 2.3.8
Database - MySQL 5.0.32
Couier IMAP 4.1.1
etc.

Host - Debian Etch Workstation
Guest01 - mail server for routing running postfix virtual
Guest02 - mail server, hostname01. localIP_01, domain01
Guest03 - mail server, hostname02, localIP_02, domain02
Guest04 - mail server, hostname03, localIP_03, domain03
etc.

all mail servers running postfix on Debian Etch.

single (one) external IP with all ports forwarded to Guest01 except 
port 53 which is forwarded to the DNS server, also running on a guest
of the Xen box.

Guest01 routes all incoming mails according to their domains to 
respective mail servers.  All outgoing mails are sent via the routing
mail server, Guest01, to Internet.
(Continue reading)

Jonathan Feally | 1 Dec 2008 04:01

Re: About virtual domain routing

DBMail currently runs on only one database. Thus all email for your 3 
domains would be in one database on one server. The number of front-end 
servers (dbmail-imapd) can be as many as you like - all accessing the 
MySQL/PostGres db over the network. Now you could run 3 databases, 3 
front-ends, each separated out to handle each domain, but you will only 
be replacing your current IMAP with dbmail.

This leaves you with 2 options besides the all on one server.

Option 1
Put each domain on a different port number and map those port numbers to 
each of the boxes on your firewall. Clients would then need to be 
configured to use a hostname and port number, where the hostname on the 
inside looks up to the IP of the server they need, and the hostname on 
the outside looks up to your public IP (thus all outside hostnames would 
have the same IP).

Option 2
Run an imap proxy server that can understand from a small database or by 
domain name which users are on what imap servers. 
http://www.imapproxy.org or http://www.vergenet.net/linux/perdition/ 
would be a good place to start. This will let you use your current IMAP 
servers as if they were all one from the outside.  You could also move 
to dbmail as one instance per domain, but the imap proxy part is really 
what you need to run multiple backends merged as one front-end.

-Jon

Stephen Liu wrote:
> Hi folks,
(Continue reading)

Stephen Liu | 1 Dec 2008 05:14
Picon
Favicon

Re: About virtual domain routing

Hi Jon,

Thanks for your advice.

--- Jonathan Feally <vulture <at> netvulture.com> wrote:

> DBMail currently runs on only one database. Thus all email for your 3
> 
> domains would be in one database on one server. The number of
> front-end 
> servers (dbmail-imapd) can be as many as you like - all accessing the
> 
> MySQL/PostGres db over the network. 

There is only ONE database here running on Guest01, the routing mail
server.  In fact this is a full function mail server running postfix
virtual.  All domains are on /etc/postfix/mysql_domains.cf

mysql> SHOW tables;
+------------------+
| Tables_in_maildb |
+------------------+
| aliases          |
| domains          |
| users            |
+------------------+
4 rows in set (0.00 sec)

mysql> SELECT * from domains
    -> ;
(Continue reading)

Paul J Stevens | 1 Dec 2008 08:57
Picon
Favicon
Gravatar

Re: About virtual domain routing

Stephen Liu wrote:
> Hi Jon,
> 
> 
> Thanks for your advice.
> 

[cut example of how to spread storage over separate xen hosts]

> Now my problem is how can remote mail clients send/receive mails from
> their servers on the Xen box.  For sending mail maybe they can use the
> routing mail server, Guest01.  About how about receiving mail?  There
> is only ONE external IP connected to the Xen box.

Jon's answer was on the mark. Use perdition. It will do exactly what you
need. Clients will all talk IMAP/POP3 to the same external IP, and
perdition will proxy their requests to the correct backend server - the
xen hosts.

Perdition can proxy users to different backends based on all kinds of
criteria, supports ldap and sql backends, etc.

--

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
Stephen Liu | 1 Dec 2008 13:13
Picon
Favicon

Re: About virtual domain routing


--- Paul J Stevens <paul <at> nfg.nl> wrote:

> Stephen Liu wrote:
> > Hi Jon,
> > 
> > 
> > Thanks for your advice.
> > 
> 
> [cut example of how to spread storage over separate xen hosts]
> 
> 
> > Now my problem is how can remote mail clients send/receive mails
> from
> > their servers on the Xen box.  For sending mail maybe they can use
> the
> > routing mail server, Guest01.  About how about receiving mail? 
> There
> > is only ONE external IP connected to the Xen box.
> 
> Jon's answer was on the mark. Use perdition. It will do exactly what
> you
> need. Clients will all talk IMAP/POP3 to the same external IP, and
> perdition will proxy their requests to the correct backend server -
> the
> xen hosts.
> 
> Perdition can proxy users to different backends based on all kinds of
> criteria, supports ldap and sql backends, etc.
(Continue reading)

Michał Bagrowski | 2 Dec 2008 10:21

dupicate mail, too many checks. Possible loop detected.

Hello

We have strange problem

dbmail + postfix + ldap

http://www.wklej.org/id/23852/ - dbmail log

http://wklej.org/id/23853/txt - ldap log

dbmail is in some loop,

when i send 1 message, in db it create 20 ;/ i do know why ...


--
Pozdrawiam Serdecznie
Michał Bagrowski

_______________________________________________
DBmail mailing list
DBmail <at> dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail
Paul J Stevens | 2 Dec 2008 10:46
Picon
Favicon
Gravatar

Re: dupicate mail, too many checks. Possible loop detected.

Michał Bagrowski wrote:
> Hello
> 
> We have strange problem

Your ldap setup is strange.

from your logs:
 searching with query [(gleemmomailid=mmmmmm <at> gleemmo.com)], checks [0]
 checking user [99] in alias table
 searching with query [(gleemmomailid=99)], checks [1]
 adding [99] to userids

So it looks like you have something like

dn: id=99,dc=gleemmo,dc=unstable
gleemmomailid: mmmmmm <at> gleemmo.com
gleemmomailid: 99
id: 99

which is indeed asking for a loop. Simply remove the gleemmomailid: <id>
attribute. Or better yet: don't use a numerical cn_string.

If my reconstruction of your ldap setup is incorrect, please share a
typical ldap entry, and the ldap part from dbmail.conf.

> 
> dbmail + postfix + ldap
> 
> http://www.wklej.org/id/23852/ - dbmail log
> 
> http://wklej.org/id/23853/txt - ldap log
> 
> dbmail is in some loop,
> 
> when i send 1 message, in db it create 20 ;/ i do know why ...
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> DBmail mailing list
> DBmail <at> dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail

--

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
Michał Bagrowski | 2 Dec 2008 10:52

Re: dupicate mail, too many checks. Possible loop detected.

ldap part from dbmail:

http://www.wklej.org/id/23867/

and

ldap entry : http://wklej.org/id/23869/txt

On Tue, Dec 2, 2008 at 10:46 AM, Paul J Stevens <paul <at> nfg.nl> wrote:
Michał Bagrowski wrote:
> Hello
>
> We have strange problem

Your ldap setup is strange.

from your logs:
 searching with query [(gleemmomailid=mmmmmm <at> gleemmo.com)], checks [0]
 checking user [99] in alias table
 searching with query [(gleemmomailid=99)], checks [1]
 adding [99] to userids

So it looks like you have something like

dn: id=99,dc=gleemmo,dc=unstable
gleemmomailid: mmmmmm <at> gleemmo.com
gleemmomailid: 99
id: 99

which is indeed asking for a loop. Simply remove the gleemmomailid: <id>
attribute. Or better yet: don't use a numerical cn_string.

If my reconstruction of your ldap setup is incorrect, please share a
typical ldap entry, and the ldap part from dbmail.conf.



>
> dbmail + postfix + ldap
>
> http://www.wklej.org/id/23852/ - dbmail log
>
> http://wklej.org/id/23853/txt - ldap log
>
> dbmail is in some loop,
>
> when i send 1 message, in db it create 20 ;/ i do know why ...
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> DBmail mailing list
> DBmail <at> dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail


--
 ________________________________________________________________
 Paul Stevens                                      paul at nfg.nl
 NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
 The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail <at> dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail



--
Pozdrawiam Serdecznie
Michał Bagrowski
_______________________________________________
DBmail mailing list
DBmail <at> dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail
Paul J Stevens | 2 Dec 2008 13:16
Picon
Favicon
Gravatar

Re: dupicate mail, too many checks. Possible loop detected.

Michał Bagrowski wrote:
> ldap part from dbmail:
> 
> http://www.wklej.org/id/23867/

FIELD_MAIL            = gleemmomailid
FIELD_FWDTARGET       = gleemmomailid

Yo! So, you're telling dbmail to deliver to gleemmomailid, but also
forward to gleemmomailid

If you don't want to use forwarding, leave FIELD_FWDTARGET empty.

From: README.ldap:

"FIELD_FWDTARGET"

The field which contains a destination email address for forwarding mail.

        example: FIELD_FWDTARGET=mailForwardingAddress

--

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
Schickel | 2 Dec 2008 16:32
Picon
Favicon

Export maildomains to another Server

Hi,

i must move 2 dbmail-domains with all users _and_ mails. I've googled 
the not for a solution, but i did't find it. Is there a way to export 
one domain with all mailboxes and mails?

Greetings from Munich

Gmane