Hundreds of messages from a single NotifyGroup via crontool

I’ve created a monster…

Here’s the job (don’t mind the escaping, it’s from a puppet rule that manages our cronjobs):

/cluster_shared/opt/rt4/bin/rt-crontool --search RT::Search::FromSQL --search-arg "Owner = \'Nobody\' AND Status = \'new\' AND Created < \'3 days ago\'" --action RT::Action::NotifyGroup --action-arg \'us@here.edu\' --transaction last --template \'Unanswered Ticket\'

It’s set to run once daily at 7 AM.

At 7 AM, I got what seemed like a single, correct message for each ticket that met the above criteria. However, I then proceeded to get an endless chain of identical messages, and each one quoted every previous message. It doesn’t seem like a normal email loop. I am not sure why it would be quoting its previous notifications. I am also not sure where to begin looking…

I’d suspect the underlying mail system. What do you see after issuing ‘mailq’ command? Perhaps it can not be delivered somewhere and mail system is trying to let you know about that.

Mail queue is empty, everything got delivered, but I think I pranged the cron settings. Looking at the Puppet rule again that I copied that from… it looks like I’ve set it at 7 am, yes. Also 7:01, 7:02, 7:03…ad nauseum. >.<

This queue’s address might need to be added to the loop protection regex as well, but I think the bulk of the issue was my leaving out a line in the puppet rule. Thanks for responding tho. If, once I clean all this up, it’s still being weird, I’ll check back.