Re: [exim] rejecting messages for unknown virtual users

Page principale
Supprimer ce message
Répondre à ce message
Auteur: oliverj
Date:  
À: exim-users
Sujet: Re: [exim] rejecting messages for unknown virtual users

I'm still getting the same problem.

I took the existence check out of the router, so now it is :-

localuser:
driver = accept
domains = +local_domains
transport = local_delivery




and my local delivery transport is :-

local_delivery:
driver = appendfile
directory = ${perl {get_user_dir}{$local_part}{$domain}}
user = exim
file_must_exist
no_check_owner
maildir_format
mode = 0660
delivery_date_add
envelope_to_add
return_path_add
quota = ${lookup{$local_part@$domain}dbm{/etc/mail/quota.db}}




but mail for non-existant users is still remaining on the queue, with these messages :-

2005-01-20 10:37:16 1CoPjW-0006zD-Pb == fred@??? R=localuser T=local_delivery defer (-1): Expansion of "${perl {get_user_dir}{$local_part}{$domain}}" (file or directory name
+for local_delivery transport) failed: Perl subroutine "get_user_dir" returned undef to force failure
2005-01-20 10:37:16 End queue run: pid=16142


so is there something i can change in my local_delivery router so that it will fail immediately if there is no directory?

to answer the question posed by Fred Viles :-

"
That should work. But if you can change the pathname pattern to
"data/mail/mydomain.com/username" you can simplify your configuration
(and make it more readable IMHO):

require_files = /data/mail/$domain/$local_part
"



- I cant do that as the mail directories are on different /data_nn partitions (data_01 , data_02, data_03 etc).



on 19.01.05, Tony Finch wrote:
> 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}}

</>

--


Oliver Howe
Technical Developer

BiblioTech
Unit 3, 50 Carnwarth Road
London SW6 3EG

DDI: +44 (0) 20 7384 6929
Tel: +44 (0) 20 7384 6900
Fax: +44 (0) 20 7384 6901

oliverj@???

www.bibliotech.net
www.homemaster.net
www.officemaster.net
www.postmaster.co.uk
www.schoolmaster.net

IMPORTANT: The contents of this email, and any attachments, are CONFIDENTIAL
and intended only for the person(s) to whom they are addressed. If you have
received the email in error please notify the sender immediately and delete
it from your computer system. Do not copy or distribute it or disclose its
contents to any person. Unless otherwise stated, the views and opinions
expressed in this email are personal to the sender and do not represent the
official view of the company.