[Dovecot] From Maildir back to smtp

Andrew Richards ar-dovecotlist at acrconsulting.co.uk
Fri Feb 24 01:03:34 EET 2012

On Thursday 23 February 2012 22:12:14 mailing at securitylabs.it wrote:
> Il 23/02/2012 21:41, Marc Perkel ha scritto:
> > Not sure how this can be done.
> > 
> > Right now I'm running a free backup MX record service. People point
> > their high MX records to my servers and if they go down we store the
> > email. When they come back up it's delivered.
> Hi, store how? In a queue with smtp server?
> > What I want to do is have a premium service that would allow them to
> > view through IMAP the stored email. In order to do that I would have
> > to deliver the email locally to a dovecot server - to a single account
> > perhaps - and they can view/forward/delete etc.
> > 
> > But - when their server comes back online I'd like to gather up all
> > the delivered email stored in Maildir format and run it back into smtp
> > for delivery.

Sounds like a job for serialmail, a sister package to qmail: Use serialmail to 
forward mail from a mailbox (in Maildir format which you have) to the primary 
MX when it's back up. I've provided a mailbox/forwarding secondary MX service 
for several clients using this method (esp. 'maildirsmtp' program from 
serialmail with cron). More info/help on the qmail or serialmail mailing 
lists; URL for serialmail is,


(it includes man pages within the package)

A couple of particular advantages of having secondary MX email in a mailbox as 
you suggest for forwarding:

 - Unlike mail in a queue, the messages don't expire, so if the
   primary MX takes forever to come back up that's fine (except
   for your disk storage)

 - Since the mail is in a mailbox you can access this with IMAP or POP3
   as you suggest [until it's emptied when the primary MX returns]

I've not considered running serialmail in an non-qmail environment, but it 
would probably still work for the purpose you have in mind if you're using a 
different MTA.

> If you store the messages in a queue you can configure your smtp (your
> MX) server to send a copy of all message it receive also to another
> mailbox,  see always_bcc in posfix.



More information about the dovecot mailing list