Track replies and forward replies are ticked for a particular mailing. When someone replies, exactly how does CiviCRM determine the address to forward the mail to. The reply is using VERP. Is this clearly documented somewhere? I have looked at the documentatin on civicrm.org (book, wiki) and cannot find any details.
At Administer > CiviMail > Mail Accounts you can configure one or two email inboxes to be automatically processed by CiviCRM. The Bounce Processing inbox handles the processing of replies to emails along with soft and hard bounces, unsubscribe emails and opt out emails.
The VERP information on the return message is used to correlate the incoming email to CiviCRM with the outgoing one from CiviMail.
When Track Replies is enabled for a mailing, and a.reply is received, a copy of the reply is stored as an Activity for the person who had been sent the CiviMail.
If Forward Replies is enabled and CiviCRM receives a reply, it sends a copy of the email to the From address used in the Mailing. The possible From addresses for CiviMail can be configured at Administer > CiviMail > From Addresses.
If you don't want to track replies using VERP, navigate to Administer > CiviMail > Component Settings and disable 'Track replies using VERP in Reply-To header'.
CiviCRM uses Variable Envelope Return Path (VERP for short) to track bounces and optionally replies.
This technique assigns a unique, coded address to two aspects of a CiviMail email. Viewing the mail headers, you might see something like
Return-Path: <email@example.com> X-Civimail-Bounce: firstname.lastname@example.org Reply-to: email@example.com
Here's a breakdown of what you're seeing -
civimail - the mailbox name of firstname.lastname@example.org + - VERP separator b - action - (b|bounce|c|confirm|o|optout|r|reply|s|subscribe) etc 1234 - mailing job id 1234567 - mailing queue id aabbccddeeff1122 - validation hash
SMTP systems understand these headers, so if the message is undeliverable they should return the bounce to the
Return-Path address, and if the person hits reply their mail client should use the
Reply-To address. This depends on correct behaviour in the MTA and MUA, both of which are outside of control of CiviCRM.
The main place this is used is in the email processor at CRM/Utils/Mail/EmailProcessor.php, where CiviCRM checks for these strings either in the message headers this bounce/reply was delivered to, or in the body of the message (some mail systems don't permit VERP delivery; expect less ideal results without full VERP support).
... That's how it works under the hood! Joe's answer explains this well from the other side of the dashboard :)