Discussion:
[Pkg-exim4-users] local_sender_blacklist
Iain Mac Donald
2016-02-11 14:51:40 UTC
Permalink
I am wanting to use /etc/exim4/local_sender_blacklist to block some
persistent spammers but I'm not getting it to work.

I am using exim4-daemon-heavy 4.80-7+deb7u1 on Wheezy.

I have created the file /etc/exim4/local_sender_blacklist and for
testing I have created one record:
*@example.com

I update the configuration and restarted Exim:
update-exim4.conf
/etc/init.d/exim4 restart

I checked /var/lib/exim4/config.autogenerated and the
local_sender_blacklist section is listed.

Then on a completely different and unrelated server I use swaks to send
an email which goes to the first server:
swaks --to ***@anotherdomain.com --from ***@example.com

The email is sent and received. Any suggestions as to where I have gone
wrong?

Regards,
Iain.
Andreas Metzler
2016-02-11 16:02:42 UTC
Permalink
Post by Iain Mac Donald
I am wanting to use /etc/exim4/local_sender_blacklist to block some
persistent spammers but I'm not getting it to work.
I am using exim4-daemon-heavy 4.80-7+deb7u1 on Wheezy.
I have created the file /etc/exim4/local_sender_blacklist and for
update-exim4.conf
/etc/init.d/exim4 restart
I checked /var/lib/exim4/config.autogenerated and the
local_sender_blacklist section is listed.
Then on a completely different and unrelated server I use swaks to send
The email is sent and received. Any suggestions as to where I have gone
wrong?
It should work exactly this way.

swaks --to ***@anotherdomain.com --from ***@example.com -pipe "exim -bh nn.nn.nn.nn"
(with nn.nn.nn.nn as the remote IP) might offer further hints.
Post by Iain Mac Donald
check senders = ${if exists{/etc/exim4/local_sender_blacklist}{/etc/exim4/local_sender_blacklist}{}}
example.com in "example.com"? yes (matched "example.com")
deny: condition test succeeded in ACL "acl_check_rcpt"
end of ACL "acl_check_rcpt": DENY
cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
Iain Mac Donald
2016-02-11 17:47:51 UTC
Permalink
Andreas & Marc,

thanks, guys!

Using -pipe on swaks is the way to go. I have now changed everything to
using regular expressions and it is working fine. I must have read
chapter 10 at least 4 times and I thought I understood it, seems I
didn't.

As a by-the-way... during my testing I noticed
that /etc/exim4/ocal_sender_blacklist doesn't work if it is actually a
symlink to a file elsewhere.

Regards,
Iain.

Loading...