Re: [Proposal/Patch] SMTP logging

Hi Jack!

First, thank you so much for your feedback and input!

Am 01.08.19 21:12 schrieb(en) Jack via balsa-list:
Might it make sense (as a wishlist item) for Balsa (optionally?) to create a log file (perhaps in the .balsa 
directory) with configuration to allow how many versions to keep?  A possible configuration item could be 
loglevel (or simply whether to log what normally goes to stdout or only what goes to stderr).

Sure, it would…  Actually, this wouldn't bee to complex.  A while ago, I proposed to look into the 
consolidation of Balsa's various logging options [1].  Overriding the log handler, and possibly combining it 
with the libbalsa_information mechanism, would provide a simple method for writing log files.

However, note that you probably don't want to see everything in the logs (like warnings about gpg keys with 
low trust, etc.), so a proper configuration (everything needed is in them, but not more, so the file sizes 
don't grow too quickly) will be complex.

As I said, I have no objection to this - I'm just trying to play with how this might end up more integrated 
with the overall Balsa logging mechanism.

Yes – a good point!

So this might be addressed with the above suggestion of Balsa just saving it's log to a file (either by 
default or configuration or command line switch).  Yes, such a log would be under the user's home dir (which 
makes sense to keep separate user's logs separate) but in case of the problems which started this thread, the 
user is going to have to forward that information to someone else anyway, so the only real importance is for 
the user to easily know where that information is.

IMO, the ~/.balsa folder (or a subfolder of it) would be the proper place for writing such log files…

I'm trying to think of the range of approaches by other apps I use.  Some drop logs under the user's home, 
some use syslog, some have separate logs or log dirs under /var/log, some have areas under /etc or /var, I 
assume there are others.

The Linux Filesystem Hierarchy Standard [2] specifies that /var/log shall be used for log files.  This is the 
place where the various syslog implementations will write their logs.  However, this folder shall *never* be 
world-writable, i.e. any application (like a MTA which of course does not run with root privileges) which 
wants to log there *must* use the syslog() call, or (like apache, iirc) write into a sub-folder owned by the 
respective daemon user.

Whilst there are other commonly used log file folders (e.g. /opt/log/, /local/var/log, …), IMO /etc is 
reserved host-specific configuration files – logging there looks like a bug to me!


[1] <>
[2] <>

Attachment: pgpW7q9RsWpth.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]