Ron Johnson wrote:
On Fri, 2006-04-07 at 23:03 -0400, Sam Varshavchik wrote:
Jim Rice writes:
On Fri, 2006-04-07 at 20:20 -0400, Sam Varshavchik wrote:
Jim Rice writes:
A user has dozens of email messages in their Maildir/new folder...
1144448468.M650845P24805V0000000000000803I0099C08C_0.production,S=3097
as an example.
Is there a handy script/command for parsing this message for the
From/Subject/... header info and resending it to another address,
while preserving their attachments, etc.?
for f in $MAILDIR/new/*
do
sendmail user@domain <$f
done
Yes, but that will not preserve the MIME encapsulation.
Yes, it will.
It will just send the base64 encoding as text.
No, it won't.
It will appear as gobbledy-goop to the user,
Only if the original message was gobbledy-goop.
I couldn't get Postfix's sendmail to do anything puke it back in
my face, but did MIME encapsulate it. BSD Mail actually actually
sent the mail, but did not encapsulate it.
Here's the sendmail message:
This is the Postfix program at host haggis.homelan.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The Postfix program
<me@haggis>: mail forwarding loop for me@haggis
you are trying to redeliver the mail to the same user it was already
delivered too. you must make sure not to create an infinite loop.
if you are certain, then just remove the first Delivered-To header.
postfix uses this header to check for delivery loops.
so do something like:
# grep -v -m 1 "^Delivered-To:" | sendmail ....
but again, don't do this automatically for all delivered mail.