Re: Postfix-fg and maillog_file to stdout

2021-11-07 Thread Viktor Dukhovni
> On 7 Nov 2021, at 3:08 pm, Rafael Azevedo wrote: > > Yes I can, but only if you send me the config files you want the results for. > It will be a pleasure. I'm afraid there aren't any "config" files I can send you. I had assumed that you know or can find out how to temporarily disable AppArmor

Re: Postfix-fg and maillog_file to stdout

2021-11-07 Thread Rafael Azevedo
Yes I can, but only if you send me the config files you want the results for. It will be a pleasure. Em sáb., 6 de nov. de 2021 às 12:28, Viktor Dukhovni < postfix-us...@dukhovni.org> escreveu: > > On 5 Nov 2021, at 5:14 pm, Rafael Azevedo wrote: > > > > POSTFIX logs using DOCKER non-chrooted an

Re: Postfix-fg and maillog_file to stdout

2021-11-07 Thread Rafael Azevedo
Let me know if you need any help. []s Em sáb., 6 de nov. de 2021 às 10:31, Curtis Maurand escreveu: > > Perfect. That was the other solution I had been looking at. > > ==C >

Re: Postfix-fg and maillog_file to stdout

2021-11-06 Thread Viktor Dukhovni
> On 5 Nov 2021, at 5:14 pm, Rafael Azevedo wrote: > > POSTFIX logs using DOCKER non-chrooted and message_file=/dev/sdtout Do you think you'll be able to report results for all the combinations? * AppArmor on/off * Chroot on/off for qmgr * Chroot on/off for delivery agents -- Viktor.

Re: Postfix-fg and maillog_file to stdout

2021-11-06 Thread Curtis Maurand
Perfect. That was the other solution I had been looking at. ==C On Sat, 2021-11-06 at 10:25 -0300, Rafael Azevedo wrote: > Since it was a container, I was not running any syslog, just using > the log modules from docker.This is a sample output from postfix > stdout. > I fixed it using syslog-ng

Re: Postfix-fg and maillog_file to stdout

2021-11-06 Thread Rafael Azevedo
Since it was a container, I was not running any syslog, just using the log modules from docker. This is a sample output from postfix stdout. I fixed it using syslog-ng within the container. Em sáb., 6 de nov. de 2021 às 09:56, Curtis Maurand escreveu: > On Fri, 2021-11-05 at 13:34 -0300, Rafael

Re: Postfix-fg and maillog_file to stdout

2021-11-06 Thread Curtis Maurand
On Fri, 2021-11-05 at 13:34 -0300, Rafael Azevedo wrote: > One last thing, is it possible to change the date format of the > output? > Current format: > Nov 05 13:20:06 smtp21 postfix/smtp[136]: 9D86C60BBE > > I'd like to use ISO format: > 2021-10-29T19:37:52.017684-03:00 smtp21 postfix/smtp > >

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Michael Ströder
On 11/5/21 21:49, Viktor Dukhovni wrote: Therefore, I would like to see reports of what you find: [..] * With AppArmor on or off [..] If auditd is installed and running AppArmor logs to audit logs. So examining these logs might help to check whether AppArmor is blocking something: grep

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Viktor, Sure, you may count on me for this! POSTFIX logs using DOCKER non-chrooted and message_file=/dev/sdtout Output extracted using "docker logs container-name" Nov 05 18:09:53 smtp41 postfix/smtpd[390]: connect from smtp41.myisp.com [A.B.C.D] Nov 05 18:09:53 smtp41 postfix/smtpd[390]: 294FC

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Viktor, I was able to use ISO-DATE format through SYSLOG-NG, but lost the milliseconds. This is a non-chroot smtp log using syslog-ng 2021-11-05T17:51:25.00-03:00 smtp21 postfix/smtp 251 - [meta sequenceId="77"] 8323E60BE3: to=, relay= hotmail-com.olc.protection.outlook.com[104.47.57.161]:25

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Viktor Dukhovni
> On 5 Nov 2021, at 4:37 pm, Rafael Azevedo wrote: > > Thanks for the reply! > > SELinux is off, but AppArmor on. > > Any further suggestions? Since we want to understand the handling of unix-domain sockets in container + chroot setups beyond just the immediate question of logging to stdout, i

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Hi Viktor, Thanks for the reply! SELinux is off, but AppArmor on. Any further suggestions? Thanks Em sex., 5 de nov. de 2021 às 17:20, Viktor Dukhovni < postfix-us...@dukhovni.org> escreveu: > On Fri, Nov 05, 2021 at 12:00:56PM -0400, Wietse Venema wrote: > > Rafael Azevedo: > > > After disabl

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Wietse, I truly appreciate your effort and help here. But please, don't worry. I've got it working and was able to sort data using meta_sequenceId from syslog. Don't know why syslog is not showing milliseconds correctly, it shows .00 (using frac-digits(6)) on docker pods. I have no idea where t

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Viktor Dukhovni
On Fri, Nov 05, 2021 at 12:00:56PM -0400, Wietse Venema wrote: > Rafael Azevedo: > > After disabling chroot, it worked! > > LINUX bites, if chroot breaks relative pathnames for UNIX-domain > DGRAM sockets. As a test, I'd suggest instead of disabling chroot for the delivery agents, to also enable

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Wietse Venema
Rafael Azevedo: > Linux docker-1 4.15.0-161-generic #169-Ubuntu SMP Fri Oct 15 13:41:54 UTC > 2021 x86_64 x86_64 x86_64 GNU/Linux Is there an ISO download site? I don't have Kernel 4.15 but I could byukld a VM for it. Wietse

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Linux docker-1 4.15.0-161-generic #169-Ubuntu SMP Fri Oct 15 13:41:54 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Em sex., 5 de nov. de 2021 às 14:09, Wietse Venema escreveu: > Rafael Azevedo: > > One last thing, is it possible to change the date format of the output? > > > > Current format: > > Nov

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Wietse Venema
Rafael Azevedo: > One last thing, is it possible to change the date format of the output? > > Current format: > Nov 05 13:20:06 smtp21 postfix/smtp[136]: 9D86C60BBE > > I'd like to use ISO format: > 2021-10-29T19:37:52.017684-03:00 smtp21 postfix/smtp See my reply in the quoted message below. W

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
One last thing, is it possible to change the date format of the output? Current format: Nov 05 13:20:06 smtp21 postfix/smtp[136]: 9D86C60BBE I'd like to use ISO format: 2021-10-29T19:37:52.017684-03:00 smtp21 postfix/smtp Could that be possible? Thanks Em sex., 5 de nov. de 2021 às 13:10, Rafa

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Thanks Wietse, After disabling chroot, everything worked just as expected. Thanks a lot guys. BR, R Em sex., 5 de nov. de 2021 às 13:01, Wietse Venema escreveu: > Rafael Azevedo: > > After disabling chroot, it worked! > > LINUX bites, if chroot breaks relative pathnames for UNIX-domain > DGRA

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Wietse Venema
Rafael Azevedo: > After disabling chroot, it worked! LINUX bites, if chroot breaks relative pathnames for UNIX-domain DGRAM sockets. (If chroot broke relative pathnames for UNIX-domain STREAM sockets, there should have been lots of bug reports already). > Any clue about how can I have millisecon

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
After disabling chroot, it worked! Any clue about how can I have milliseconds in this output? Huge thanks. Em sex., 5 de nov. de 2021 às 12:34, Rafael Azevedo escreveu: > This is the maillog_file=/dev/stdout output: > > Nov 05 11:07:15 smtp21 postfix/qmgr[421]: 8A78016204F: from=< > raf...@xxx

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
This is the maillog_file=/dev/stdout output: Nov 05 11:07:15 smtp21 postfix/qmgr[421]: 8A78016204F: from=, size=598, nrcpt=1 (queue active) Nov 05 11:07:15 smtp21 postfix/qmgr[421]: 8A78016204F: removed Nov 05 11:07:16 smtp21 postfix/qmgr[421]: DD37C16204F: from=, size=588, nrcpt=1 (queue active)

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Sorry about that, I was testing the timestamp withing mail.log. root@smtp21:/# postconf -nf alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no compatibility_level = 2 inet_interfaces = all inet_protocols = all mailbox_size_limit = 0 maillog_file =

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Wietse Venema
There is no maillog file setting. I need to see the configuration that reproduces the problem, not a verbal description from faulty memmory. That said, I see that your chroot settings differ for qmgr and smtp delivery agents. This should not matter because Postfix opens socket pathnames relative t

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
root@smtp21:/# ps aux USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 2612 608 pts/0Ss+ 10:50 0:00 sh -c service syslog-ng start ; /root/start.sh ; tail -f /var/log/mail.log root33 0.0 0.0 3980 3084 pts/0S+ 10:50 0:00

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Wietse Venema
Rafael Azevedo: > Yes I did. > Thanks a lot for the help here. > As you can see, this is exactly the subject of this message: postfix-fg and > stdout. :) > But the output shows only qmgr logs. All others are suppressed. > Any ideas? Let's stop further guessing games. What is the output from: post

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Yes I did. Thanks a lot for the help here. As you can see, this is exactly the subject of this message: postfix-fg and stdout. :) But the output shows only qmgr logs. All others are suppressed. Any ideas? Thanks Em sex., 5 de nov. de 2021 às 11:39, escreveu: > > I've set the maillog_file to stdo

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread postfix
I've set the maillog_file to stdout but I don't get other logs (mainly the delivery log comming from smtp process). It just shows qmgr logs in the output. Did you see in the docs about the start up requirement? Stdout logging requires that Postfix is started with "postfix start-fg". If y

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Thanks for the reply. I've set the maillog_file to stdout but I don't get other logs (mainly the delivery log comming from smtp process). It just shows qmgr logs in the output. Thanks Em sex., 5 de nov. de 2021 às 11:28, escreveu: > > I'm running postfix on containers and have set logging to s

Re: Postfix-fg and maillog_file to stdout

2021-11-05 Thread postfix
I'm running postfix on containers and have set logging to stdout. I notice that just the qmgr logs are sent to stdout, smtp logs are ignored. Any idea how to fix this? http://www.postfix.org/postconf.5.html#maillog_file http://www.postfix.org/postconf.5.html#syslog_facility ...might be what

Postfix-fg and maillog_file to stdout

2021-11-05 Thread Rafael Azevedo
Hi there, I'm running postfix on containers and have set logging to stdout. I notice that just the qmgr logs are sent to stdout, smtp logs are ignored. I don't have syslog installed on this container... Any idea how to fix this? Also, is it possible to use milliseconds in the stdout logging?