begin acl
acl_check_rcpt:
accept
acl_check_data:
accept
begin routers
test1:
driver = accept
transport = test2
begin transports
test2:
driver = appendfile
file = /var/mail/$local_part
group = mail
-- STOP --
It should deliver emails to local files. That files - according to
documentation - should be created as the user to whom the email is address.
For instance, if an email is addressed to "janek@???", it should be
written to /var/mail/janek. This file should be owned by user "janek".
However, the file /var/mail/janek is being created as user "exim". When I run
exim in debug mode, it says:
(...)
12516 >>>>>>>>>>>>>>>> Local deliveries >>>>>>>>>>>>>>>>
12516 --------> janek@??? <--------
12516 locking /var/spool/exim/db/retry.lockfile
12516 locked /var/spool/exim/db/retry.lockfile
12516 EXIM_DBOPEN(/var/spool/exim/db/retry)
12516 returned from EXIM_DBOPEN
12516 opened hints database /var/spool/exim/db/retry: flags=O_RDONLY
12516 dbfn_read: key=T:janek@???
12516 no retry record exists
12516 search_tidyup called
12517 changed uid/gid: local delivery to janek <janek@???>
transport=test2
12517 uid=93 gid=12 pid=12517
12517 auxiliary group list: <none>
12517 home=NULL current=/
(...)
UID 53 is user "exim", not "janek".
When I add option "user = $local_part", everything works ok, but I don't
understand why it does not work like that without that option. I thought such
behaviour is the default one.