Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using Ubuntu 11.10 (oneiric).

/var/log/mail keeps inflating on my server:

Aug  5 10:48:25 domU-12-31-39-0B-C4-54 sm-msp-queue[13360]: q71He1xw027248: to=postmaster, delay=3+17:03:10, xdelay=00:00:00, mailer=relay, pri=23074446, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Aug  5 10:48:25 domU-12-31-39-0B-C4-54 sm-msp-queue[13308]: q717K1wk024979: to=postmaster, delay=4+03:23:18, xdelay=00:00:00, mailer=relay, pri=25779463, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Aug  5 10:48:25 domU-12-31-39-0B-C4-54 sm-msp-queue[13360]: q71He1xx027248: to=postmaster, delay=3+17:03:10, xdelay=00:00:00, mailer=relay, pri=23075343, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
...

I am not using sendmail directly, and would prefer to disable it.

It seems sendmail cannot start:

$ sudo /etc/init.d/sendmail start 
* Starting Mail Transport Agent (MTA) sendmail
451 4.0.0 /etc/mail/sendmail.cf: line 100: fileclass: 
cannot open '/etc/mail/local-host-names': Group writable directory

I believe I have the correct permissions:

$ ls -ld /etc/mail/local-host-names
-rw-r--r-- 1 root root 52 2011-12-04 06:58 /etc/mail/local-host-names

But ... are the permissions on the parent folder ok?

g$ ls -ld / /etc /etc/mail
drwxr-xr-x 23 root  root  4096 2012-05-23 08:38 /
drwxrwxr-x 99 root  root  4096 2012-08-05 07:29 /etc
drwxr-sr-x  7 smmta smmsp 4096 2011-12-04 06:58 /etc/mail

I would want to either fix sendmail, or disable it. I tried:

$ sudo update-rc.d sendmail disable
update-rc.d: warning: sendmail start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: sendmail stop runlevel arguments (none) do not match LSB Default-Stop values (1)
 Disabling system startup links for /etc/init.d/sendmail ...
 Removing any system startup links for /etc/init.d/sendmail ...
   /etc/rc0.d/K19sendmail
   /etc/rc1.d/K19sendmail
   /etc/rc2.d/K79sendmail
   /etc/rc3.d/K79sendmail
   /etc/rc4.d/K79sendmail
   /etc/rc5.d/K79sendmail
   /etc/rc6.d/K19sendmail
 Adding system startup for /etc/init.d/sendmail ...
   /etc/rc0.d/K19sendmail -> ../init.d/sendmail
   /etc/rc1.d/K19sendmail -> ../init.d/sendmail
   /etc/rc6.d/K19sendmail -> ../init.d/sendmail
   /etc/rc2.d/K79sendmail -> ../init.d/sendmail
   /etc/rc3.d/K79sendmail -> ../init.d/sendmail
   /etc/rc4.d/K79sendmail -> ../init.d/sendmail
   /etc/rc5.d/K79sendmail -> ../init.d/sendmail

but my mail.log still gets the same errors.

Additional links I looked into:

share|improve this question
add comment

1 Answer

I believe you don't have the right permissions on /etc. It too cannot be group-writable. Try

sudo chmod g-w /etc

Does that help?

share|improve this answer
    
This helped me start sendmail, but the logs still are flowing at a huge rate (~ 10 each second). Perhaps I need to wait for the queue to be processed or restart the server. I still don't understand how to disable sendmail altogether. –  ripper234 Aug 9 '12 at 11:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.