1

I installed exim4 on a Debian server configured it to use Dovecot LMTP delivery and everything works nice. But I'm having problems with a bit of a spam attack right now. I installed fail2ban but it's a bit slow to catch up. Also I was looking at the actions for the exim4 jail and I saw that there can be error messages with 535, Sender verify failed and unknown users and I think all of those sound like better ban reason than the current relay not permitted:

2015-11-23 09:03:25 H=118-160-211-95.dynamic.hinet.net (xxx.xxx.xxx.xxx) [118.160.211.95] F=<whauzjdtwgwuza@163.com> rejected RCPT <amay@yahoo.com.tw>: relay not permitted

So I wanted to ask if there is a way to force authentication based on the fact that this is not even an mail server that I am responsible for (163.com and I'm responsible for example.com only) and to give different error message (like not auth)?

Also as a side note would this mean that I somehow forgot to add some configuration somewhere like the lack of auth in some ACL? (Every actual person from example.com needs to enter the real password before he sends an email and if wrong it comes up with an error message saying wrong password).

1

You can't force a remote client to attempt to authenticate, because you don't know until the RCPT TO: whether the client is attempting to deliver an email to your server (which doesn't require authentication unless you have a very unusual configuration like only accepting mail from known mail servers) or it is trying to relay through your mail server without authorisation.

The RCPT TO stage of an SMTP session comes well after any AUTH negotiation (if any).

  • That kinda sums it up. I was thinking that is exactly the reason but I guess needed some confirmation. Thanks. :) – Marti Markov Nov 23 '15 at 9:49
  • bloody hinet. If an home server, better block the China netblocks while you are at it. – Rui F Ribeiro Nov 23 '15 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.