Re: [exim] Send a maildir to exim to be sent

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Ed Singleton
Date:  
À: exim-users
Sujet: Re: [exim] Send a maildir to exim to be sent
On 29 Sep 2009, at 21:24, Heiko Schlittermann wrote:

> Ed Singleton <singletoned@???> (Di 29 Sep 2009 22:03:18 CEST):
>> I wrote a system_filter to dump bounce messages into a maildir, but
>> unfortunately it turned out to be over enthusiastic and has dumped
>> _all_ messages going through exim.
>>
>> I now need to resend about 50,000 messages that are in a maildir. Is
>> there any easy way to do this?
>>
>> Many thanks for any pointers, or even just hints on good things to
>> google for related to this.
>
> Did you add the „envelope-to“ header? Otherwise you lost the original
> recipient information. (But, you may find it in the logs.)
>
> Maybe you could have check „formail“, it can help you parsing the
> header
> and execute any command…


I didn't realise about the envelope-to header, no. I'll improve the
filter to add that in.

However, I'm resending the messages in the end using a few lines of
python. Turns out you can just iterate through a maildir and pass
those off to a smtpserver instance. I used the To and From headers,
assuming that they were correct to be the envelope headers.

They seem to be happily going off (if not a bit slowly...)

Thanks

Ed