[exim] Enhancing acl_check_rcpt

Góra strony
Delete this message
Reply to this message
Autor: Victor Sudakov
Data:  
Dla: exim-users
Temat: [exim] Enhancing acl_check_rcpt
Dear Colleagues,

Thanks to the collective help, I have the following conditions in
acl_smtp_rcpt:

===============================
# cond1

  accept condition = ${if or{ \
                     {bool{${lookup{$local_part@$domain}lsearch{/etc/dovecot/aliases}{yes}{no}}}} \
                     {bool{${lookup{$local_part@$domain}lsearch{/etc/dovecot/users}{yes}{no}}}} \
                            }}


# cond2

  require message = relay not permitted
          domains = +local_domains : +relay_to_domains
===============================



Now if the recipient's full address is not in /etc/dovecot/users, but the
recipient's domain *is* in +dovecot_domains, the mail is rejected with the
"relay not permitted" message.

Technically this is correct. But I would like to have a special error
message for this situation, like "Unknown user" (i.e. the domain is ours
all right, but there is no such mailbox).

I hate to add another lsearch lookup, maybe there is a nicer way to achieve
this?

--
Victor Sudakov, VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/