[Exim] Virtual filtering?

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Tim
Datum:  
To: exim-users
Betreff: [Exim] Virtual filtering?
Hello..

I have Exim4 configured for virtual accounts, domains, etc, using mysql for
lookups, courier-* for serving up the mail, etc.

Local users are able to make use of a .forward to filter mail, forward mail
to another address, etc.

I have been trying to expand this functionality to virtual address' that I
host as well.

I'm using Debian.. nothing custom built (save the configuration files, of
course).

I have a few routers handling e-mail alias', filtering (for virtual
accounts), and virtual delivery (in that order).

It seems that whenver an e-mail is recieved to any virtual address, exim
completely skips the virtual filtering, and continues with regular delivery
(dropping the e-mail in the inbox).

My filter router looks like this:
virtual_filter:
driver = redirect
allow_filter
debug_print = "R: virtual forward for $local_part@$domain"
user=Debian-exim
group=Debian-exim
data = ${lookup mysql {select filter from users where
id='$local_part@$domain'}}
router_home_directory = ${lookup mysql {select home from users where
id='$local_part@$domain'}}
directory_transport = address_directory

A test filter I have reads:
# Exim filter

if $h_subject: contains "test"
then save Maildir/.temp/

endif


I should mention that I have tried the user/group as nobody/nogroup, however
I get an error to the effect of "unable to set gid=65534 or uid=65534
(euid=111): virtual_filter router"... nobody/nogroup seems to be who
courier likes having the virtual mail owned by, so to me, it made sense to
set things that way. I was wrong though, apparantly :)

So, I tried setting the user and group to be Debian-exim (the user who runs
exim.. kinda obvious, but.. you know).. and I get :
1BFELb-0006I7-ED == /var/virtual/example.com/user/Maildir/.temp/
<user@???> R=virtual_filter T=address_directory defer (13):
Permission denied: stat() error for
/var/virtual/example.com/user/Maildir/.temp/: Permission denied

But, at least its not giving me internal error (which it has with other
various configurations).

I'm not really certain where to go from here, as far as triyng to figure out
how to make this thing dance...

I should also mention that if I send a test e-mail that does not get caught
by a rule in the filter (an e-mail without the word "test" in it), it is
delivered without a problem.

Any help or direction would be greatly appreciated :)

Thanks,

Tim