
On Tue, Mar 13, 2012 at 03:22:06PM +1100, Jason White wrote:
Mike Fabre <mike+luv@fabre.id.au> wrote:
Hi, I have a postfix & dovecot server set up, and I have been given the task of making it put a arbitrary 5-10 minute delay for every email that comes through, whether it be for sent mail or received mail doesn't matter.
Are you sure you have to reinvent what is already available? You could install Postgrey, which (based on reports from friends who use it) can be very effective.
I also use postgrey for greylisting, however we need *all* mail to be delayed whether it is recognized or not, I also don't want to delay it the half hour or so which greylisting will normally do, just a short delay of a few minutes is fine.
The first thing we thought of was to make all users use procmail, and set up a global procmail rule with a sleep in it, while this will almost certainly work, the users must not be able to run commands on the server, which they can do with a ~/.procmailrc file.
You could add your rules to /etc/procmailrc, however, and ensure that all mail is delivered from there.
As far as I can tell from procmail's manpage I can't tell it *not* to read the users .procmailrc when it's finished with everything else, if I'm wrong here then that's probably the easiest way to go about it. -- Mike Fabre