First of all, apologies for munging the thread: Gmail didn't deliver
Cameron's response.  I had to get the text from the archives.

Cameron Simpson wrote:

[...]


| Procmail generally relies on being installed in the user's ~/.forward
| file to cause sendmail (the mail system) to deliver email to the
| procmail programme instead of the default.

I don't have a ~/.forward: I have a ~/.fetchmailrc and a ~/.procmail
file, the former having this statement in its first line:

# Configuration created Fri Dec 13 22:30:42 2002 by fetchmailconf

I don't recall doing that, but I edited that file a number of times
since 2002.


|
| So...
|
| fetchmail collects email and delivered it to the local email system.
| Which means it delivers to sendmail. And sendmail hands it to
| procmail...
|
| However, fetchmail has a -m option, which can probably deliver directly
| to procmail, bypassing the local mail system entirely.

Looks like that's not as simple as I'd hoped.  From the fetchmail man
page:
       -m <command> | --mda <command>
              (Keyword: mda)

              This option lets fetchmail use a Message or Local
              Delivery Agent (MDA or LDA) directly, rather than
              forward via SMTP or LMTP.

              To avoid losing mail, use this option only with MDAs
              like maildrop or MTAs like sendmail that exit with a
              nonzero status on disk-full and other delivery errors;
              the nonzero status tells fetchmail that deliv‐ ery
              failed and prevents the message from being deleted on
              the server.

[...]

              The well-known procmail(1) package is very hard to
              configure properly, it has a very nasty "fall through to
              the next rule" behavior on delivery errors (even
              temporary ones, such as out of disk space if another
              user's mail daemon copies the mailbox around to purge
              old messages), so your mail will end up in the wrong
              mailbox sooner or later. The proper procmail
              configuration is outside the scope of this
              document. Using maildrop(1) is usually much easier, and
              many users find the filter syntax used by mail‐ drop
              easier to understand.

That seems to be a big incentive not to use procmail. Meanwhile, in
the man pages for maildrop:

DESCRIPTION

[...]

       maildrop does not accept an mbox-style From_ line before the
       first header line.  maildrop does not accept leading empty
       lines before the first non-blank header line. If the message
       can possibly start with empty lines, and a From_ line, use
       reformail -f0 to remove any initial empty lines, and replace a
       From_ line with a proper “Return-Path:” header; then pipe it to
       maildrop.

When I look at the headers of most mail, I see an mbox-style From
line. Where do we make use of the 'reformat -f0' and "Return-Path"
advice?

TIA

Frank

Reply via email to