Inside Out

Debugging Procmail Recipes

Three steps to nirvana:

- Modify mail fetch frequency in *.fetchmailrc* to a small value. E.g. In my .fetchmailrc, I forced fetchmail to query server every 30s:

`set daemon 30` - Set the LOGFILE and LOGABSTRACT variables in *.procmailrc*. The one liner here is, LOGFILE specified where procmail would log the rules processed and LOGABSTRACT controls the verbosity of information logged. So we modify .procmailrc to:

`  `



  • Disable the catch-all recipe!
  • Still stuck, use printfs :-) In recipes, put in some echo "foo" >> ~/mydebug.log to check control flow.

BTW, I'm sure there are better ways to do this, /me had to send around 7-8 test mails to fix an issue! Feel free to share your recipe-debugging-tips.

You're in a happy corner. Take a moment. Breathe. Reflect. Did you hear the sound of silence?

© 2021 Inside Out. This work is licensed under a  CC-BY-NC-SA 4.0 License.