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=<[email protected]> rejected RCPT <[email protected]>: 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).

0

1 Answer 1

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).

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .