You are not logged in.

#1 2015-07-02 11:43:06

DerJudge
Member
From: NRW, Germany
Registered: 2013-03-26
Posts: 24
Website

Detailed postfix mailing logs in journald / systemd

Hi everyone,

I'm new to both, Arch Linux and Systemd. My previous system was Gentoo based and didn't have systemd/journald but syslog.

When a mail was processed by postfix on the Gentoo/syslog - box, I had detailed info about each and every mail in a logfile in /var/log/mail.info , which was very crucial for debugging. A log entry for a sent mail looked something like the following:

Jun 19 07:43:13 tango016 postfix/cleanup[23948]: E663581D4B: message-id=<E1Z5p4x-0003TY-MY@domainrobot.intern.hosteurope.de>
Jun 19 07:43:14 tango016 postfix/local[23974]: CF4FD81D4A: to=<judge@tango016.server4you.de>, orig_to=<judge@localhost>, relay=local, delay=0.15, delays=0.09/0/0/0.06, dsn=2.0.0, status=sent (forwarded as E663581D4B)
Jun 19 07:43:14 tango016 postfix/qmgr[5861]: E663581D4B: from=<drbopp@hosteurope.de>, size=10747, nrcpt=1 (queue active)
Jun 19 07:43:14 tango016 postfix/local[23975]: E663581D4B: to=<judge@tango016.server4you.de>, orig_to=<judge@localhost>, relay=local, delay=0.17, delays=0.06/0/0/0.11, dsn=5.4.6, status=bounced (mail forwarding loop for judge@tango016.server4you.de)
Jun 19 07:43:14 tango016 postfix/bounce[23976]: E663581D4B: sender non-delivery notification: 1B15781D4C
Jun 19 07:43:14 tango016 postfix/qmgr[5861]: E663581D4B: removed

When I open a journald tail using journalctl -f, I just get the following:

Jul 02 13:28:59 tango016.marc-richter.info postfix/smtpd[24099]: connect from unknown[172.17.1.22]
Jul 02 13:28:59 tango016.marc-richter.info postfix/smtpd[24099]: disconnect from unknown[172.17.1.22] ehlo=1 mail=0/1 rcpt=0/1 data=0/1 rset=0/1 quit=1 commands=2/6

As far as I know, there is no setting to make postfix logging more verbose or such.
Where do those verbose loggings go in journald? Do I have to change something before this informations are generated/saved? How can I look at these data?

Thanks for your efford!

Offline

#2 2015-07-03 12:15:28

revellion
Member
From: Sweden
Registered: 2007-04-10
Posts: 54

Re: Detailed postfix mailing logs in journald / systemd

Tried journalctl -u postfix ?


Hurricane Electric Certified IPv6 Sage

CPU: Core i7-2600 @ 4.0Ghz | RAM: 16GB (4x4GB) | GFX: AMD Radeon R9 290 4096MB VRAM | HDD: 1x 120GB SATA3 Corsair SSD (~500MB/s RW), 1x SATA2 250GB, 1x SATA2 320GB, 1x 180GB SATA3 Intel SSD
*EDIT* Replaced Nvidia GTX 570 for a AMD Radeon R9 290, and added an extra SSD 180GB

Offline

#3 2015-07-05 09:39:58

DerJudge
Member
From: NRW, Germany
Registered: 2013-03-26
Posts: 24
Website

Re: Detailed postfix mailing logs in journald / systemd

revellion wrote:

Tried journalctl -u postfix ?

This does exactly what I needed! Thank you for that hint.

But why doesn't this show up, when no speacial unit is selected; shouldn't showup everything in the output then?

Offline

#4 2015-07-05 10:30:52

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: Detailed postfix mailing logs in journald / systemd

DerJudge wrote:
revellion wrote:

Tried journalctl -u postfix ?

This does exactly what I needed! Thank you for that hint.

But why doesn't this show up, when no speacial unit is selected; shouldn't showup everything in the output then?

You're right, I doubt that'll help. Did you check your logging configuration; what does `postconf -Mf` say?

Offline

#5 2015-07-06 06:17:53

DerJudge
Member
From: NRW, Germany
Registered: 2013-03-26
Posts: 24
Website

Re: Detailed postfix mailing logs in journald / systemd

Spider.007 wrote:
DerJudge wrote:
revellion wrote:

Tried journalctl -u postfix ?

This does exactly what I needed! Thank you for that hint.

But why doesn't this show up, when no speacial unit is selected; shouldn't showup everything in the output then?

You're right, I doubt that'll help. Did you check your logging configuration; what does `postconf -Mf` say?

No, it does help! The information I looked for do show up when selecting the postfix unit explicitly. What I do not understand why it does not show up in the general, unfiltered output of journalctl.

Offline

Board footer

Powered by FluxBB