Postfix permission issue

Hello all,

I am on v13.2 and installed the “icinga” package from official repos.

Before I started the service icinga, I checked that I was able to send an email using /usr/bin/mail (Postfix, correct?)

root # echo "Test this stuff out" | /bin/mail -s "Testering youfah" *******@gmail.com


I then started the service, icinga.

Icinga webpage was running great. I got a initial basic setup going.

So I decided to test. I shut off my SSH service in order to test and see if I am getting an error. Icinga shows the error, but when it emails, I am getting this from the icinga logs.

[1418023606] Auto-save of retention data completed successfully.[1418023952] SERVICE NOTIFICATION: icingaadmin;localhost;HTTP;WARNING;notify-service-by-email;HTTP WARNING: HTTP/1.1 403 Forbidden - 1251 bytes in 0.002 second response time
[1418023983] Warning: Contact 'icingaadmin' service notification command '/usr/bin/printf "%b" "***** Icinga *****

Notification Type: PROBLEM

Service: HTTP
Host: localhost
Address: 127.0.0.1
State: WARNING

Date/Time: Mon Dec 8 02:32:32 EST 2014

Additional Info:

HTTP WARNING: HTTP/1.1 403 Forbidden - 1251 bytes in 0.002 second response time
" | /usr/bin/mail -s "** PROBLEM Service Alert: localhost/HTTP is WARNING **" *******@gmail.com' timed out after 30 seconds
[1418023983] Warning: Breaking out of check result reaper: max reaper time (30) exceeded. Reaped 3 results, but more checkresults to process. Perhaps check core performance tuning tips?
[1418024113] SERVICE NOTIFICATION: icingaadmin;localhost;SSH;CRITICAL;notify-service-by-email;Connection refused
[1418024144] Warning: Contact 'icingaadmin' service notification command '/usr/bin/printf "%b" "***** Icinga *****

Notification Type: PROBLEM

Service: SSH
Host: localhost
Address: 127.0.0.1
State: CRITICAL

Date/Time: Mon Dec 8 02:35:13 EST 2014

Additional Info:

Connection refused
" | /usr/bin/mail -s "** PROBLEM Service Alert: localhost/SSH is CRITICAL **" *******@gmail.com' timed out after 30 seconds
[1418024144] Warning: Breaking out of check result reaper: max reaper time (30) exceeded. Reaped 1 results, but more checkresults to process. Perhaps check core performance tuning tips?


"/var/log/icinga/icinga.log" 47L, 8138C 

upon further inspection, I got this from journalctl, code in red I think is the main problem.

Dec 08 03:05:14 linux-qtm4 icinga[15065]: SERVICE ALERT: localhost;SSH;OK;HARD;4;SSH OK - OpenSSH_6.6.1 (protocol 2.0)Dec 08 03:05:14 linux-qtm4 icinga[15065]: SERVICE NOTIFICATION: icingaadmin;localhost;SSH;OK;notify-service-by-email;SSH OK - OpenSSH_6.6.1 (protocol 2.0)
Dec 08 03:05:14 linux-qtm4 icinga[15065]: postdrop: warning: mail_queue_enter: create file maildrop/224557.15905: Permission denied
Dec 08 03:05:14 linux-qtm4 postfix/postdrop[15905]: warning: mail_queue_enter: create file maildrop/224557.15905: Permission denied
Dec 08 03:05:24 linux-qtm4 icinga[15065]: postdrop: warning: mail_queue_enter: create file maildrop/224760.15905: Permission denied
Dec 08 03:05:24 linux-qtm4 postfix/postdrop[15905]: warning: mail_queue_enter: create file maildrop/224760.15905: Permission denied
Dec 08 03:05:34 linux-qtm4 icinga[15065]: postdrop: warning: mail_queue_enter: create file maildrop/225036.15905: Permission denied
Dec 08 03:05:34 linux-qtm4 postfix/postdrop[15905]: warning: mail_queue_enter: create file maildrop/225036.15905: Permission denied
Dec 08 03:05:41 linux-qtm4 kernel: SFW2-INext-DROP-DEFLT IN=enp5s0 OUT= MAC=33:33:00:00:00:fb:f8:1e:df:e5:2d:b5:86:dd SRC=fe80:0000:0000:0000:fa1e:dfff:fee5:2db5 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=72 TC=0 HOPLIMIT=1 FLOWLBL=0
Dec 08 03:05:45 linux-qtm4 icinga[15065]: Warning: Contact 'icingaadmin' service notification command '/usr/bin/printf "%b" "***** Icinga *****

Notification Type: RECOVERY

Service: SSH
Host: localhost
Address: 127.0.0.1
State: OK
Dec 08 03:05:45 linux-qtm4 icinga[15065]: Warning: Breaking out of check result reaper: max reaper time (30) exceeded. Reaped 1 results, but more checkresults to process. Perhaps check core performance tuning tips?
Dec 08 03:05:45 linux-qtm4 icinga[15065]: Warning: Contact 'icingaadmin' service notification command '/usr/bin/printf "%b" "***** Icinga *****

Notification Type: RECOVERY

Service: SSH
Host: localhost
Address: 127.0.0.1
State: OK
Dec 08 03:05:45 linux-qtm4 icinga[15065]: Warning: Breaking out of check result reaper: max reaper time (30) exceeded. Reaped 1 results, but more checkresults to process. Perhaps check core performance tuning tips?



So I test sending an email out as a normal user.

user #   echo "Test this stuff out" | /bin/mail -s "Testering youoompha" *******@gmail.com 
postdrop: warning: mail_queue_enter: create file maildrop/544044.23529: Permission deniedpostdrop: warning: mail_queue_enter: create file maildrop/544335.23529: Permission denied
postdrop: warning: mail_queue_enter: create file maildrop/544604.23529: Permission denied
postdrop: warning: mail_queue_enter: create file maildrop/544872.23529: Permission denied

I get that output.

Am I doing something wrong with permissions, or do I not know somethinga bout permissions that is causing this?

Thanks!

Scoured some more with my error output. I found this site.

http://jeffkarney.com/2013/01/15/fixing-postfix-permission-issues-linux/

from there, I shut down service and did the following

killall -9 postdrop
/usr/sbin/postfix set-permissions

Then restarted the service. I am getting desired output from icinga now. :slight_smile:
**
Comment: That site says to run some chgrp commands. I got some invalid group errors, so I omitted them from the code posted above in this post. Also, right now I consider this a “dirty fix”, because I don’t know why that worked, but it worked.
**

Thanks for that, I had same 100000s entries like that. 80mb journal with junk. Every 10 second a new entry!

 /usr/sbin/postfix set-permissions

was fix for me too.

https://bugzilla.novell.com/show_bug.cgi?id=729154 might be it? From 2011 but reopened.

In 2012 someone said AHHH!, here https://forums.opensuse.org/showthread.php/474289-Problems-with-Email-from-Cron-job?p=2458744#post2458744 same thing.

On 2014-12-08 10:06, cuchumino wrote:

> Before I started the service icinga, I checked that I was able to send
> an email using /usr/bin/mail (Postfix, correct?)

Nope; it should be “mailx”, a MUA. Postfix is the MTA.
Typically, “mail” should use “postfix service” to actually send the email.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Issue came up when switching from openSUSE 13.1 to 13.2. Was solved with invoking /usr/sbin/postfix set-permissions