OpenDKIM icon indicating copy to clipboard operation
OpenDKIM copied to clipboard

log to stdout/stderr in foreground mode

Open Augustin-FL opened this issue 3 years ago • 4 comments
trafficstars

It would be useful to be able to get opendkim to log to stdout/stderr in foreground mode. This would be specially useful on systems where no log agent (rsyslog/syslog-ng/etc...) is installed, or on docker containers.

I found no way to achieve that for now. Also, it seems that someone on sourceforge is requesting the same feature.

Augustin-FL avatar Jun 10 '22 16:06 Augustin-FL

This is really a much needed feature. Is there anything else missing in order for the PR to be accepted?

neszt avatar Apr 08 '23 21:04 neszt

A workaround that worked for me for use in docker containers: I hijacked the stdout FD and had rsyslog write directly to it: https://github.com/Protryon/postfix-docker/blob/master/opendkim/rsyslog.conf

The whole working dockerfile with stdout from opendkim: https://github.com/Protryon/postfix-docker/tree/master/opendkim

Protryon avatar Jun 25 '23 17:06 Protryon

based on https://github.com/facebookarchive/liblogfaf someone wrote code to let that library echo any application's syslog to STDOUT.

my version: https://github.com/facebookarchive/liblogfaf/compare/master...andreasschulze:liblogfaf:log2stdout

It's used for opendkim in containers here since years ...

LD__PRELOAD="/path/to/liblogfaf_stdout" /path/to/opendkim -x /path/to/opendkim.conf -f -l

andreasschulze avatar Jul 18 '23 12:07 andreasschulze

Yes, logging to stdout is really a basic feature, and much needed in security critical environments.

schildbach avatar Oct 05 '23 10:10 schildbach