Requeuing failed messages

Danita Zanre danita at
Wed Jan 4 00:44:55 UTC 2017

Thank you!  I appreciate the extra effort. 

Danita Zanre, Move Out of the Office
I love my job, and you can too!
Tel: (720) 319-7530 - Caledonia Network Consulting
Tel: (720) 319-8240 - Move Out of the Office 
danita at |

> On Jan 3, 2017, at 6:15 PM, Mark Sapiro <mark at> wrote:
>> On 01/02/2017 05:05 PM, Mark Sapiro wrote:
>> On second thought, the above sendmail command is probably not a good
>> idea. The issue is that -t will send the message to all To: and Cc:
>> recipients in the message headers. This can include addresses which are
>> in other domains and which probably already received the message and may
>> not even include the intended recipient of the quarantined message
>> (e.g., a Bcc:).
>> It is better to do
>> sendmail -i user at < quarantined_message_file
>> where user at is the intended local recipient. Note that if the
>> MTA is Postfix, the quarantined message will have a topmost Received:
>> header of the form
>> Received: from some server ...
>>    by your server ...
>>    for <user at> ...
>> that will expose the recipient address.
> On third thought, there will be issues with even the above because
> Postfix will have put a Delivered-To: header in the message so
> re-injecting it will result in it being rejected for a mail loop.
> I wrote a little Python 3 script to address this. It is attached. You
> can run it with the path to the saved message as the argument and it
> will read and parse the message, look for " for <user at>;" in
> the Received: headers, delete any Delivered-To: headers and pipe the
> message to sendmail for user at
> If necessary, it could be fairly easily converted to Python 2.
> -- 
> Mark Sapiro <mark at>        The highway is for gamblers,
> San Francisco Bay Area, California    better use your sense - B. Dylan
> -- 
> This message has been scanned for viruses and
> dangerous content by Iris MailScanner, and is
> believed to be clean.
> <>
> <Part.002>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the MailScanner mailing list