advertisement

Article:
  Learning the Terminal in Jaguar, Part 2
Subject:   sendmail doesn’t work after the 3-3-03 Security and 10.2.5 Upadate
Date:   2003-04-26 16:03:34
From:   anonymous2
problem 1 :


First I got this message :
« [Ordinateur-de-J-rg-Siegmund:/private/etc] jrgsiegm% can not chdir(/var/spool/clientmqueue) …


solution :
my directory is called « mqueue » and not « clientmqueue », so I changed « submit.cf » in /private/etc/mail with the pico-command.


First I added in page 3 the same thing as in sendmail.cf :
« ODontBlameSendmail=GroupWritableDirPathSafe » :


# level 10 config file format
V10/Berkeley


# override file safeties - setting this option compromises system security,
# addressing the actual file configuration problem is preferred
# need to set this before any file actions are encountered in the cf file
#O DontBlameSendmail=safe
O DontBlameSendmail=GroupWritableDirPathSafe
# default LDAP map specification
# need to set this now before any LDAP maps are defined
#O LDAPDefaultSpec=-h localhost


And than I changed the name of the queue directory : « mqueue » instead of « clientmqueue » :


# queue directory
O QueueDirectory=/var/spool/mqueue


Then I tested it :


[Ordinateur-de-J-rg-Siegmund:/private/etc] jrgsiegm% mail jrgsiegm
Subject: testtt
eeee
.
EOT
[Ordinateur-de-J-rg-Siegmund:/private/etc] jrgsiegm% can not chdir(/var/spool/mqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.


Solution :


chmod u-s /usr/sbin/sendmail
chmod g+s /usr/sbin/sendmail


Verification :
before :
[Ordinateur-de-J-rg-Siegmund:/usr/sbin] jrgsiegm% ls -l
total 31480
« … »
-r-sr-xr-x 1 root smmsp 588984 Apr 23 10:10 sendmail
« … »


after :
[Ordinateur-de-J-rg-Siegmund:/usr/sbin] jrgsiegm% ls -l
total 31480
« … »
-r-xr-sr-x 1 root smmsp 588984 Apr 23 10:10 sendmail
« … »


test :
[Ordinateur-de-J-rg-Siegmund:/usr/sbin] jrgsiegm% mail jrgsiegm
Subject: ed
dd
.
EOT
[Ordinateur-de-J-rg-Siegmund:/usr/sbin] jrgsiegm% collect: Cannot write ./dfh3Q984fv000846 (bfcommit, uid=501, gid=25): Permission denied
queueup: cannot create queue temp file ./tfh3Q984fv000846, uid=501: Permission denied



I have to go on :


Problem :no permission on
[Ordinateur-de-J-rg-Siegmund:/var/spool]
jrgsiegm% ls
Faxes appkit cups lock lpd mqueue output printing
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% ls -l
total 0
« … »
drwxr-x--- 2 root wheel 68 Mar 3 22:10 mqueue
« … »


solution :
changing permissions on « mqueue with chmod :
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% sudo chmod 770 mqueue
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% ls -l
« … »
drwxrwx--- 2 root wheel 68 Mar 3 22:10 mqueue
« … »


test :
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% mail jrgsiegm
Subject: yyyyy
ddd
.
EOT
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% can not write to queue directory /var/spool/mqueue/ (RunAsGid=25, required=0): Permission denied


solution : another chmod :


[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% sudo chmod 777 mqueue
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% ls -l
« … »
drwxrwxrwx 2 root wheel 68 Apr 26 19:54 mqueue
« … »



test
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% mail jrgsiegm
Subject: I’m tired
yeah
.
EOT
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/jrgsiegm": 1 message 1 new
>N 1 jrgsiegm@ordinateur- Sat Apr 26 19:54 16/801 "zert"
&
Message 1:
From jrgsiegm@ordinateur-de-j-rg-siegmund.local Sat Apr 26 19:54:16 2003
Date: Sat, 26 Apr 2003 19:54:15 +0200 (CEST)
From: Jörg Siegmund <jrgsiegm@ordinateur-de-j-rg-siegmund.local>
To: jrgsiegm@ordinateur-de-j-rg-siegmund.local
Subject: I’m tired


yeah


& q
Saved 1 message in mbox