Any stdout or stderr output from either Perl or Trestlemail also go into the fetchmail log file. The fetchmail log file is specified in fetchmailrc. When Trestlemail starts up, it reads the trestlemailrc file to tell it how to distribute the message. It's task finished, Trestlemail exits and waits for the next message. Debugging If unexpected things go wrong, it's not terribly easy to get information from Trestlemail.
Daemons lead a very non-interactive life.
If the catastrophe address is set up properly, trestlemail tries its best to send errors as E-mail messages. If it does exist, the error is appended to the log, but the E-mail message is not sent. All Perl and Trestlemail stdout and stderr appear in the fetchmail log. Development is actually pretty straightforward. You'll notice some debugging remnants throughout the trestlemail script.