procmail
[Top] [All Lists]

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

1999-12-11 23:08:16
At 05:11 PM 12/11/99 -0600, David W. Tamkin wrote:

But the program after -s is still invoked with the null output as its input.
I have the feeling that formail's -D and -s options were not designed to work
together, and any degree to which they do is lagniappe if not serendipity.

I too had to look up lagniappe just to make sure it wasn't something
I had for dinner.  :-)


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

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

Um, no; although procmail/formail may be able to handle it somewhat,
it's not a valid *mail* message since those must have required
RFC822 headers.  (An empty *body* is valid, though.)  "From " is
not a mail header at all, but rather a convenience used in
storing mail on some systems (including UNIX).


| > | :0 D
| > | * ^From foo(_at_)bar
| > | /dev/null

| As mentioned in a subsequent e-mail, the simple pattern match
| above, didn't appear to work when applied to a message containing
| only a '^From foo(_at_)bar' line - don't know why.

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

I think I am confused as to what you are saying here...
procmail does not generate a foo(_at_)bar line for me when fed
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
%

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

%

Cheers,
Stan

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