Exim, debug, vs tail mainlog, is there a difference

exim

Is there a difference between running

exim -bdf

vs

tail -f mainlog

?

I am trying to see what exim is doing, so I wanted to try exim -bdf in a terminal as root

the first time i tried this, i noticed in the mainlog file

socket bind() to port 25 for address (any IPv6) failed: Address
already in use:

so I killed the running daemon process, and re-execute the -bdf command in the terminal.

but the terminal is not echoing any output from exim, but tailing the exim mainlog file in a web browser window shows real-time activity.
Yet the log file is still not showing me the level of detail I want to see for the debugging of an ACL, etc., so I'm thinking I want to try the terminal debug method.

Question 1, is there a difference between what I should be seeing in the terminal window, vs what is being written to the main log, and log level is set to "all" for max logging?

Question 2, is this normal behavior for terminal window to not output anything, but the mainlog is active? If not, is there a setting I can change to see the real-time debugging of exim in the terminal?

Best Answer

Your exim -bdf command line option alone doesn't initiate any debugging (answering your Q2).

-bdf This option has the same effect as -bd except that it never disconnects from the controlling terminal, even when no debugging is specified.

The -v would be more similar to tail -f mainlog, the documentation for this option describing the difference (answering directly to your Q1):

-v This option causes Exim to write information to the standard error stream, describing what it is doing. In particular, it shows the log lines for receiving and delivering a message, and if an SMTP connection is made, the SMTP dialogue is shown. Some of the log lines shown may not actually be written to the log if the setting of log_selector discards them. Any relevant selectors are shown with each log line. If none are shown, the logging is unconditional.

You should be using -d<debug options>, more precisely -d+acl for ACL interpretation.

You could use log files for debugging purposes too, but that may require adjusting what is being logged. In current 4.x versions of Exim the setting would be log_selector; ancient and now obsolete 3.x versions had much less configurable log_level from 1 to 6.