If have a maildir file with a maildir format email in it.
I want to "bounce" it (using mutt's terminology) to another address. By "bounce", I mean have it sent verbatim (with zero changes and zero new headers) to another email address. Only the envelope-to will be new (obviously).
I need to be able to see the email exactly as the original user would have seen it, not "attached" or wrapped up in new headers.
All from the command line, preferably the actual cmd line, not a TUI like mutt.
Mutt can do this with the "b" Bounce command, but I can't figure out a way for mutt to get this single maildir format email imported via the -f option (which needs an mbox). I don't want to kludge/fudge it into mbox.
I tried s-nail and sendmail -i piping but both seem to take the input to mean "body" instead of "headers+body"... though maybe I'm missing something with the sendmail invocation?
If mutt can do it... surely I can do it from the command line!? Probably a magical sendmail option I'm not aware of...
IMHO the "bounce" functionality is paddling upstream without a paddle nowadays, thanks to SPF, DKIM, DMARC, etc. However, I would try the "swaks" tool. It's in most repos. While supposedly a testing tool, it really is a veritable Swiss Army Knife for SMTP. Let us know how this goes... -Adam
Get Outlook for Androidhttps://aka.ms/AAb9ysg ________________________________ From: Roundtable roundtable-bounces@muug.ca on behalf of Trevor Cordes trevor@tecnopolis.ca Sent: Wednesday, August 28, 2024 1:39:11 AM To: MUUG RndTbl roundtable@muug.ca Subject: [RndTbl] "bouncing" email from cmd line
If have a maildir file with a maildir format email in it.
I want to "bounce" it (using mutt's terminology) to another address. By "bounce", I mean have it sent verbatim (with zero changes and zero new headers) to another email address. Only the envelope-to will be new (obviously).
I need to be able to see the email exactly as the original user would have seen it, not "attached" or wrapped up in new headers.
All from the command line, preferably the actual cmd line, not a TUI like mutt.
Mutt can do this with the "b" Bounce command, but I can't figure out a way for mutt to get this single maildir format email imported via the -f option (which needs an mbox). I don't want to kludge/fudge it into mbox.
I tried s-nail and sendmail -i piping but both seem to take the input to mean "body" instead of "headers+body"... though maybe I'm missing something with the sendmail invocation?
If mutt can do it... surely I can do it from the command line!? Probably a magical sendmail option I'm not aware of... _______________________________________________ Roundtable mailing list Roundtable@muug.ca https://muug.ca/mailman/listinfo/roundtable
On 2024-08-28 Adam Thompson wrote:
IMHO the "bounce" functionality is paddling upstream without a paddle nowadays, thanks to SPF, DKIM, DMARC, etc. However, I would try the "swaks" tool. It's in most repos. While supposedly a testing tool, it really is a veritable Swiss Army Knife for SMTP. Let us know how this goes... -Adam
Oooh, that's slick!
Exactly what I needed:
cat /home/foo/Maildir/cur/1726708164.270948_0.foo.com:2,S | swaks -d - -t test@bar.com
Acts precisely as a "bounce" in mutt. And gives slick full-SMTP convo debug output to boot!
Thanks Adam!
For those interested, and who saw my DMARC presentation, the above will send the data portion (full body and headers) intact (no modifications) whilst making a new envelope, so I can get a precise copy at a different place. The main thing is nothing get re-encapsulated and MIME stuff is parsed just as in the original. _______________________________________________ Roundtable mailing list -- roundtable@muug.ca To unsubscribe send an email to roundtable-leave@muug.ca