The Mechanism To try to provide a better idea of how it works, here's a brief overview of a typical Trestlemail installation. Fetchmail is running in daemon mode.
Any errors go into to the fetchmail log file.
When Trestlemail is started up by Fetchmail, it reads the trestlemailrc file to tell it how to distribute the message. Its task finished, after all mail has been delivered and all executables have returned, Trestlemail exits and waits for Fetchmail to start it up again to deliver the next message. If you draw a map, the preceeding appears much clearer. Here's a much more in-depth description of what happens in a fairly complex trestlemail interation. See the end of this description for specifics.