View Single Post
  #3   (View Single Post)  
Old 14th May 2022
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

One thing to remember is that the MAILTO variable will be used in all subsequent cron jobs

Code:
MAILTO=""
0 0 * * * command1 && command2 && command3 && command4 && command5 
1 1 * * * command1 && command2 && command3
MAILTO=root
2 2 * * * command1 && command2
In this example the first two jobs will not produce any emails. In order to get an email for the third job, you will have to set MAILTO again.
To prevent this I find it easier is to move all the no-email-wanted jobs to the end:
Code:
MAILTO=root
2 2 * * * command1 && command2
MAILTO=""
0 0 * * * command1 && command2 && command3 && command4 && command5 
1 1 * * * command1 && command2 && command3
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote