can greylisting be toggled on/off via a command line?
i am wondering if i could keep it turned on all day, then toggle off at 330pm for the end of day rush. i have a client that receives orders that all come in at the end of the day as their customers finally get POs ready, and much of that end of day rush with hopes to process and ship today, can get caught in the delays. they are definitely onboard with the benefits of why greylisting is great.
if this could cron job turn it off at 330pm and back on again at 530pm, that would be so awesome.
grey listing toggled from command line?
- shawniverson
- Posts: 3783
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: grey listing toggled from command line?
To turn off:
To turn back on:
Code: Select all
#!/bin/bash
sed -i "s/, \{0,1\}check_policy_service inet:127.0.0.1:2501//" /etc/postfix/main.cf
postfix reload
service sqlgrey stop
chkconfig sqlgrey off
Code: Select all
#!/bin/bash
sed -i "s/^smtpd_recipient_restrictions = \(.*\)$/smtpd_recipient_restrictions = \1, check_policy_service inet:127.0.0.1:2501/" /etc/postfix/main.cf
postfix reload
service sqlgrey start
chkconfig sqlgrey on