If you have X Windows installed on the Postfix machine, then
an interactive debugger such as xxgdb can be convenient.
Edit the
debugger_command definition in /etc/postfix/main.cf
so that it invokes xxgdb:
/etc/postfix/main.cf:
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $
daemon_directory/$
process_name $
process_id & sleep 5
Be sure that gdb is in the command search path, and
export XAUTHORITY so that X access control works, for example:
% setenv XAUTHORITY ~/.Xauthority (csh syntax)
$ export XAUTHORITY=$HOME/.Xauthority (sh syntax)
Append a -D option to the suspect daemon definition in
/etc/postfix/master.cf, for example:
/etc/postfix/master.cf:
smtp inet n - n - - smtpd -D
Stop and start the Postfix system. This is necessary so that
Postfix runs with the proper XAUTHORITY and DISPLAY
settings.
Whenever the suspect daemon process is started, a debugger
window pops up and you can watch in detail what happens.