Re: Home directory owned by wrong user
Norbert Harrer <[email protected]> Thu, 2 Nov 2017 09:13:58 +0100
| Newsgroups | gmane.mail.maildrop |
|---|---|
| Message-ID | <[email protected]> |
Hi Sam. Thank you for your reply. And yes, you are right there has been a change in Debian. But it seems like the the other way around. Package courier-maildrop was replaced by the regular maildrop. I should have mentioned that. This was the message regarding it during upgrade: https://i.imgur.com/NZ3BsJy.png I followed those instructions (adding parameter -d "" and enabling DEFAULT="$HOME/Maildir" in /etc/maildroprc). But even if I take those changes back I have the same problem. Calling maildrop without -d gives the same error: > su daemon -s /bin/bash -c 'export HOME=/var/courier/nharrer; echo HOME=$HOME; maildrop -V5' < mail HOME=/var/courier/nharrer maildrop: Changing to /usr/sbin maildrop: Home directory owned by wrong user. maildrop works if I try running it as a different user which has a proper HOME-directory in /etc/passwd. But not for daemon which has /usr/sbin. It doesn't seem to respect $HOME (with or without DEFAULT="$HOME/Maildir" in /etc/maildroprc). What is the proper way to override the maildir location? Regards, Norbert On 02.11.2017 02:04, Sam Varshavchik wrote: > Norbert Harrer writes: > >> Hi. >> >> I am using courier and maildrop on Debian. I just upgraded to Debian >> Strech with following packages among others: >> >> maildrop 2.8.4-2 >> courier-mta 0.76.3-5 > > Debian had packaging issues in the past, in this area. It's not clear > which version of maildrop this is. There are two separate versions of > maildrop in existence, the one that comes with the Courier package and > is hardwired to be invoked by Courier; and the standalone maildrop > package, that's set up to be mail server-independent and can be used > with Postfix, Qmail, etc… > > For some time, Debian did not install maildrop that's bundled with > Courier, and always installed the standalone part. This resulted in > subtle breakage in some configurations, especially with the -d option > that you are using. The -d option should not be used when using > maildrop-bundled-with-courier, and maildrop should simply be invoked, > as is, from the .courier file. It knows where the mail should get > delivered to. > >> After the upgrade, mails stopped being delivered all of a sudden. I >> am getting following errors in the mail.log: > > I can't really tell what happened in your specific case; I don't keep > tabs on Debian packaging. > > You could've originally been using the psychotic courier-maildrop > combination, and relying on its broken behavior (which would work in > most common situations, …except when it doesn't…), and you upgraded to > the fixed build, that's set up properly; but the broken behavior no > longer works, and everything should work correctly if maildrop gets > simply invoked from the account's .courier file, as is (or is simply > specified as defaultdelivery). > > But if that were the case I would expect that the package names should > be in sync, and carry the same 0.76 version. That's what you get if > you build courier packages for Fedora or CentOS, using the rpm spec > file in the tarball. > > Or you could've started out with everything being in sync, and somehow > ended up installing the wrong set of packages now. > > A shot in the dark: look into whether Debian offers a > "courier-maildrop" package. If so, you should be able to simply > uninstall this non-Courier "maildrop" package, install the > courier-maildrop one, edit your .courier files and just maildrop > without any funky options. > >> /etc/maildroprc contains only one line: DEFAULT="$HOME/Maildir" > > That should not be needed either, if everything is set correctly. > >> The maildirs are therefore located at /var/courier/<user>/Maildir. >> >> authtest for mail account nharrer: >> >> > authtest nharrer >> Authentication succeeded. >> >>     Authenticated: nharrer (uid 1, gid 1) >>    Home Directory: /var/courier/nharrer > > This is correct. But if so, the DEFAULT="$HOME/Maildir" stuff you're > using is not needed, because that's default. > > With courier installed correctly, including the maildrop component, > none of that is needed. No -d option. no explicit DEFAULT setting. > > It does look to me like you were originally using the > courier/foreign-maildrop combo. And the Debian packages are now > corrected to package things properly, thanks to the Debian volunteer – > but it does look like upgrading breaks things, that likely requires a > manual fix. > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Courier-maildrop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/courier-maildrop ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Courier-maildrop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/courier-maildrop