Postfix sometimes does not write all the data to maillog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Postfix sometimes does not write all the data to maillog

Sohin Vyacheslav
Hi,

Sometimes when server is busy Postfix does not write all the data to
maillog. I see difference between data from maillog and content of file
with data in format: Date --From email --To email

It's seems that drops some info before writing to maillog i.e. maillog
does not contain every activity that Postfix does.

Maybe need to add some parameter in main.cf to force logging all info to
maillog?
Reply | Threaded
Open this post in threaded view
|

Re: Postfix sometimes does not write all the data to maillog

Bastian Blank-3
On Wed, Jan 24, 2018 at 12:19:39PM +0200, Sohin Vyacheslav wrote:
> Sometimes when server is busy Postfix does not write all the data to
> maillog.

Postfix does never write directly to the maillog.  This is delegated to
your syslog server.  If this one drops messages you have to fix it.

>          I see difference between data from maillog and content of file
> with data in format: Date --From email --To email

I have no idea what you are telling me.  Postfix does not log the
contents ot the From or To headers.

> It's seems that drops some info before writing to maillog i.e. maillog
> does not contain every activity that Postfix does.

Nope, it contains everything, apart from missconfiguration.

Bastian

--
Witch!  Witch!  They'll burn ya!
                -- Hag, "Tomorrow is Yesterday", stardate unknown
Reply | Threaded
Open this post in threaded view
|

Re: Postfix sometimes does not write all the data to maillog

Sohin Vyacheslav


24.01.2018 12:54, Bastian Blank пишет:
> On Wed, Jan 24, 2018 at 12:19:39PM +0200, Sohin Vyacheslav wrote:
>> Sometimes when server is busy Postfix does not write all the data to
>> maillog.
>
> Postfix does never write directly to the maillog.  This is delegated to
> your syslog server.  If this one drops messages you have to fix it.

sometimes in maillog exists many messages like this:
postfix/smtpd[17658]: warning: Connection concurrency limit exceeded: 51
from host[ip-address] for service smtp

--
Vyacheslav
Reply | Threaded
Open this post in threaded view
|

Re: Postfix sometimes does not write all the data to maillog

Sohin Vyacheslav
In reply to this post by Bastian Blank-3


24.01.2018 12:54, Bastian Blank пишет:
>>          I see difference between data from maillog and content of file
>> with data in format: Date --From email --To email
> I have no idea what you are telling me.  Postfix does not log the
> contents ot the From or To headers.
>

in master.cf exists line with php script which writes data in format:
Date --From email --To email to file:

smtp      inet  n       -       n       -       100       smtpd -o
content_filter=filter:dummy

filter    unix  -       n       n       -       -       pipe flags=F
user=apache argv=/usr/local/bin/filter.php ${sender} ${size}
${recipient} ${original_recipient}

--
Vyacheslav
Reply | Threaded
Open this post in threaded view
|

Re: Postfix sometimes does not write all the data to maillog

Wietse Venema
In reply to this post by Sohin Vyacheslav
Sohin Vyacheslav:

> Hi,
>
> Sometimes when server is busy Postfix does not write all the data to
> maillog. I see difference between data from maillog and content of file
> with data in format: Date --From email --To email
>
> It's seems that drops some info before writing to maillog i.e. maillog
> does not contain every activity that Postfix does.
>
> Maybe need to add some parameter in main.cf to force logging all info to
> maillog?

As others have pointed out, Postfix does not write syslog files.
Depending on your OS, logging is handled by system-effing-d, which
by default unhelpfully rate-limits logging.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Postfix sometimes does not write all the data to maillog

Sohin Vyacheslav


24.01.2018 13:56, Wietse Venema пишет:
> As others have pointed out, Postfix does not write syslog files.
> Depending on your OS, logging is handled by system-effing-d, which
> by default unhelpfully rate-limits logging.

i.e. need to adjust systemd logging settings?

--
Vyacheslav
Reply | Threaded
Open this post in threaded view
|

Re: Postfix sometimes does not write all the data to maillog

Wietse Venema
Wietse:
> As others have pointed out, Postfix does not write syslog files.
> Depending on your OS, logging is handled by system-effing-d, which
> by default unhelpfully rate-limits logging.

Sohin Vyacheslav:
> i.e. need to adjust systemd logging settings?

Unfortunately, systemd is not part of Postfix. Fortunately, there
are excellent web search engines that can help you find the answer.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Postfix sometimes does not write all the data to maillog

Sohin Vyacheslav


24.01.2018 14:06, Wietse Venema пишет:
>> i.e. need to adjust systemd logging settings?
> Unfortunately, systemd is not part of Postfix. Fortunately, there
> are excellent web search engines that can help you find the answer.

it's seems that rsyslogd writes a postfix log:
$ sudo lsof /var/log/maillog
COMMAND  PID USER   FD   TYPE DEVICE  SIZE/OFF   NODE NAME
rsyslogd 433 root    9w   REG  253,1 177428716 261519 /var/log/maillog


--
Vyacheslav
Reply | Threaded
Open this post in threaded view
|

Re: Postfix sometimes does not write all the data to maillog

Stephen Satchell
In reply to this post by Bastian Blank-3
On 01/24/2018 02:54 AM, Bastian Blank wrote:
> On Wed, Jan 24, 2018 at 12:19:39PM +0200, Sohin Vyacheslav wrote:
>> Sometimes when server is busy Postfix does not write all the data to
>> maillog.
> Postfix does never write directly to the maillog.  This is delegated to
> your syslog server.  If this one drops messages you have to fix it.
>

+1

My colleague found that there is a rate-limit parameter in the
implementation of syslog we were using, and he was exceeding that limit.
  It's a knob you can turn.

http://www.rsyslog.com/changing-the-settings/
Reply | Threaded
Open this post in threaded view
|

Re: Postfix sometimes does not write all the data to maillog

Sohin Vyacheslav


24.01.2018 15:34, Stephen Satchell пишет:
> My colleague found that there is a rate-limit parameter in the
> implementation of syslog we were using, and he was exceeding that limit.
>  It's a knob you can turn.
>
> http://www.rsyslog.com/changing-the-settings/

Thank you, Stephen I hope it will help...

--
Vyacheslav