Léon Dignòn
2009-Apr-14 21:12 UTC
[Pkg-exim4-users] defer (-21): appendfile: file or directory name … is not absolute
Hello, using Debian and Exim 4 I extended /etc/update-exim4.conf.conf with this line: MAILDIR_HOME_MAILDIR_LOCATION=''/var/mail/$local_part'' Unfortunately I receive an error message: root at beispiel:~# echo "My letter" | mail -v -s "My Subject" contoso LOG: MAIN <= root at beispiel.de U=root P=local S=328 root at beispiel:~# delivering 1LtoeS-0003Ue-IH R: system_aliases for contoso at beispiel.de R: userforward for contoso at beispiel.de R: procmail for contoso at beispiel.de R: maildrop for contoso at beispiel.de R: lowuid_aliases for contoso at beispiel.de (UID 1000) R: local_user for contoso at beispiel.de T: maildir_home for contoso at beispiel.de LOG: MAIN == contoso at beispiel.de R=local_user T=maildir_home defer (-21): appendfile: file or directory name "''/var/mail/contoso''" is not absolute What is the problem? L?on
Andreas Metzler
2009-Apr-15 07:14 UTC
[Pkg-exim4-users] defer (-21): appendfile: file or directory name ... is not absolute
L?on Dign?n <leon.dignon at gmail.com> wrote:> using Debian and Exim 4 I extended /etc/update-exim4.conf.conf with > this line:> MAILDIR_HOME_MAILDIR_LOCATION=''/var/mail/$local_part''> Unfortunately I receive an error message:> root at beispiel:~# echo "My letter" | mail -v -s "My Subject" contoso[...]> LOG: MAIN > == contoso at beispiel.de R=local_user T=maildir_home defer (-21): > appendfile: file or directory name "''/var/mail/contoso''" is not > absolute> What is the problem?Removing the quotes ('') should work. cu andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.'' `I sew his ears on from time to time, sure''
Andreas Metzler
2009-Apr-15 15:48 UTC
[Pkg-exim4-users] defer (-21): appendfile: file or directory name ... is not absolute
On 2009-04-15 L?on Dign?n <leon.dignon at gmail.com> wrote: [...]> MAILDIR_HOME_MAILDIR_LOCATION=/var/mail/$local_part> *** This problem is solved, but I have another problem now! ***> Now I get this error message:> > == contoso at beispiel.de R=local_user T=maildir_home defer (13): Permission denied: cannot create /var/mail/contoso> But why?Because the permission settings of the maildir_home transport are customized for delivery to the users home directory. There the user may generate new files/directories, which is why the transport is simply run as the user. (No explicit setting, but simply because the routers all have check_local_user set.) OTOH on Debian /var/mail is usually 2775 root:mail (and you shouldn''t change to anything else, since mail handling aopplications on Debian usually exspect this setting.) To be able to generate a new file/directory in /var/mail the process therefore needs to run as group mail. [...]> I added > > user = mail > > group = mail > to the transport "maildir_home". I do not know if this is a good > solution. Maybe anybody can give me a comment to that.Undo the permission change of /var/mail and drop the user setting, delivering as the local_user is fine.> I am wondering if I missed some "best practice" or "Debian standard > solution" for the whole /var/mail/username/ thing, since I cannot > believe this configuration is rarely used.I am not aware of this being a often used setup. Historically /var/mail is used for mbox type mailboxes and programs expect these there. Putting mdir stuff in a different location therefore is imho natural. However my experience is very limited. cu andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.'' `I sew his ears on from time to time, sure''