We have a client who has two webhooks defined in Mandrillapp - both of them reacting to the same events (click, open, etc). These webhooks have a post url of two different sites(dev and live). Eg.
Post url of dev = http://devsite.com/civicrm/ajax/mte/callback?mandrillSecret=devkey
Post URL of live - http://livesite.com/civicrm/ajax/mte/callback?mandrillSecret=livekey
My guess is that - when an email is sent from the live site, these both urls are triggered(on open or click event) and dev site also gets the response which creates a mandrill activity on dev site.
This is what is happening for us - when a bulk email is sent from the live site, dev also creates a mandrill activity.
Can we conclude that we need to use two different mandrill accounts for two different sites OR there is a way to avoid this (rules, etc)?
UPDATE after Chris Answer -
The posted answer seems to be something which is already present in Mandrill extension?
Readme file asks user to save the secret key as a value of an option group which we've done for dev and live sites.
Problem arises when DEV webhook is triggered by an event(open/click) of LIVE mails(note both above URLs react on the same event). As dev secret key is same(url param and option grp value) matches the option value stored on the dev site, this checking of key match doesn't help us.
In short, a dev Post URL need to be avoided to be triggered after an event has occurred for emails sent from live site. Maybe this could to be done on the MandrillApp side?