Re: [Exim] virtual users and .forward filters

Top Page
Delete this message
Reply to this message
Author: Nigel Wade
Date:  
CC: exim-users
Subject: Re: [Exim] virtual users and .forward filters
Alex Lomas wrote:
> Forgive me if the answer to this question is obvious, I have tried to find
> the answer!
>
> The situation is that I have a mix of "real" users on my box who have
> shell accounts and proper home directories, as well as some "virtual"
> users who just have mail accounts.
>
> I have separate localuser & virtual_user routers and transports which all
> works nicely. I also have a router setup for my real users that allows
> them to use a .forward file to do move mail around into their IMAP
> Maildirs as they like.
>
> I would like to setup a similar thing for my virtual users, primarily so
> that they can automagically filter mail marked as spam (via spamassassin)
> into spam folders in their IMAP/Maildir store. I created two routers to
> handle both in this order:
>
> userforward:
> driver = redirect
> allow_filter
> check_ancestor
> check_local_user
> directory_transport = address_directory
> no_expn
> file = $home/.forward
> no_verify
>
> virtual_userforward:
> driver = redirect
> allow_filter
> check_ancestor
> no_check_local_user
> user = courier
> group = mail
> directory_transport = address_directory
> no_expn
> file = /home/virtual/$domain/$local_part/.forward
> no_verify
>
>
> However, when they are both in, only the virtual_userforward router works
> (even though it's second in the list!), and I get errors for the
> userforward router (i.e. when a real user receives mail) similar to:
>
> 2004-02-09 19:07:21 1AqGkR-0008Ml-7R == alex@???
> R=virtual_userforward defer (-1): failed to stat
> /home/virtual/mydomain.com/myuser/. (No such file or directory)
>
> It seems to me that it's trying to deliver real users via the virtual
> users transports...
>
> Sorry it's gone on a bit, but does anyone have any ideas? Perhaps it would
> be better to define a system wide filter to move spam messages to spam
> folders, but I would ideally like the capabilioty for run virtual user
> .forward files as well.
>
> Many, many thanks in advance!
>
> --Alex
>
>


What's the contents of the myusers .forward file?

If Exim thinks that it's an address, won't it put that address back at the
beginning of the routers and try to route it? That may well then end up
being checked by the virtual_routers router.


--
Nigel Wade, System Administrator, Space Plasma Physics Group,
             University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@???
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555