[Dovecot] dovecot, procmail and deliver

David Lee t.d.lee at durham.ac.uk
Thu Oct 5 19:21:28 UTC 2006


On Thu, 5 Oct 2006, John Peacock wrote:

> [...]
> I think the real problem is that you are using two LDA's (Local Delivery
> Agent) which both assume they are the exclusive LDA.  Dovecot's
> 'deliver' expects to be handed an e-mail directly from the MTA (Message
> Transfer Agent) directly, not via some other program.

Thanks for the reply.

In what follows "From_" (with an underscore) refers to the "From " (with a
space) traditionally seen in email transcations, especially in MBOX.

There are a few different things going on, which inter-relate:

1. Suppose the MTA itself generates a "From_" which then feeds into
'deliver'.  Shouldn't 'deliver' detect this?  Furthermore, shouldn't it
actually use this preferentially?  My own particular use is merely
exposing what already seems to be poor, indeed (I would suggest) a bug.

2. The "From_" generated by 'deliver' is poor.  It should be followed by a
real email address, representing the originator of the email (possibly the
other side of the world).  Instead it inserts the fixed string, not even
an email address: "dovecot.deliver".  This seems to be a double bug: not
an email address, nor representative of _sender_.  Again, my own
particular use is, I think, merely exposing an underlying flaw.


> If you are using procmail, you should use procmail exclusively to
> process the local delivery.  If you want to use 'deliver' with
> server-side rules, you should use the Dovecot SIEVE 'deliver'.

Perhaps.  That takes us back to the very opening scene-setting of this
thread.  Reminder:

   Very busy mail service (20,000 users, small farm on Linux email servers
   accessing NetApp storage via NFS).

   Well-established UW-IMAP service.  Because of the vital importance of
   locking (to ensure integrity) this has always carefully ensured that
   the only software which ever touches the mailbox is the UW-IMAP suite:
   imapd/pop3d for MUAs; tmail (from sendmail) for simple delivery; dmail
   (via user .procmailrc recipies) for user-guided delivery.  So because
   simultaneous writes from the IMAP daemon (e.g. message deletion) and
   from delivery processes use the same UW-IMAP software suite, the
   locking should be (and seems to be over many years) consistent.

   In other words: very cautious and conservative about what touches the
   mailboxes.

My fundamental question about migrating to dovecot.  Following the above
model, I feel I ought to use only "deliver" (not mixed with "mail.local",
nor "procmail" nor anything else) to touch the mailboxes.  With dovecot,
is it known to be safe to relax this caution and conservatism (without
worry!) and allow other software (along with dovecot imap) to dabble with
the mailboxes?


(Even if mixed-supplier software is proven safe, so that I could use
"mail.local" and direct "procmail" delivery, I still think dovecot
'deliver' could be improved as suggested earlier.)

Any thoughts?

-- 

:  David Lee                                I.T. Service          :
:  Senior Systems Programmer                Computer Centre       :
:                                           Durham University     :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham DH1 3LE        :
:  Phone: +44 191 334 2752                  U.K.                  :


More information about the dovecot mailing list