thomas
2010-Sep-01 07:56 UTC
[Pkg-exim4-users] dc_localdelivery=''maildir_home'' has no effect?
Hello I ran dpkg-reconfigure exim4-config to set up exim4 for local delivery only (msmtp takes care for the rest). In /etc/exim4/update-exim4.conf.conf, I have: dc_localdelivery=''maildir_home'' However, when I send an email as root to root (for testing), it goes to /var/mail/mail, not to /root/Maildir. I do not understand why. Any clue? Thanks Thomas
Andreas Metzler
2010-Sep-01 17:18 UTC
[Pkg-exim4-users] dc_localdelivery=''maildir_home'' has no effect?
thomas <thomas.bsd at gmail.com> wrote:> I ran dpkg-reconfigure exim4-config to set up exim4 for local delivery > only (msmtp takes care for the rest). In > /etc/exim4/update-exim4.conf.conf, I have:> dc_localdelivery=''maildir_home''> However, when I send an email as root to root (for testing), it goes > to /var/mail/mail, not to /root/Maildir. I do not understand why. Any > clue?root is a particulry bad testcase if you did not redcirect it with /etc/aliases. /usr/share/doc/exim4-config/README.Debian.gz 4.3. No deliveries to root! No Exim 4 version released with any Debian OS can run deliveries as root. If you don''t redirect mail for root via /etc/aliases to a nonprivileged account, the mail will be delivered to /var/mail/mail with permissions 0600 and owner mail:mail. This redirection is done by the mail4root router which is last in the list and will thus catch mail for root that has not been taken care of earlier. cu andreas
thomas
2010-Sep-01 18:57 UTC
[Pkg-exim4-users] dc_localdelivery=''maildir_home'' has no effect?
2010/9/1 Andreas Metzler <ametzler at downhill.at.eu.org>:> thomas <thomas.bsd at gmail.com> wrote: >> However, when I send an email as root to root (for testing), it goes >> to /var/mail/mail, not to /root/Maildir. I do not understand why. Any >> clue? > > root is a particulry bad testcase if you did not redcirect it with /etc/aliases. > > /usr/share/doc/exim4-config/README.Debian.gz > 4.3. No deliveries to root!Thanks Andreas. I had "root: " with no redirection in /etc/aliases. But changing this line to "root: jdoe" did not solve the problem. Now mail to root (and to jdoe) go to /var/mail/jdoe, not to /home/jdoe/Maildir. Is it normal? Did I miss something? Thomas
Andreas Metzler
2010-Sep-02 17:24 UTC
[Pkg-exim4-users] dc_localdelivery=''maildir_home'' has no effect?
thomas <thomas.bsd at gmail.com> wrote:> 2010/9/1 Andreas Metzler <ametzler at downhill.at.eu.org>: >> thomas <thomas.bsd at gmail.com> wrote: >>> However, when I send an email as root to root (for testing), it >>> goes to /var/mail/mail, not to /root/Maildir. I do not understand >>> why. Any clue?>> root is a particulry bad testcase if you did not redcirect it with >> /etc/aliases.>> /usr/share/doc/exim4-config/README.Debian.gz >> 4.3. No deliveries to root!> Thanks Andreas. I had "root: " with no redirection in /etc/aliases. > But changing this line to "root: jdoe" did not solve the problem. Now > mail to root (and to jdoe) go to /var/mail/jdoe, not to > /home/jdoe/Maildir. Is it normal? Did I miss something?What does /usr/sbin/exim4 -bt jdoe say? cu andreas
thomas
2010-Sep-03 09:47 UTC
[Pkg-exim4-users] dc_localdelivery=''maildir_home'' has no effect?
2010/9/2 Andreas Metzler <ametzler at downhill.at.eu.org>:>> Thanks Andreas. I had "root: " with no redirection in /etc/aliases. >> But changing this line to "root: jdoe" did not solve the problem. Now >> mail to root (and to jdoe) go to /var/mail/jdoe, not to >> /home/jdoe/Maildir. Is it normal? Did I miss something? > > What does > /usr/sbin/exim4 -bt jdoe > say?R: system_aliases for jdoe at localbox.somewhere.tld R: userforward for jdoe at localbox.somewhere.tld R: procmail for jdoe at localbox.somewhere.tld jdoe at localbox.somewhere.tld router = procmail, transport = procmail_pipe Thanks for putting me on the right track. I forgot that exim was calling procmail. John Doe''s ~/.procmailrc had only the following lines: MAILDIR=/home/jdoe/mail/mailboxes :0: $1/ ... The $1 arg is given by /home/jdoe/.fetchmailrc: For instance: # Put mail in /home/jdoe/mail/mailboxes/amailbox mda ''/usr/bin/procmail -a amailbox I added a filter in /home/jdoe/.procmailrc: :0: * ^To:.*localbox.somewhere.tld$ local/new This puts the local mail in /home/jdoe/mail/mailboxes/local, which solves my problem. There is just one thing I do not understand. For the non-local mail, I simply indicate "mailboxname" and procmail is clever enough to catch that it is a maildir mailbox and it puts mail in "mailboxname/new". But for local mail, I have to tell procmail to put mail in "mailboxname/new". Not a big thing, but I do not see the logic in this. Jedenfalls vielen Dank Thomas
Andreas Metzler
2010-Sep-03 17:03 UTC
[Pkg-exim4-users] dc_localdelivery=''maildir_home'' has no effect?
thomas <thomas.bsd at gmail.com> wrote: [...]>>> mail to root (and to jdoe) go to /var/mail/jdoe, not to >>> /home/jdoe/Maildir. Is it normal? Did I miss something?[...]> John Doe''s ~/.procmailrc had only the following > lines:> MAILDIR=/home/jdoe/mail/mailboxes> :0: > $1/> ... The $1 arg is given by /home/jdoe/.fetchmailrc: > For instance: > # Put mail in /home/jdoe/mail/mailboxes/amailbox > mda ''/usr/bin/procmail -a amailbox[...] My procmail days are a thing of the past, but perhaps I can be of assistance. If exim invokes procmail there is no -a option and $1 is unset and procmail ends up with "/" as desitination. It does not seem to regard that as a vaild destination and falls back to delivery to DEFAULT (which is /var/mail/$LOGNAME. Setting DEFAULT=local/ might fix your problem. cu andreas