Re: [Nagios-users] Only Nagios doesn't works with sendmail?

2010-07-25 Thread quanta

On 07/25/2010 09:17 PM, Marc Powell wrote:
> On Jul 25, 2010, at 12:11 AM, quanta wrote:
>
>   
>> Hi,
>>
>> I am using sendmail 8.13.8-8 with Gmail SMTP. 
>> sendmail works fine with OSSEC or test from command line, but it has problem 
>> with Nagios:
>>
>> sendmail[9026]: NOQUEUE: SYSERR(nagios): can not 
>> chdir(/var/spool/clientmqueue/): Permission denied 
>>
>> Add the smmsp user to nagios group, I get the another error:
>> 
> If you were going to try this, it would be the other way around (nagios in 
> the smmsp group), but that's the wrong thing to do either way.
>   
I alse tried but nothing changes:

/etc/group:smmsp:x:51:apache,nagios
/etc/group:nagios:x:503:apache,smmsp

>   
>> sendmail[26435]: NOQUEUE: SYSERR(nagios): can not write to queue directory 
>> /var/spool/clientmqueue/ (RunAsGid=0, required=51): Permission denied 
>>   
>> The permissions of related files:
>>
>>  
>> -rwxr-sr-x 1 root root 775064 Jun 29 23:46 /usr/sbin/sendmail
>> 
> You appear to have a broken sendmail on this machine. What's different 
> between the two? Shouldn't this be group 'smmsp'? Is sendmail's confRunAsUser 
> the same on both machines?
>
>
> --
> Marc
>   
Why does it still work with OSSEC or even from command line? There is no
difference between two: both of them run as smmsp user:

# grep -i runasuser /etc/mail/submit.cf
O RunAsUser=smmsp

>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Nagios-users mailing list
> Nagios-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting 
> any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
>   

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] Only Nagios doesn't works with sendmail?

2010-07-25 Thread Marc Powell

On Jul 25, 2010, at 12:11 AM, quanta wrote:

> Hi,
> 
> I am using sendmail 8.13.8-8 with Gmail SMTP. 
> sendmail works fine with OSSEC or test from command line, but it has problem 
> with Nagios:
> 
> sendmail[9026]: NOQUEUE: SYSERR(nagios): can not 
> chdir(/var/spool/clientmqueue/): Permission denied 
> 
> Add the smmsp user to nagios group, I get the another error:

If you were going to try this, it would be the other way around (nagios in the 
smmsp group), but that's the wrong thing to do either way.

> sendmail[26435]: NOQUEUE: SYSERR(nagios): can not write to queue directory 
> /var/spool/clientmqueue/ (RunAsGid=0, required=51): Permission denied 
>   
> The permissions of related files:
> 
>  
> -rwxr-sr-x 1 root root 775064 Jun 29 23:46 /usr/sbin/sendmail

You appear to have a broken sendmail on this machine. What's different between 
the two? Shouldn't this be group 'smmsp'? Is sendmail's confRunAsUser the same 
on both machines?


--
Marc


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


[Nagios-users] Only Nagios doesn't works with sendmail?

2010-07-24 Thread quanta
Hi,

I am using sendmail 8.13.8-8 with Gmail SMTP.
sendmail works fine with OSSEC or test from command line, but it has
problem with Nagios:

sendmail[9026]: NOQUEUE: SYSERR(nagios): can not
chdir(/var/spool/clientmqueue/): Permission denied

Add the *smmsp* user to *nagios* group, I get the another error:

sendmail[26435]: NOQUEUE: SYSERR(nagios): can not write to queue
directory /var/spool/clientmqueue/ (RunAsGid=0, required=51): Permission
denied
 
The permissions of related files:

-rwxr-sr-x 1 root root 775064 Jun 29 23:46 /usr/sbin/sendmail
 -rw-r--r-- 1 root root 59061 Jun 30 11:23 sendmail.cf
 -rw-r--r-- 1 root root 40336 Jun 30 12:18 submit.cf
 drwxrwx--- 2 smmsp smmsp 114688 Jul 22 22:00 /var/spool/clientmqueue/
 drwx-- 2 root mail 4096 Jul 22 22:24 /var/spool/mqueue/

Nagios only send mail if I changed the permission of
*/var/spool/clientmqueue* to 777, but it is a dirty solution and I got
the warning:

sendmail[30462]: dangerous permissions=40777 on queue directory
/var/spool/clientmqueue/

PS: Nagios on the another server works fine with 770 permission of
/var/spool/clientmqueue.

Can anyone help me?
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null