I am looking for a way to automatically accept a cookie with a specific name, not based on site. The expected behaviour would be to block all cookies, unless its name contained foo in which case I would allow that cookie.
Most browsers give me an ability to reject all cookies except for an exemption list which can be set to automatically allow. However, the exemption lists all seem to be site based like so (Firefox 9.0.1);

Does anyone know of an add-on or otherwise which can allow cookies by Name? This question is kind of the inverse of another Super User question which was resolved without blocking a cookie name: Firefox: how to block cookies by name, not by site?
Mock up of desired functionality;
