Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43375 - Postfix ebuild brokenness: 1) malfunctioning smtpd, 2) invalid path to Cyrus
Summary: Postfix ebuild brokenness: 1) malfunctioning smtpd, 2) invalid path to Cyrus
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-01 06:27 UTC by Janne Pikkarainen
Modified: 2004-03-10 13:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janne Pikkarainen 2004-03-01 06:27:17 UTC
Postfix ebuild seems to have two pretty major glitches. 

1) By default smtpd is put in chroot=y mode in /etc/postfix/master.cf. That would require a chrooted /etc directory (/var/spool/postfix/etc/) with some files from real /etc in it, but currently that does not get created.

The following files are needed in chrooted /var/spool/postfix/etc/:

---
hosts
localtime
nsswitch.conf
passwd
resolv.conf
services
---

Lack of those files means that technically Postfix can startup and receive mail, but is unable to send any mail, complaining "smtpd died" in system logs.

* * *

2) Invalid path to Cyrus in /etc/postfix/master.cf:

By default Cyrus deliver method has invalid arguments line in master.cf:

---
  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
---

The argv portion should be "argv=/usr/cyrus/bin/deliver". 

Currently out-of-the-box Postfix+Cyrus installation in Gentoo leads to "Fatal: Command /cyrus/bin/deliver not found" bounce messages when trying to receive mail and "smtpd died" when trying to send mail. That's not the idea, uh? ;-)


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Max Kalika (RETIRED) gentoo-dev 2004-03-01 08:58:39 UTC
1) I'm pretty sure postfix opens all those files before chroot. It works here without any problems. It would help to see any errors that lead you to this conclusion.

2) The deliver program is only used for those MTAs that do not support LMTP. I'm fairly certain that out-of-the-box master.cf file comes properly configured to use LMTP and is the preferred way of delivering to cyrus.  The other problem is that I fixed cyrus to properly install in /usr/lib/cyrus instead of /usr/cyrus for version 2.2.x to be more gentoo compliant.  I'm thinking we should pull out the whole "cyrus" configuration out of master.cf, to force people to use LMTP.

I'm going to close this, as none of this is really fixable at this point and not really a bug anyway.
Comment 2 Janne Pikkarainen 2004-03-01 09:10:20 UTC
Ok. Maybe 1) then has something to do with the fact I use grsecurity (without any chroot restrictions), but anyway without creating /var/spool/postfix/etc/ and copying the files there by hand I get messages like this to maillog and mail doesn't get sent out, that's for sure:

---
Jan 20 18:13:01 xxxxxx postfix/master[2739]: warning: process /usr/lib/postfix/smtpd pid 11138 exit status 1
Jan 20 18:13:01 xxxxxx postfix/master[2739]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
---
Comment 3 Christof Schulze 2004-03-10 05:19:56 UTC
Jan 20 18:13:01 xxxxxx postfix/master[2739]: warning: process /usr/lib/postfix/smtpd pid 11138 exit status 1
Jan 20 18:13:01 xxxxxx postfix/master[2739]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

ICh erhalte die gleichen Fehlermeldungen, verwende allerdings weder grsecurity noch sasl

Die Fehlermeldungen sind "spontan" aufgetreten. Seit etwa einem Jahr l
Comment 4 Christof Schulze 2004-03-10 05:19:56 UTC
Jan 20 18:13:01 xxxxxx postfix/master[2739]: warning: process /usr/lib/postfix/smtpd pid 11138 exit status 1
Jan 20 18:13:01 xxxxxx postfix/master[2739]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

ICh erhalte die gleichen Fehlermeldungen, verwende allerdings weder grsecurity noch sasl

Die Fehlermeldungen sind "spontan" aufgetreten. Seit etwa einem Jahr läuft postfix, seit FEbruar die 2.0.16-r1. meine main.cf ist seitdem "konstant" geblieben und meine master.cf habe ich auf nen content-filter angepasst.
Auch ein remerge von postfix brachte keine Hilfe, ein update auf versopn 2.0.18 brachte auch keine Hilfe.
Comment 5 Max Kalika (RETIRED) gentoo-dev 2004-03-10 07:29:10 UTC
Can anybody translate that last post into english?
Comment 6 Christof Schulze 2004-03-10 13:03:30 UTC
I am sorry to have posted in german. My post says that I get the same error without using sasl or grsecurity. Even remergin postfix version 2.0.18 did not help here.
Also it says that I did not change my configuration since february, so the error was spontaneous.

But the problem is semi-solved: It went away after rebooting.
This is the real weird part! Still I would like to know what caused this to prevent it from happening again.