Using Postfix and custom transports I can manage delivery speeds depending on the recipient's domain. (For example, I send max one message per second to *@hotmail.com)
I also use similar rules to block bad destinations (htmail.com is blocked right away, avoiding many loops in the queue).
However, I'd like to temporarily suspend mail delivery to a destination for 24 or 48 hours (mails to *@gmail.com suspended, everything else delivered). Messages would queue up during this time, and would be delivered only when I want by changing the config.
Does anyone know how to do that ?
Thanks
Put messages in a HOLD state
/etc/postfix/main.cf:
/etc/postfix/hold:
Make sure you run
postmap hash:/etc/postfix/hold
whenever you update the file.If you want to release all messages on hold, use postsuper:
You can do this with a transport map:
gmail.com defer:
To put on hold for specific domain:
To release for a specific domain: