Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot restart sendmail [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Majed17
Apprentice
Apprentice


Joined: 31 Aug 2011
Posts: 249
Location: Minsk, Belarus

PostPosted: Wed Aug 05, 2015 11:53 am    Post subject: cannot restart sendmail [solved] Reply with quote

here is the output:
Code:

gentoo ~ # /etc/init.d/sendmail restart
* Stopping sendmail ...
head: cannot open /var/run/sendmail.pid for reading: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] [ !! ]
* ERROR: sendmail failed to stop

when i create the file /var/run/sendmail.pid

it doesn't help:

Code:

gentoo ~ # /etc/init.d/sendmail restart
* Stopping sendmail ...
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] [ !! ]
* ERROR: sendmail failed to stop

in /var/log/messages :

Code:

Aug 4 15:31:30 localhost nagios[4392]: wproc: stderr line 01: Program mode requires special privileges, e.g., root or TrustedUser.
Aug 4 15:31:30 localhost nagios[4392]: wproc: stdout line 01: WARNING: RunAsUser for MSP ignored, check group ids (egid=1000, want=209)
Aug 4 15:31:30 localhost nagios[4392]: wproc: stdout line 02: can not chdir(/var/spool/clientmqueue/): Permission denied

here are the permissions:

gentoo ~ # ls -l /var/spool
total 16
Code:

drwxrwx--- 2 smmsp smmsp 4096 Aug 4 15:30 clientmqueue
drwxr-x--- 4 root cron 4096 Jul 31 16:50 cron
drwxrwsr-t 2 root mail 4096 Aug 4 12:45 mail
drwxrwxrwx 2 root mail 4096 Aug 4 15:02 mqueue

i tried unmerging sendmail and reinstalling it but that didn't help.

any idea what to look at?


Last edited by Majed17 on Wed Aug 12, 2015 6:48 am; edited 1 time in total
Back to top
View user's profile Send private message
Majed17
Apprentice
Apprentice


Joined: 31 Aug 2011
Posts: 249
Location: Minsk, Belarus

PostPosted: Wed Aug 12, 2015 6:04 am    Post subject: Reply with quote

the solution was to back up to fresh version of gentoo and when installing sendmail change the hosts file to include the hostname of the machine so that sendmail would start quickly.
for the permission error the solution is to,
set the directory /var/spool/mqueue to root:root and then,
Code:
chmod g+w /var/spool/mqueue
Back to top
View user's profile Send private message
Majed17
Apprentice
Apprentice


Joined: 31 Aug 2011
Posts: 249
Location: Minsk, Belarus

PostPosted: Wed Aug 12, 2015 6:48 am    Post subject: Reply with quote

i managed to reproduce the problem, when i added some folders to /etc/mail/ then sendmail would not restart saying missing .pid file. i removed the folder and restarted the system and it worked again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum