On 2022/03/23 17:29, Cameron Simpson wrote:

On 23Mar2022 15:01, Jon Brinkmann <brinkm...@nmsu.edu> wrote:
I'm working to extract the original message and send it back through
procmail
to be properly sorted into my mailboxes.  I've mapped this process to the
'E' key:

macro index E '<view-attachments>5<enter><pipe-entry>procmail;tail 
procmail.log<enter>' 'extract & process a message that Microsoft Exchange called undeliverable'

It works great, with one problem: <pipe-entry> doesn't pass the mailbox
delimiting "From [email_address] [message_date]" to procmail, which sorts and
writes what it received to a file that's not recognized as a mailbox by mutt.
Is there some way to tell <pipe-entry> to pass the delimiter line?  If not,
should this be a code change request?

Well, the poblem here is that the From_ line is not part of the message
itself, and won't be present in the attachment you have.

I'd be inventing one - it is broadly ignored by mail filters etc (again,
not being part of the message), so you just need a valid one to work as
the mbox delimiter line. Maybe something like this:

     ( echo "From nobody `date`"; cat ) | procmail

That might work, but it's not ideal.

The From_ line is part of mbox file format, a way to store multiple messages in a single file. Ideally, the From_ line should not exist anywhere but in an mbox file.

I would expect procmail to generate the From_ line and the other things that mbox format needs. If it can't do that, I'd call that a bug.

Procmail is badly outdated, and it's a zombie, unmaintained for many years. I suggest that you consider some other delivery agent. The program fdm looks promising, though I haven't used it.

Here's a Wikipedia article.
<https://en.wikipedia.org/wiki/Message_delivery_agent>

Reply via email to