[exim] Problems forwarding outgoing mail

Top Page
Delete this message
Reply to this message
Author: Jorge Martin Torres
Date:  
To: exim-users
Subject: [exim] Problems forwarding outgoing mail
Hi there. I am new to exim and to the list, I have searched thoroughly
looking for an answer, with no success.
What I need to do sounds simple: forward ALL mail that originates from my
server to an external mailbox. In particular, I need to forward every e-mail
generated by the php mail() function, but I believe -and correct me if I'm
wrong- those are treated as every email only that created by "wwwuser" (the
user in which Apache runs from).
I have tried setting up a system-wide .forward file just containing the
email address to which mail has to be forwarded to, but that only throws me
incoming mail but not outgoing.

Thus, my /etc/exim/configure file has the following directive:

userforward:
driver = redirect
check_local_user
file = /root/.forward
no_verify
no_expn
check_ancestor
# allow_filter
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply

And /root/.forward just contains the email address, it is chmod'ed 755 and
is owned by root. If I chown it to 'wwwuser' or to 'exim', exim stops
forwarding incoming mail saying that the .forward file is owned by the wrong
user.

Do I need to uncomment the 'allow_filter' line and create a filter to do
this? If positive, what would that filter contain?

Any ideas will be greatly appreciated.
Thank you very much.
Nicolas