Re: Making postfix hand old deferred messages somewhere else?
- Michael Loftis wrote:
> It might not be at all possible inside of postfix, but, is there a wayI was looking for something else and ran across this site
> to get it to take deferred messages that are older than say a day and
> send them to a designated MTA? I'd like to get the big chunks of mail
> for dead domains or slow domains off my main mail servers and onto a
> small(er) set of retry/redelivery machines.
http://www.arschkrebs.de/postfix/scripts/ with this perl script:
The script is designed to go through the mailq and delete mail matching
a particular criteria(using a regular expression).
I would imagine the same script could be used, changing the regular
expression for a time value, change checking the message body to
checking the file creation date, and change the delete to some sort of
move(move the message file to a seperate directory and delete the last
delivery information file?)
Than you could run a second script to periodically check that directory
and make an SMTP connection to your designated MTA and pipe through the
messages to be sent)