On 30 August 2017 at 10:30, mbridgett <[email protected]> wrote: > Hi, > > This is the first time I have configured sender_access blacklisting - > although it works fine - i.e. the specific email address I have chosen to > blacklist get's their email blocked with /var/log/messages noting it as > "Sender address rejected:access denied". I notice that after an hour has > gone by- the email is attempted to be delivered again. Maybe I have > missed > a subtlety here but I thought a REJECT would immediately return the message > to the sender but that doesn't appear to be the case. > > I guess my question is - how many times will the message be attempted to be > re-delivered, with my mail server rejecting it - until it will eventually > be > returned as undeliverable?
​With 'REJECT' action Postfix will have sent code $access_map_reject_code (default 554) back to the sending server and so that server should not attempt to send the same email again - see http://www.postfix.org/access.5.html. Of course if the sending server is badly-configured or malicious it may well ignore the code and try to resend the email or (more likely) send similar (but technically different) emails. There is nothing further than Postfix can do to stop this happening. If the offending emails are all coming from the same ip you could ban this ip with iptables / ufw. A less drastic strategy is to use fail2ban jobs to block offenders on a temporary basis. But since Postfix is already blocking the emails from this sender there is no need to do either.
