Hello,

Op 29-12-19 om 05:18 schreef @lbutlr:
On 28 Dec 2019, at 14:54, Richard Rasker <ras...@linetec.nl> wrote:
Everything went very smooth, and everything works (sending mail, receiving 
mail, authentication, certificates, IMAP folders showing in the mail client 
(Thunderbird)) -- except for the very last thing: received mail ends up in 
/var/spool/mail/[username] instead of the users' Maildir folders.
Postfix logs what happens to the message, and postfix says the message was 
delivered. Postfix its at that point out of the picture, and it is your courier 
setup that is not correct.
This may well be the case.

Also you say “identical setup” but obviously it cannot be actually identical. 
Why do you think it is identical?

I checked the following configuration files on both the old and the new server, and they are literally identical:

/etc/default/courier:

   # This file is automatically generated by maintainer scripts.
   # You may modifiy this file, but additional values and format
   # modifications will not be preserved.
   MAILDIR="Maildir"

/etc/default/maildroprc:

   logfile "/var/log/maildrop"
   VERBOSE="5"
   log "=========="

/etc/courier/authdaemonrc:

   ##VERSION: $Id: authdaemonrc.in,v 1.13 2005/10/05 00:07:32 mrsam Exp $
   [etc.]

/etc/courier/imapd:

   ##VERSION: $Id: imapd.dist.in,v 1.41 2008/06/21 16:01:23 mrsam Exp $
   [etc.]

Postfix' main.cf file has some minor differences with regard to tls and smtpd_client_restrictions, but those should not have any bearing on the final delivery of mail.

I could not locate any other configuration files -- and if there are any more, I never touched them on either machine.

It’s been a long time since I used Courier, but commenting out the mail drop 
line in main.cf and reloading postfix should disable mail drop. That is not 
going to fix your problem, but postfix will deliver the mail to your 
home_mailbox, assuming your users have a $HOME.

At one point, I had the entry

   mailbox_command=/usr/bin/maildrop

in main.cf, and when I executed

   # postconf -e "home_mailbox = Maildir/"

both mail.log and syslog threw this warning (and in multiple instances from several active processes):

   syslog.1:Dec 28 21:07:05 mail configure-instance.sh[5021]: postconf:
   warning: /etc/postfix/main.cf, line 81: overriding earlier entry:
   mailbox_command=/usr/bin/maildrop
   syslog.1:Dec 28 21:07:05 mail postmulti[5087]: warning:
   /etc/postfix/main.cf, line 81: overriding earlier entry:
   mailbox_command=/usr/bin/maildrop
   syslog.1:Dec 28 21:07:05 mail postmulti[5087]: postsuper: warning:
   /etc/postfix/main.cf, line 81: overriding earlier entry:
   mailbox_command=/usr/bin/maildrop
   [etc]

At the moment, these warnings no longer appear when restarting postfix, regardless of the main.cf entry wrt. home_mailbox -- I don't know why.

When you say no *significant* difference in conf files, that implies there is 
some difference. Your problem likely lies in those differences.
I haven't been able to identify any differences so far, except the ones in main.cf that I mentioned already.
Does maildrop log its actions?

It should -- but here I find a strange difference: the maildrop log on the new machine stays empty.

Receiving a message on the old machine results in the following maildrop log entry:

   ==========
   Date: Sun Dec 29 14:44:11 2019
   From: r...@linetec.nl
   Subj:
   File: /home/rr/./Maildir (806)

Yet nothing is logged at all in /var/log/maildrop on the new machine -- suggesting that maildrop isn't working properly there. Still, combing through syslog and other logs for 'maildrop' or even 'mail' does not reveal any relevant errors or warnings that may relate to this.

So here is a striking difference between the old and the new machine that I don't understand. Is there a way to figure out which process is actually dumping the mail in /var/spool/mail? Because if it is still maildrop, it isn't logging anything as it should.

Would it be safe to (temporarily) change something about /var/spool/mail (e.g. write permissions) to force an error message?

I could provide all configuration files (main.cf, master.cf), but I'm not sure 
which ones may be relevant, so I won't dump it all here right away.

Postfix configuration files are unlikely to help as the log line you posted 
shows postfix delivers the message to maildrop.

More likely you need help from a courier list?

That may be a very good idea. Thank you (and the others here) for your suggestions and support.

I'll try to find out what is happening -- although after almost two days of fruitless searching and tinkering, I am tempted to make a back-up of the current situation, totally purge postfix, courier, amavisd-new etc. from the machine, and start with a fresh installation of those packages.

I must have done something wrong early on, messing up or overlooking one tiny setting or so that I haven't found yet, but for the life of me I can't figure out what. I also documented any change I made that I thought was significant, but those notes don't tell me anything relevant either.

Still, if I find out what went wrong, I'll be sure to let you know.

Thanks again, best regards,

Richard

Reply via email to