Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 425626 - mail-mta/sendmail-8.14.4 permission denied error while sending with default cf
Summary: mail-mta/sendmail-8.14.4 permission denied error while sending with default cf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-10 07:45 UTC by Sergey S. Starikoff
Modified: 2012-12-27 10:00 UTC (History)
0 users

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 Sergey S. Starikoff 2012-07-10 07:45:19 UTC
Not long ago while migrating system on new hardware (with sontware conf review) I've find, that sendmail fails to send/deliver mail.
I use amd64 stable branch:
mail-mta/sendmail
     Available versions:  8.14.4 ~8.14.5 ~8.14.5-r1 ~8.14.5-r2 {ipv6 ldap mbox nis sasl sockets ssl tcpd}
     Installed versions:  8.14.4(14:40:11 05.06.2012)(mbox ssl tcpd -ipv6 -ldap -nis -sasl -sockets)

Trying to send mail I get (see in mail.info log file) the following error:
Jul 10 10:15:55 ftn sendmail[21937]: q6A6FtbZ021937: to=test@mydomain.ru, ctladdr=myuser (1001/1001), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30043, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: 421 4.3.0 collect: Cannot write ./dfq6A6Ftdk021938 (bfcommit, uid=0, gid=209): Permission denied

Default sendmail.mc is:
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc,v 1.2 2004/12/07 01:59:31 g2boojum Exp $')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
MAILER(local)dnl
MAILER(smtp)dnl

Analysing this issue showed, that it is the result of missing TrustedUser in sendmail.cf.
root as such user is not a good idea, smmsp is.

So, changing sendmail.mc to:
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc,v 1.2 2004/12/07 01:59:31 g2boojum Exp $')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl
dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
dnl
define(`confTRUSTED_USER', `smmsp')
dnl
MAILER(local)dnl
MAILER(smtp)dnl

and building appropriate sendmail.cf solves this issue.
Comment 1 François Valenduc 2012-09-16 12:29:40 UTC
I can confirm this and adding define(`confTRUSTED_USER', `smmsp') to sendmail.mc indeed solves the problem.
Comment 2 Eray Aslan gentoo-dev 2012-12-27 10:00:24 UTC
+*sendmail-8.14.6 (27 Dec 2012)
+
+  27 Dec 2012; Eray Aslan <eras@gentoo.org>
+  +files/sendmail-8.14.6-build-system.patch, +files/sendmail.mc-r1,
+  +sendmail-8.14.6.ebuild:
+  Version bump - bug #448654. Add smmsp to TRUSTED_USER - bug #425626
+

Thank you for your report.