Re: [Exim] PGsql lookup - strange behaviour ?

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Robert Gomulka
Data:  
Para: Philip Hazel
CC: exim-users
Assunto: Re: [Exim] PGsql lookup - strange behaviour ?
Dnia Wto 17. Lipiec 2001 10:19, Philip Hazel napisał:
As usually, thank you for the answer :)
Well, in my config file I also handle usual (plain text) files with aliases:
virtual_localuser:
    driver = aliasfile
    transport = virtual_localdelivery
    domains = lsearch;/etc/exim/aliases/domains
    file=/etc/exim/aliases/${domain}/user
    require_files = /etc/exim/aliases/${domain}/user
    search_type = lsearch


virtual_alias:
    driver = aliasfile
    domains = "lsearch;/etc/exim/aliases/domains"
    file=/etc/exim/aliases/${domain}/aliases
    search_type = "lsearch*@"
    qualify_preserve_domainHmm. Perhaps the problem is quite different. I see 


> Hmm. Perhaps the problem is quite different. I see that on the first
> director you have set transport=db_deliver, but on the second one you
> have not. Have you understood how aliasfile works when it has a
> transport setting? It is not usual to set a transport on an aliasfile
> director.


Yes, I set tranport for director. When I not set it, I will show you what
happens. (I commented out virtual_localuser)
$ exim -C exim.test -d 9 -v -bt robertg@???
Exim version 3.22 debug level 9 uid=0 gid=0
Berkeley DB: Sleepycat Software: Berkeley DB 2.7.7: (08/20/99)
[blah blah]
>>>>>>>>>>>>>>>>>>>>>>>>

Testing robertg@???
tychy.hyperion.pl in percent_hack_domains? no (end of list)
address robertg@???
local_part=robertg domain=tychy.hyperion.pl
domain is local
>>>>>>>>>>>>>>>>>>>>>>>>

directing robertg@???
[blah blah]
calling odpowiedz1 director
require_files = robertg:/.message
user "robertg" for file existence test not found
odpowiedz1 director skipped: file existence failure
calling userforward director
userforward director declined for robertg (not a user)
search_open: lsearch "/etc/exim/aliases/domains"
search_find: file="/etc/exim/aliases/domains"
key="tychy.hyperion.pl" partial=-1
LRU list:
7/etc/exim/aliases/domains
End
internal_search_find: file="/etc/exim/aliases/domains"
type=lsearch key="tychy.hyperion.pl"
file lookup required for tychy.hyperion.pl
in /etc/exim/aliases/domains
lookup yielded:
tychy.hyperion.pl in "lsearch;/etc/exim/aliases/domains"? yes (matched
lsearch;/etc/exim/aliases/domains)
virtual_alias director has more set FALSE
calling virtual_alias director
df_lookup entered: search type = lsearch
virtual_alias director: lsearch* key=robertg
file="/etc/exim/aliases/tychy.hyperion.pl/aliases"
search_open: lsearch "/etc/exim/aliases/tychy.hyperion.pl/aliases"
search_find: file="/etc/exim/aliases/tychy.hyperion.pl/aliases"
key="robertg" partial=3071
LRU list:
7/etc/exim/aliases/tychy.hyperion.pl/aliases
7/etc/exim/aliases/domains
End
internal_search_find: file="/etc/exim/aliases/tychy.hyperion.pl/aliases"
type=lsearch key="robertg"
file lookup required for robertg
in /etc/exim/aliases/tychy.hyperion.pl/aliases
lookup yielded: rg
parse_extract_addresses: rg
extract item: rg
virtual_alias director generated rg@???
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
virtual_alias director succeeded for robertg
# well - it succeeded - why don't you go to transport ???
tychy.hyperion.pl in percent_hack_domains? no (end of list)
address rg@???
local_part=rg domain=tychy.hyperion.pl
domain is local
>>>>>>>>>>>>>>>>>>>>>>>>

# why directing second time ???
directing rg@???
[blah blah]
calling odpowiedz1 director
require_files = rg:/home/hyperion/rg/.message
require files uid=0 gid=0 euid=1062 egid=1003
test existence of /home/hyperion/rg/.message
required present, EACCES => unknown
No such file or directory
restored uid=0 gid=0 euid=8 egid=8
odpowiedz1 director skipped: file existence failure
calling userforward director
userforward director: file = /home/hyperion/rg/.forward
set uid=0 gid=0 euid=1062 egid=1003
/home/hyperion/rg/.forward not found
restored uid=0 gid=0 euid=8 egid=8
search_open: lsearch "/etc/exim/aliases/domains"
cached open
search_find: file="/etc/exim/aliases/domains"
key="tychy.hyperion.pl" partial=-1
LRU list:
7/etc/exim/aliases/domains
7/etc/exim/aliases/tychy.hyperion.pl/aliases
End
internal_search_find: file="/etc/exim/aliases/domains"
type=lsearch key="tychy.hyperion.pl"
cached data used for lookup of tychy.hyperion.pl
in /etc/exim/aliases/domains
lookup yielded:
tychy.hyperion.pl in "lsearch;/etc/exim/aliases/domains"? yes (matched
lsearch;/etc/exim/aliases/domains)
virtual_alias director has more set FALSE
calling virtual_alias director
df_lookup entered: search type = lsearch
virtual_alias director: lsearch* key=rg
file="/etc/exim/aliases/tychy.hyperion.pl/aliases"
search_open: lsearch "/etc/exim/aliases/tychy.hyperion.pl/aliases"
cached open
search_find: file="/etc/exim/aliases/tychy.hyperion.pl/aliases"
key="rg" partial=3071
LRU list:
7/etc/exim/aliases/tychy.hyperion.pl/aliases
7/etc/exim/aliases/domains
End
internal_search_find: file="/etc/exim/aliases/tychy.hyperion.pl/aliases"
type=lsearch key="rg"
file lookup required for rg
in /etc/exim/aliases/tychy.hyperion.pl/aliases
lookup failed
trying to match *
internal_search_find: file="/etc/exim/aliases/tychy.hyperion.pl/aliases"
type=lsearch key="*"
file lookup required for *
in /etc/exim/aliases/tychy.hyperion.pl/aliases
lookup failed
virtual_alias director declined for rg:
rg@??? is undeliverable:
unknown local-part "rg" in domain "tychy.hyperion.pl"
search_tidyup called
Press any key to continue...

You see ?
Maybe I will show you what I want. I just want the simpliest config, which:
- runs only for specified DOMAINS
- domains are listed in specified FILES
- aliases in form alias: realuser listed in OTHER_FILES

When I set transport for the first director, when exim attempts second time 
to direct address it passess it straight to specified transport, which 
carries this one. But why when virtual_alias director succeeds, another one 
is called?
# DIRECTORS CONFIGURATION
# ORDER DOES MATTER                         
#   A local address is passed to each in turn until it is accepted.
# my directors:
a:
smartuser
unseen


b:
forwardfile

c:
forwardfile

d:
localuser
unseen

userforward:
forwardfile

virtual_localuser: (this commented out)
aliasfile

virtual_alias:
aliasfile
no_more

db_user: (this commented out)
aliasfile

db_deliver:
aliasfile

I think I do something very very stupid, but have no idea why things go so
bad.

Robert