Re: [exim] Failover design with exim (slightly OT)

Pàgina inicial
Delete this message
Reply to this message
Autor: Lanny Jason Godsey
Data:  
A: Dennis Skinner, Jonathan Vanasco
CC: Exim Mailing List
Assumpte: Re: [exim] Failover design with exim (slightly OT)
I think I've mentioned this before, but if not here it goes.

I was thinking of having exim dump mail into either MySQL Cluster or
multi-master replication setup.

Each email would be keyed off recipient and uuid(), store the full
email as a blob, maybe pull out the headers into another table and
possibly the email body if it's text into another table for full text
searching (easy webmail!)

Tie them all together with the uuid() of course.

The pop3 server will list the messages giving the uuid as the UIDL.

I'm not exactly sure as to the best way to do this, either having the
pop3 server check list of messages on mysql against local disk cache,
or just dumping directly out of mysql.

The other thing is you could have a nice audit table to go along w/ the
emails storing the time each email was retreived/deleted.

You could have 2-10+ machines as mysql cluster or replication and also
run the pop3 server on each host.

I would use something like linux virtual server or maybe openbsd w/
pfsync and carp w/ perdition to handle talking to back end systems.

DNS hands out 1 ip, which can fail over to backup machine subsecond and
route to 1:M mysql/pop3 hosts.

The dbmail.org project is pretty close.

--- Dennis Skinner <dskinner@???> wrote:

> Jonathan Vanasco wrote:
> > I was talking earlier with a friend about having a failover email
> > system providing full redundancy
> >
> > Ideally something like:
> >
> > Mailserver A port 25 (Live)
> > delivers locally to Mailserver A port 2525 maildirs
> > relays a copy to Mailserver B port 2525 (backup)
> >
> > Mailserver B port 25 (backup)
> > delivers locally to Mailserver B port 2525 maildirs
> > relays a copy to Mailserver A port 2525 maildirs (live)
>
> I have been thinking about doing something very similar to this. In
> my
> case, I have 4 servers, each having a subset of maildirs, so A->A&B,
> B->B&C, C->C&D, and D->D&A. So if A went down, D could take over its
>
> functions if needed.
>
> My cutover would involve taking A out of DNS and changing the
> database
> entries for all accounts on A so Exim and Courier know where to look
> for
> the maildir.
>
> > my first idea was that port 25 on each machine is an exim relay
> station
> > that just routes messages to the local mailstore and the backup
> mta --
> > both running on port 2525.
>
> I think what would work better is to have all your scanning happen on
>
> the port 25 daemon (AV, SA, RBL, etc) and the 2525 daemon simply
> accepts
> the mail (*only* from your 2 mail servers) and delivers it where is
> needs to be (little or no checking).
>
> An rsync between the servers may be able to handle changes that
> IMAP/POP
> may have made. Just make sure if you have an outage and you switch
> back
> to server A, that you don't let the rsync run as it normally would or
>
> you'll lose mail.
>
> At this point, it is all in my head. I haven't started implementing
> any
> of it. If you do, let me know how it works out.
>
> --
> Dennis Skinner
> Systems Administrator
> BlueFrog Internet
> http://www.bluefrog.com
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
>