3

For the reasons set out in my earlier question Originating (non-critical) emails from a "less-trusted" host, it unfortunately seems that we must run an SMTP server for the sole purpose of accepting and then immediately discarding bounce messages!

We would like to use Exim for this purpose.

To that end, I have placed the following in its acl_smtp_mail access control list:

discard senders = :
drop

Whilst this yields the desired behaviour in response to the SMTP MAIL command, Exim is now responding with 250 Accepted to all RCPT TO commands. We would like for it only to accept valid recipients, and reject invalid ones (so that clients do not get the erroneous impression that we're openly relaying messages).

Why is Exim now accepting all recipients (it wasn't before the introduction of the above access list), and how can it now be configured to reject invalid recipients?

eggyal
  • 402
  • 5
  • 16
  • While `deny` action explicitly inform sender that his message couldn't be accepted, `discard` action implicitly accept message and then drop them - more or less silently. – Kondybas Apr 19 '15 at 18:12
  • @Kondybas: Yes, but surely not at the expense of all future ACLs? If `accept` were to indicate that, then such a response at an early stage of an SMTP transaction would immediately negative all subsequent access control! – eggyal Apr 19 '15 at 18:23
  • I've used ACL-variables to store the state of the message all way long through the ACLs. In fact, I have `accept` and `warn` actions only, but when message finally falls into the routers, router checks the variables and deliver to the `inbox`, `spam`, `sa-learn` or `blackhole` correspondingly. – Kondybas Apr 19 '15 at 18:36

1 Answers1

2

I discovered the following documented under ACL return codes:

If the ACL for MAIL returns “discard”, all recipients are discarded, and no ACL is run for subsequent RCPT commands.

eggyal
  • 402
  • 5
  • 16