10 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] script to send Maildi...
FromSent OnAttachments
Jim RiceApr 7, 2006 4:41 pm 
Sam VarshavchikApr 7, 2006 5:20 pm 
Jim RiceApr 7, 2006 6:04 pm 
Sam VarshavchikApr 7, 2006 8:03 pm 
Ron JohnsonApr 7, 2006 10:04 pm 
Sam VarshavchikApr 8, 2006 7:30 am 
moussApr 8, 2006 2:42 pm 
Ron JohnsonApr 8, 2006 4:03 pm 
moussApr 9, 2006 1:32 am 
Jim RiceApr 10, 2006 7:15 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] script to send Maildir/new messages to another address?Actions...
From:mouss (mou@netoyen.net)
Date:Apr 8, 2006 2:42:43 pm
List:net.sourceforge.lists.courier-maildrop

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.