* First of all, email messages sent by LS must be tagged in some way with an message-dest-id
This message destination id is made up of: the SurveyID, the target email address, the token code, and a specific integrity code.
This integrity code is used to make sure the bounce email is not a fake so that we don't disable some valid tokens.
The integrity code would be an ASCII verison of a HMAC of the previous elmeents encrypted with a key containing the token ID (internal element inside LS, and a global value specific to this LS installation and set in config.php).
* the probe will decode the bounced email to read the error message and get the original message-dest-id, then it would send the two data to LS-remote-command (via SOAP)
* The LSRC API will provide a service that would check the integrity and authentication of the message-dest-id and then update the token status accordingly.
Some references:
* Tagging with VERP solution:
http://en.wikipedia.org/wiki/Variable_envelope_return_path
* Tagging in SMTP header (my preferred way):
http://www.php.net/manual/fr/function.mail.php#78934