procmail
[Top] [All Lists]

Re: formail -D generates empty msg. when duplicate found?

1999-12-12 13:41:58
Gary had asked,

F> Also, does a mail message with only "From " line qualify as a valid mail
F> message?

I responded,

T> It does if there is an empty line before it, or if it is at the very
T> beginning of the input, or if you are using formail's -e option.

Stan corrected,

R> Um, no; although procmail/formail may be able to handle it somewhat,
R> it's not a valid *mail* message since those must have required
R> RFC822 headers.

True.  I was considering "valid" for formail to split it out from an mbox
as a separate message and not the other requirements of email.

T> That's additional reason that I'm thinking it's procmail, not formail,
T> adding the default foo(_at_)bar postmark.  When you run that recipe, procmail
T> hasn't added it yet, and the message is still empty.

R> I think I am confused as to what you are saying here...
R> procmail does not generate a foo(_at_)bar line for me when fed
R> an empty message:

| % cat junk.rc
| :0
| junkbox
| % procmail ./junk.rc < /dev/null
| % ls -l junkbox
| -rw-------  1 stanr           1 Dec 12 00:16 junkbox
| % od -c junkbox
| 0000000   \n
| 0000001
| %

Hmm.

| As you can see, the above produced just a newline.  "foo(_at_)bar"
| only appears in the (3.11pre7) formail man page, and indeed
| formail does generate them:
| 
| % formail < /dev/null
| >From foo(_at_)bar  Sun Dec 12 00:18:19 1999

Formail does not add "From foo(_at_)bar timestamp" to a message with no postmark
(1) when you use formail's -f option nor (2) when you use -D and -s together
and the message is deemed a duplicate.  And if formail had generated it, why
couldn't procmail match on it?

Now, the following is possible: somewhere in Gary's .procmailrc, *after*
the recipe that was supposed to trash all messages postmarked From foo(_at_)bar
but before the messages were filed, there was a filtering recipe that ran
the text through formail without -f.  That would definitely add the foo(_at_)bar
postmark.  Another thought I had was that procmail appended the empty
message, without using the `r' flag, to an existing mbox rather than to a new
file as you used in your test, Stan, so that's why it generated a postmark;
but I tested that and procmail did not generate a postmark.

<Prev in Thread] Current Thread [Next in Thread>