On Mon, 4 Oct 1999, Philip Guenther wrote:
Why is procmail "fixing" always the mbox format and leaves only first
From_. All other occurencies are fixed by prepending >. This is meantion
Because if it doesn't, the message would be split. It only does this
if it's writing the message to a Berkeley mbox-style mailbox.
Thank you, now know I'd use "formail -s" to do it. I was really trying to
split mailarchive into separate folders according to date. INow I can
finally do it. BTW: The confusing stuff for me was, taht in some examples
I have found in archives/FAQ etc was, that they use `date` command, which
works if I'd like to sort messages as they appear. But it obviously fails
if one wants to process old archive.
To be complete and post a solution into archive, here it is:
`formail -b -s procmail -m date.rc < mail.archive`
# date.rc
PMSRC=/etc/procmail
LOGFILE=/usr/majordomo/procmail.log
INCLUDERC=/etc/procmail/pm-jadate.rc
LIST = krb4
EXT = "$YY$MM" # 9910
# deliver messages into krb4.9910 etc.
:0:
$LIST.$EXT
in manpage, it also says that is not done if the user is root. Hou can a
poor user disable this feature? Similar feature exists in formail, but it
seems I'm allowed to disable it at least. ;-) Anyway, it's not nice that
it requests UID=0.
I'm not sure where you're seeing this in the manpage. Could you please
quote the relevant text from the manpage?
`man procmail` says:
MISCELLANEOUS
If there is an existing Content-Length: field in the header of the mail and
the -Y option is not specified, procmail will trim the field to report the
correct size. Procmail does not change the fieldwidth.
If there is no Content-Length: field or the -Y option has been specified
and procmail appends to regular mailfolders, any lines in the body of the
message that look like postmarks are prepended with `>' (disarms bogus
mailheaders). The regular expression that is used to search for these
postmarks is:
`\nFrom '
If the destination name used in explicit delivery mode is not in /etc/pass-
wd, procmail will proceed as if explicit delivery mode was not in effect.
If not in explicit delivery mode and should the uid procmail is running un-
der, have no corresponding /etc/passwd entry, then HOME will default to /,
LOGNAME will default to #uid and SHELL will default to /bin/sh.
When in explicit delivery mode, procmail will generate a leading `From '
line if none is present. If one is already present procmail will leave it
intact. If procmail is not invoked with one of the following user or group
ids : root, daemon, uucp, mail, x400, network, list, slist, lists or news,
but still has to generate or accept a new `From ' line, it will generate an
additional `>From ' line to help distinguish fake mails.
I must say that now I'm pretty satisfied with `formail -s`. ;-)
--
Martin Mokrejs - PGP 5.0i key at: finger://mail.natur.cuni.cz/mmokrejs
<mmokrejs(_at_)natur(_dot_)cuni(_dot_)cz> Faculty of Science, The Charles
University