OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Deliver mail to different storage on different machines

From: Simon Waters (simonwzynet.net)
Date: Fri Sep 02 2005 - 05:48:32 CDT


On Friday 02 Sep 2005 11:19 am, Gerhard de Jager wrote:
>
> I'm hosting a potentially large email service, and want to be able scale
> it if the number of users increase.
>
> I therefore need to be able to have mailboxes on different machines to
> extend storage.
>
> How would I go about setting this up (up to now I only delivered to
> storage on the same machine postfix is running).

We designed a previous system using maildir, directory hierarchies based on
beginning of domains, beginning of email address, and NFS.

e.g. something like...

/nfs/mail1/zy/wo/zyworld.com/si/mo/simon

where mail1, mail2, ... mailN were different storage systems.

However I think it is "overkill", you can just NFS mount multiple directories.

/nfs/mail1
/nfs/mail2.

Then allocation of particular domains to "mailN" on a rotating basis, as
handling relatively big directories isn't as painful as it was, so all that
path munging is probably just making life harder for most people to no
benefit.

I think this is all system administration, all Postfix needed to know is
"where to deliver". There may be better technologies than NFS for doing this
(in fact I'm sure there are!).

Sure you could get Postfix to use it's transport facilities to deliver
specific emails to specific machines, but I suspect this would be both more
complex, and less robust. Where as what you want is a design where you can
have N identical front end machines for SMTP acceptance, and N identical
machines for POP3 or IMAP4 service, and N identical machines for outgoing
SMTP relay, and N identical auth servers etc.

Have to say we never did have to scale the solution up, but I'm confident it
would have scaled pretty big. The only down side was we used local queue
directories on mirrored drives only, so a server could go down and hang on to
it's queued email. I dare say with suitable redundant storage technology you
could move Postfix queues elsewhere, but the semantics of file systems scared
me from trying to be too clever with the queue folders.

I suspect the pain comes with some of the antispam methods, if you have N
identical incoming SMTP servers, it is more complex to deploy stateful
technology, like greylisting. Guess you have to try and aim for stateless
techniques, or looks at the SQL based greylisting tools, and replicate that
information, if you look at the archive someone has been doing something like
that.