Re: [exim] Delaying messages for 5 minutes?

Etusivu
Poista viesti
Vastaa
Lähettäjä: Marc Perkel
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Delaying messages for 5 minutes?
After looking at the idea of freezing it in the queue I came up with
hopefully a better solution. This code creates a 10 minute delay.
Delayed messages are written to /delay/0. This script is run once a
minute. When it gets to 9 the email is resent.

#! /bin/bash

md /delay
cat /delay/9/*|exim -bS
rm -R /delay/9
mv /delay/8 /delay/9
mv /delay/7 /delay/8
mv /delay/6 /delay/7
mv /delay/5 /delay/6
mv /delay/4 /delay/5
mv /delay/3 /delay/4
mv /delay/2 /delay/3
mv /delay/1 /delay/2
mv /delay/0 /delay/1

mkdir /delay/0

The file name is the sender's email address. The idea here, that I'm
about to implement, is that I'm going to generate an outgoing senders
blacklist of email addresses based on things like the number of failed
recipients. (counting on spammers having bad lists) so when the messages
make it to /delay/9 I delete all the files matching my blacklist and
send the rest.

Hopefully I will be able to tell the difference between a legit list and
a spammer after 10 minutes. If not - I'll have to add some more numbers
to the rotation.