[O/S] No longer a standard mail.log - Bookworm

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
CyberMaster
Posts: 9
Joined: 2023-06-28 22:29
Has thanked: 1 time

[O/S] No longer a standard mail.log - Bookworm

#1 Post by CyberMaster »

Hi.

Even though I am a seasoned UNIX administrator, I love to and do learn new things almost everyday.

Upgrading some of my servers and fresh installs of Debian Bookworm States in the log directory at the log system has changed.

This is currently the only thing I have found so far that I do not care, nor show love for with the new Bookworm.

I need to be able to view my servers mail log files and others, but there is no mail.log.

I thought maybe to also try looking for a rsyslog.conf though it doesn't exist at all.

I know in the /var/log/README It gives a small fraction of what's going on but I'm still stuck without being able to read the servers mail and other logs.

It states that alternatively I could install one of the now old classic implementations like syslog though before I have to do that is there some way to read the mail.log file already built in, Like is there some kind of secret to use journalctl to view the logs?

Thanks for taking the time to read and hopefully you can suggest something?

CyberMaster
Posts: 9
Joined: 2023-06-28 22:29
Has thanked: 1 time

Re: [O/S] No longer a standard mail.log - Bookworm

#2 Post by CyberMaster »

I figured out how to view the mail log with journalctl to read the mail.log with

Code: Select all

journalctl -u postfix@-.service
but that new way sure does limit the way of the old style like being able to directly search for something.

Anyway I guess I figured out my own answers to the question.

Have a great day!
Last edited by CyberMaster on 2023-08-20 06:54, edited 1 time in total.

CyberMaster
Posts: 9
Joined: 2023-06-28 22:29
Has thanked: 1 time

[Solved] Re: [O/S] No longer a standard mail.log - Bookworm

#3 Post by CyberMaster »

Aaaaactually, digging a lil deeper, I found that I can just set

Code: Select all

postconf maillog_file=/var/log/postfix.log
of which gives me back a nice easily browsable log file.. 😀😁😎

User avatar
sunrat
Site admin
Site admin
Posts: 7320
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 130 times
Been thanked: 640 times

Re: [O/S] No longer a standard mail.log - Bookworm

#4 Post by sunrat »

You can grep journalctl.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Meowbay
Posts: 8
Joined: 2009-06-14 21:42

Re: [O/S] No longer a standard mail.log - Bookworm

#5 Post by Meowbay »

You can grep journalctl but you have to supply filters to that grep. Whoever thought journal logging was a better option needs to read up on what people do with logs. I mean, all my use of logs would suddenly be useless. I gladly re-enstated rsyslog and disabled journalled logging.

And honestly, where I sometimes work (a large hosting/webdev/IT company) I have yet to find another linux admin who has *not* reinstalled rsyslog on a debian server. They can't seriously mean this is an improvement from a debian user's perspective.

D2b2426R5d
Posts: 32
Joined: 2015-12-23 10:48
Has thanked: 4 times
Been thanked: 1 time

Re: [O/S] No longer a standard mail.log - Bookworm

#6 Post by D2b2426R5d »

I agree. Entire systemd abomination is irritating. First this I do on my computers is to install rsyslogd back again. Without it, I don't even have fail2ban filtering, which is based on text log files (for ssh rules I use), AFAIK.
I am contemplating to move my homeserver to Devuan system, which is Debian Stable fork with no systemd. Maybe I shall do it on next hardware downtime/maintenance window, my Debian server has been running non stop (with hardware maintenance downtime windows) since about 2018.

User avatar
sunrat
Site admin
Site admin
Posts: 7320
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 130 times
Been thanked: 640 times

Re: [O/S] No longer a standard mail.log - Bookworm

#7 Post by sunrat »

Keep to topic please. The whole systemd pros and cons discussion is well covered in a lengthy topic elsewhere in the forum. This is a support subforum, not the right place for that type of discussion.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply