* Yang Zhang <yanghates...@gmail.com>:

> > No. Postfix replies "250 OK: queued as 12345" when the message is QUEUED.
> 
> Doesn't this contradict your original reply that durability is
> guaranteed? If there's no fsync, then the message may not have been
> persisted to non-volatile storage, and will be lost.

After the mail had been written to the queue, fsync() is executed. If
fsync() succeeded, the reply "250 OK: queued as ....." is sent back to
the client.

So unless fsync() lies, the mail is safely on the disk.

Then the qmgr decides to e.g. invoke local to perform local delivery.
local writes the mail into the Maildir, invokes fsync(). If
fsync() succeeded, the qmgr considers the mail delivered and deletes
the queuefile.

So unless fsync() lies, the mail is safely on the disk.

Your initial question was:
"Can postfix be configured to guarantee durable email receipt?
E.g., can it be sure to fsync the mbox/Maildir file and/or directory
before it acknowledges successful receipt of an email?"

THAT is not possible, since the process which is ACCEPTING the mail
(smtpd) is NOT the same process that is writing to a local mailbox
(local), due due Postfix's non-monolithical design.

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de
            

Reply via email to