I have a mail server (iRedMail) that uses Postfix. I've been getting a lot of spam, so I modified the /etc/postfix/main.cf file and have the smtpd_recipient_restrictions set to this:
smtpd_recipient_restrictions = reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rbl_client cbl.abuseat.org, reject_rbl_client b.barracudacentral.org, reject_invalid_hostname, reject_unknown_sender_domain, reject_unknown_recipient_domain, check_policy_service inet:127.0.0.1:7777, check_policy_service inet:127.0.0.1:10031, reject_non_fqdn_sender, reject_non_fqdn_hostname, reject_non_fqdn_recipient, reject_unlisted_recipient, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit
Yet, spam messages are still coming through from IPs that are on these blacklists.
If I look at my /var/log/mail.log file, I see the messages coming through. Here's an example of one:
Jan 11 01:09:19 mailhost postfix/smtpd: DA5736B578: client=localhost[127.0.0.1] Jan 11 01:09:19 mailhost postfix/cleanup: DA5736B578: message-id=<ObreptitiousSoundness_300b221f33a2b213a8dc0ee683baadacnick@mydomain.com> Jan 11 01:09:19 mailhost postfix/qmgr: DA5736B578: from=<Trump.Business.Success@aslk.riflebuzz.review>, size=6081, nrcpt=1 (queue active) Jan 11 01:09:19 mailhost postfix/smtpd: disconnect from localhost[127.0.0.1] Jan 11 01:09:19 mailhost amavis: (00737-01) Passed CLEAN, LOCAL [188.8.131.52] [184.108.40.206] <Trump.Business.Success@aslk.riflebuzz.review> -> <email@example.com>, Message-ID: <ObreptitiousSoundness_300b221f33a2b213a8dc0ee683baadacnick@mydomain.com>, mail_id: NBO0lwDs11eq, Hits: -1.097, size: 5620, queued_as: DA5736B578, 647 ms Jan 11 01:09:19 mailhost postfix/smtp: D662C6B575: to=<firstname.lastname@example.org>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.1, delays=1.5/0.01/0.02/0.65, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as DA5736B578)
When I lookup 220.127.116.11 on MXToolBox, it's listed on Spamhaus Zen.
Is my configuration incorrect? I've noticed that apparently the order of the items makes a difference.