#16 please grok emacs RMAIL files

David Flanagan


Bogofilter now understands how to parse mbox format files.
Please modify it so it can grok emacs RMAIL files.
These are much like mbox files, but messages are
separated by ^L linefeeds, and From lines are changed
to Mail-from: From lines.

I've been able to register my spam and ham files by
first running sed over my RMAIL files like this:

sed -e 's/^Mail-from: From/From/' RMAIL | bogofilter -M -n

But it would be really nice if I could skip the sed step.

On a related note, the man page needs clarification. It
says that bogofilter can handle many messages, and
breaks them on From_ lines. But then there is the -M
option, which apparently breaks them on "From " lines
(without the underscore or a colon). What's the
difference? When would the default (From_) behavior
be useful? When is the -M option useful instead?


  • David Relson
    David Relson

    Logged In: YES

    RMAIL files will be considered.

    I had never noticed the From_ constructs in the man page.
    I've changed them to "From " which is correct.

  • Logged In: YES

    The RMAIL format is more complex (contains more meta data)
    than you describe, but I haven't been able to find a
    complete specification or reference other than the elisp
    stuff that ships with emacs and that I do not read well
    enough to grok it. Can you pipe from RMAIL into external
    applications? You could then define a keyboard macro for
    that purpose.

    "From_" is sometimes used to emphasize that there's a blank
    following the "From", to contrast it from the "From:
    header". Whenever you read "From_ line", think "From line
    with blank rather than colon".

    • status: open --> closed