Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292944 - mail-mta/sendmail-8.14.0: /var/spool/mqueue wrong owner & access mode
Summary: mail-mta/sendmail-8.14.0: /var/spool/mqueue wrong owner & access mode
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal with 1 vote (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-12 20:29 UTC by Jarry
Modified: 2012-07-17 10:11 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 Jarry 2009-11-12 20:29:49 UTC
sendmail takes care of creating some necessary directories, one of them is /mail/spool/mqueue. After clean installation it should be:

drwx------  2 root  root  4096 Nov 12 19:49 mqueue

But instead of that, it is:
drwxr-xr-x  2 smmsp root  4096 Nov 12 19:39 mqueue

Sendmail refuses (or can not) write emails and exits with error message:

421 4.3.0 collect: Cannot write ./dfnACK6CaU032612 (bfcommit, uid=0, gid=209): Permission denied

Reproducible: Always

Steps to Reproduce:
emerge -C ssmtp
emerge sendmail telnet-bsd
useradd -m -g users -s /bin/false testuser
/etc/init.d/sendmail start
telnet localhost 25

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 test ESMTP Sendmail 8.14.0/8.14.0; Thu, 12 Nov 2009 20:06:12 GMT
HELO localhost
250 test Hello [localhost], pleased to meet you
MAIL FROM:root@some.mydomain.com
250 2.1.0 root@some.mydomain.com... Sender ok
RCPT TO:testuser@localhost
250 2.1.5 testuser@localhost... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Test message.
.
421 4.3.0 collect: Cannot write ./dfnACK6CaU032612 (bfcommit, uid=0, gid=209): Permission denied
Connection closed by foreign host.

Actual Results:  
Message is not delivered, and stays in /var/spool/clientmqueue

Expected Results:  
Message should be delivered to $HOME/.maildir/new

Info from Sendmail Installation And Operation Guide:
...
1.3.7. /var/spool/mqueue
The directory /var/spool/mqueue should be created to hold the mail queue. This directory should be mode 0700 and owned by root.
...

So the fix is very simple:

chown root /var/spool/mqueue
chmod 700 /var/spool/mqueue

And it really works! :-)
Comment 1 Jarry 2009-11-12 20:35:40 UTC
Damned, I screwed the first line and even summary!
It should have been: /var/spool/mqueue   :-(
Comment 2 Eray Aslan gentoo-dev 2012-06-14 14:55:39 UTC
Is this still a problem?  I have

drwx------ 2 root  root  60 Jun 14 17:52 mqueue

after a fresh install with sendmail-8.14.5.
Comment 3 Sergey S. Starikoff 2012-07-17 10:11:11 UTC
(In reply to comment #2)
> Is this still a problem?  I have
> 
> drwx------ 2 root  root  60 Jun 14 17:52 mqueue
> 
> after a fresh install with sendmail-8.14.5.

AFAIR yes.
Not long ago I've find similiar issue.
See #425626