Re: [exim] rejecting messages for unknown virtual users

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Tony Finch
Data:  
Para: oliverj
CC: exim-users
Asunto: Re: [exim] rejecting messages for unknown virtual users
On Wed, 19 Jan 2005, oliverj wrote:
>
> so if the mail is for fred@??? and there is a mail directory on the server
> for this user then the perl subroutine will return
>
> "/data/mail/mydomain/fred"
>
> and then exim can deliver the message into this directory.
> and if the users mail directory does not exist then the perl subroutine returns undef.


> localuser:
> driver = accept
> domains = +local_domains
> require_files = ${perl {get_user_dir}{$local_part}{$domain}}
> transport = local_delivery


You should change your perl routine so that it does not do the existence
check. When the perl routine returns undef the require_files precondition
does nothing so the router accepts the address despite the file not
existing. When the perl routine returns a path the require_files
precondition is redundant because you've already checked that the file
exists. If you just return the string then Exim will do the existence
check, and if it fails the router will not accept the address and
address verification will fail, which is what you want.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}