Add opendkim -O option and StdoutLog config parameter (for Docker) #160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi. This patch attempts to fix issue #153.
This patch adds the ability to log to
stdout
(as well as or instead ofsyslog(3)
). People who want to use OpenDKIM in a Docker container would really appreciate this ability as it means that they don't need to install, configure, and run anrsyslogd
process in the container as well.The
opendkim
command gets a new-O
option (like the-l
option), and the configuration file gets a newStdoutLog
parameter (like theSyslog
parameter). The existingSyslogSuccess
parameter has the same effect when logging to stdout.This mostly affects
opendkim/opendkim.c
(and documentation).There are three calls to
syslog()
inutil.c
that haven't been modified to be able to log tostdout
because it would require moving the definition ofstruct dkimf_config
(and the declaration ofcurconf
) so that they become accessible toutil.c
(i.e.,opendkim.h
). That's a more invasive change, and it's probably not worth it. But if you prefer it, I can make the additional necessary changes.Also, I fixed what looked like two bugs in
mlfi_eom()
. The two"header remove failed"
error messages were being emitted when there was an error or when logging was enabled (rather than and when logging was enabled).Warning: I couldn't find instructions for configuring and building from the git repository, so I couldn't actually test this. There might be embarrasing typos.