Re: [exim] Verifying recipient confusion

Góra strony
Delete this message
Reply to this message
Autor: Terry
Data:  
Dla: exim-users
Temat: Re: [exim] Verifying recipient confusion
On 14/09/2014 04:45, Lena@??? wrote:
>> From: Terry
>
>> I thought I had a handle on what I was doing in
>> rejecting mail to unknown users but a discussion on another list and
>> subsequent googling made me question it.
>>
>> I have the following in acl_smtp_rcpt:
>>
>>     require
>>       message = 550 5.1.1 Bad destination mailbox address
>>       verify = recipient

>
> I advise without "message", then error messages will be more specific.
> For incoming mail (to local domains) to nonexistent users
> a router should generate message like "Unknown user",
> it'll be what sending MTA sees. Please post your such router.


Thank you, Lena. This is where my problem was and why I set the message
because it kept returning 550 Unrouteable address.

I had a router for mail to root as the last router which had no
cannot_route_message. I've removed that router as root is forwarded in
the aliases file so it never gets there. It now returns "550 Unknown
user" when I tested.

These are my routers now:

begin routers

dnslookup:
   driver = dnslookup
   domains = ! +local_domains
   transport = remote_smtp
   same_domain_copy_routing = yes
   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
                         172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\
            255.255.255.255
   no_more


virtual_aliases:
driver = redirect
domains = +local_domains
allow_fail
allow_defer
data =
${lookup{$local_part}lsearch{/etc/exim4/virtual/aliases/$domain.aliases}}

virtual_userforward:
debug_print = "R: userforward for $local_part@$domain"
driver = redirect
domains = +local_domains
user = vmail
file = /home/vmail/$domain/$local_part/.forward
require_files = /home/vmail/$domain/$local_part/.forward
no_verify
no_expn
check_ancestor
allow_filter
forbid_smtp_code = true
directory_transport = local_address_directory
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
skip_syntax_errors

virtual_user:
    driver = accept
    domains = +local_domains
    require_files = +/home/vmail/${domain}/${local_part}/
    transport = dovecot_virtual_delivery


system_aliases:
driver = redirect
domains = +local_domains
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}

local_user:
driver = accept
domains = +local_domains
check_local_user
local_parts = ! root
transport = maildir_home
cannot_route_message = Unknown user

Is there any advantage to returning the extended code in the
cannot_route_message?

I also have local domains lumped in with the virtual domains in
+local_domains. Is it more efficient to separate these and use only the
virtual domains with the virtual routers?

Thanks to everyone for the pointers and help.

--
Terry