[Exim] Configuration hack needed. Is it valid what I am tryi…

Top Page
Delete this message
Reply to this message
Author: Philip Hofstetter
Date:  
To: exim-users
Subject: [Exim] Configuration hack needed. Is it valid what I am trying to do?
Hi all,

first, and once again, let me thank you Phil, for your extremely cool
Exim. It's flexibility allowed me to create a database-driven (MySQL)
Mail-System with unlimited domains, users and aliases (using Courier
with a self-written authdaemon as IMAP-Server; for those that are
german-speaking: I made a german documentation of the needed steps
public at http://www.pilif.ch/mail.txt).

Now to my problem: I was thinking of adding user-filters to my
configuration and run into a strange problem with $home, which I could
work around using file_directory together with an absolute file-option
in the director using the userforward-driver.

I have the following configuration:

Mails are in /var/spool/pmail/<<sitename>>/<<username>>

(where sitename is comparable to a domain-name, but can have an
unlimited amount of domains assigned to it).

The Filter-Files I'd like to have in

/etc/pmail/<<sitename>>/<<username>>.filter

(no user can directly edit his/her filter. Everything is done via a
web-interface (a plugin for the current developement-version of IMP that
converts imp-filters to exim-Filter-Files), so this path is ok).

Now: How can I specify the delivery-root in my filter-file without
having to give the full path?

$home was empty as there is no local-user assigned with the user and
file_directory can, when following the documentation, not be used, as
filters and the delivery-root are at complete different places.

watching exim -d9 -t failing when trying to deliver to NULL/.foldername/
was quite funny but not really what I wanted ;-) [in case you ask: the
dot in .foldername is because of the format Courier uses to store
folders in its spool]

So I came to this quite obscure hack, setting file_directory to
/var/spool/pmail/<<sitename>>/<<username>> and giving the file-option an
absolute path anyway: /etc/pmail/<<sitename>>/<<username>>.filter. This
leads $home in the filter-file to be the correct path.

This is obviously against the documentation (there are only relative
paths used), but it works quite well. So my question: Is this ok? Or is
there a better solution?

Many thanks!

Philip