Re: [exim] error when testing .mailfilter

Pàgina inicial
Delete this message
Reply to this message
Autor: Michael Worobcuk
Data:  
A: John Burnham
CC: exim users
Assumpte: Re: [exim] error when testing .mailfilter
> Yes, but the filter files there don't seem to have anything to do
> with Exim.
> They seem to be courier filter files.

ok. I changed that.

> What you need is (AFAICT) the router
>
> maildrop:
>    debug_print = "R: maildrop for $local_part@$domain"
>    driver = accept
>    domains = +local_domains
>    check_local_user
>    transport = maildrop_pipe
>    require_files = ${local_part}:${home}/.mailfilter:+/usr/bin/ 
> maildrop
>    no_verify
>    no_expn

>
> and its associated transport
>
> maildrop_pipe:
>    debug_print = "T: maildrop_pipe for $local_part@$domain"
>    driver = pipe
>    path = "/bin:/usr/bin:/usr/local/bin"
>    command = "/usr/local/bin/maildrop"
>    return_path_add
>    delivery_date_add
>    envelope_to_add

>

thanks :)

> Remember that routers are run in order so you might need to adjust
> the order in
> your config file.

yes. I tried to figure out how to put the routers.
Where does the debug_print = "T: maildrop_pipe for $local_part@
$domain" go ?

> Play around with exim -d -bt {email address} and see if you can
> work out what
> the issue is.


I did that.

Here is the result:


[hanno: /home/hanno]>sudo exim -d -bt xxx@???
Exim version 4.66 (FreeBSD 6.2) uid=0 gid=0 pid=1081 D=fbb95cfd
Probably Berkeley DB version 1.8x (native mode)
Support for: crypteq iconv() IPv6 use_setclassresources PAM Perl
OpenSSL Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
dnsdb dsearch mysql nis nis0 passwd
Authenticators: cram_md5 plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
changed uid/gid: forcing real = effective
uid=0 gid=0 pid=1081
auxiliary group list: 0
seeking password data for user "mailnull": using cached result
getpwnam() succeeded uid=26 gid=26
seeking password data for user "root": cache not available
getpwnam() succeeded uid=0 gid=0
configuration file is /usr/local/etc/exim/configure
log selectors = 00000ffc 00089001
trusted user
admin user
seeking password data for user "mailnull": cache not available
getpwnam() succeeded uid=26 gid=26
seeking password data for user "mailnull": using cached result
getpwnam() succeeded uid=26 gid=26
originator: uid=0 gid=0 login=root name=xxx xxxxxx
sender address = xxx@???
Address testing: uid=0 gid=6 euid=0 egid=6
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Testing xxx@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Considering xxx@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

routing xxx@???
--------> dnslookup router <--------
local_part=hanno domain=xxx@???
checking domains
xxx@??? in "@ : localhost : xxx@???"? yes  
(matched "@")
xxx@??? in "! +local_domains"? no (matched "!  
+local_domains")
dnslookup router skipped: domains mismatch
--------> system_aliases router <--------
local_part=hanno domain=xxx@???
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
   key="hanno" partial=-1 affix=NULL starflags=0
LRU list:
   :/etc/aliases
   End
internal_search_find: file="/etc/aliases"
   type=lsearch key="hanno"
file lookup required for hanno
   in /etc/aliases
lookup failed
expanded:
file is not a filter file
parse_forward_list:
system_aliases router declined for xxx@???
--------> userforward router <--------
local_part=hanno domain=xxx@???
checking for local user
seeking password data for user "hanno": cache not available
getpwnam() succeeded uid=1001 gid=0
checking "condition"
userforward router skipped: condition failure
--------> maildrop router <--------
local_part=hanno domain=xxx@???
checking domains
cached yes match for +local_domains
cached lookup data = NULL
xxx@??? in "+local_domains"? yes (matched  
"+local_domains" - cached)
checking for local user
seeking password data for user "hanno": using cached result
getpwnam() succeeded uid=1001 gid=0
R: maildrop for xxx@???
checking require_files
seeking password data for user "hanno": using cached result
getpwnam() succeeded uid=1001 gid=0
check subsequent files for access by hanno
file check: ${home}/.mailfilter
expanded file: /home/hanno/.mailfilter
stat() yielded 0
route_check_access(/home/hanno/.mailfilter,1001,0,4)
stat /usr
stat /usr/home
stat /usr/home/hanno
stat /usr/home/hanno/.mailfilter
route_check_access() succeeded
file check: +/usr/bin/maildrop
expanded file: /usr/bin/maildrop
stat() yielded -1
errno = 2
maildrop router skipped: file check    
--------------------------------------------------------- 
<<<<<<<<<<<<<<<<<<<<<<<<<<  what is that about ?
--------> spamcheck_router router <--------
local_part=hanno domain=xxx@???
checking for local user
seeking password data for user "hanno": using cached result
getpwnam() succeeded uid=1001 gid=0
R: Spamassassin for xxx@???
checking "condition"
calling spamcheck_router router
spamcheck_router router called for xxx@???
   domain = xxx@???
set transport spamcheck
queued for spamcheck transport: local_part = hanno
domain =xxx@???
   errors_to=NULL
   domain_data=NULL localpart_data=NULL
routed by spamcheck_router router
   envelope to: xxx@???
   transport: spamcheck
xxx@???
   router = spamcheck_router, transport = spamcheck
search_tidyup called


the maildrop router skipped. I don't know why.

Thanks again for helping me.

--
Michael