Answers.Body: <p>CiviCRM uses <a href="http://en.wikipedia.org/wiki/Variable_envelope_return_path">Variable Envelope Return Path</a> (VERP for short) to track <em>bounces</em> and optionally <em>replies</em>.</p>
  
  <p>This technique assigns a unique, coded address to two aspects of a CiviMail email. Viewing the mail headers, you might see something like</p>
  
  <pre><code>Return-Path:      &lt;civimail+b.1234.1234567.aabbccddeeff1122@example.org&gt;
  X-Civimail-Bounce: civimail+b.1234.1234567.aabbccddeeff1122@example.org
  Reply-to:          civimail+r.1234.1234567.aabbccddeeff1122@example.org
  </code></pre>
  
  <p>Here's a breakdown of what you're seeing -</p>
  
  <pre><code>civimail         - the mailbox name of civimail@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
  </code></pre>
  
  <p>SMTP systems understand these headers, so if the message is undeliverable they should return the bounce to the <code>Return-Path</code> address, and if the person hits reply their mail client <em>should</em> use the <code>Reply-To</code> address. This depends on correct behaviour in the <a href="http://en.wikipedia.org/wiki/Message_transfer_agent">MTA</a> and <a href="http://en.wikipedia.org/wiki/Email_client">MUA</a>, both of which are outside of control of CiviCRM.</p>
  
  <p>The main place this is used is in the email processor at <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Mail/EmailProcessor.php">CRM/Utils/Mail/EmailProcessor.php</a>, 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).</p>
  
  <p>... That's how it works under the hood! Joe's answer explains this well from the other side of the dashboard :)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-14T08:50:24.610Z
Answers.LastActivityDate: 2015-05-14T08:50:24.610Z
Answers.UserDisplayName: Chris Burgess
Answers.Body: <p>Joe wrote above :</p>
  <blockquote>
  <p>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.</p>
  </blockquote>
  <p>I performed a lot of tests, and I came to the conclusion that this is not so simple.
  I haven't been able to store easily as an activity the replies sent to the Reply-to address (civimail+r.1234.1234567.aabbccddeeff1122@example.org in the above example)</p>
  <p>After running the &quot;fetch bounces&quot; scheduled task, Civimail report correctly displays that a response has been received, and that answer is moved under the IMAP subfolder &quot;civimail/processed&quot; of the bounce email account.</p>
  <p>BUT NO copy of that email is attached as an activity to the civimail recipient (who sent an answer to the mass mailing).</p>
  <p>I had to use the following trick :</p>
  <ol>
  <li>in the imap mailbox, create a rule to copy all emails sent to &quot;civimail+r.&quot; to a subfolder called &quot;civicrm-answers&quot;. All those emails are now duplicated : they appear both in &quot;civimail/processed&quot; (bounce processing) and in &quot;civicrm-answers&quot;</li>
  <li>in civicrm, create an additional &quot;email to activity&quot; account, monitoring &quot;civicrm-answers&quot; IMAP folder</li>
  <li>after the execution of the task &quot;Process Inbound emails&quot;, the reply is now correctly stored as an Activity for the person who had been sent the CiviMail</li>
  </ol>
  <p>This is quite complex, and it would be so simpler if the &quot;fetch bounce&quot; task could at the same time store the reply as an activity (and not only increment the amount of replies in the civimail report).
  Am I doing something wrong ?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-03T14:39:13.483Z
Answers.Text: It sounds like you are asking a question here, but you have posted this as an answer. You are more likely to get a response if you post a new question. If relevant refer to this one.
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-28T01:59:19.340Z
Answers.LastActivityDate: 2022-08-28T01:59:19.340Z
Answers.UserDisplayName: stackexchange user
Answers.Body: <p>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. </p>
  
  <p>The VERP information on the return message  is used to correlate the incoming email to CiviCRM with the outgoing one from CiviMail. </p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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'.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-14T00:17:19.330Z
Answers.Text: Is the value of the VERP address stored in the database? Also, is it possible to do this without VERP by using a catchall mailbox. Our SMTP provider does not seem to be able to set up VERP
Answers.UserDisplayName: Vietyank
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-14T02:31:21.760Z
Answers.Text: Could you add the question about not using VERP as new, separate questions in Covicrm.stackexchange.com?
Answers.UserDisplayName: Joe Murray
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-14T00:09:54.627Z
Answers.LastActivityDate: 2015-05-14T02:38:31.287Z
Answers.LastEditDate: 2015-05-14T02:38:31.287Z
Answers.UserDisplayName: Joe Murray
Body: <p>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.</p>
  
Tags: <civimail>
Title: How does Civimail reply tracking and forwarding work?
ThreadText: # How does Civimail reply tracking and forwarding work?
  
  (Asked by: username_0 on 2015-05-13)
  
  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.
  
  **Tags:** civimail
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2015-05-14. Score: 5 | Accepted answer
  
  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'.
  
  > **Comments:**
  > **username_0**: Is the value of the VERP address stored in the database? Also, is it possible to do this without VERP by using a catchall mailbox. Our SMTP provider does not seem to be able to set up VERP  
  > **username_4**: Could you add the question about not using VERP as new, separate questions in Covicrm.stackexchange.com?  
  
  ---
  
  ### Answer by username_1 on 2015-05-14. Score: 6
  
  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:      
  X-Civimail-Bounce: civimail+b.1234.1234567.aabbccddeeff1122@example.org
  Reply-to:          civimail+r.1234.1234567.aabbccddeeff1122@example.org
  
  Here's a breakdown of what you're seeing -
  civimail         - the mailbox name of civimail@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 :)
  
  
  ---
  
  ### Answer by username_2 on 2022-08-28. Score: 0
  
  Joe wrote above :
  
  > 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.
  
  I performed a lot of tests, and I came to the conclusion that this is not so simple.
  I haven't been able to store easily as an activity the replies sent to the Reply-to address (civimail+r.1234.1234567.aabbccddeeff1122@example.org in the above example)
  
  After running the "fetch bounces" scheduled task, Civimail report correctly displays that a response has been received, and that answer is moved under the IMAP subfolder "civimail/processed" of the bounce email account.
  
  BUT NO copy of that email is attached as an activity to the civimail recipient (who sent an answer to the mass mailing).
  
  I had to use the following trick :
  
  1. in the imap mailbox, create a rule to copy all emails sent to "civimail+r." to a subfolder called "civicrm-answers". All those emails are now duplicated : they appear both in "civimail/processed" (bounce processing) and in "civicrm-answers"
  2. in civicrm, create an additional "email to activity" account, monitoring "civicrm-answers" IMAP folder
  3. after the execution of the task "Process Inbound emails", the reply is now correctly stored as an Activity for the person who had been sent the CiviMail
  
  This is quite complex, and it would be so simpler if the "fetch bounce" task could at the same time store the reply as an activity (and not only increment the amount of replies in the civimail report).
  Am I doing something wrong ?
  
  > **Comments:**
  > **username_3**: It sounds like you are asking a question here, but you have posted this as an answer. You are more likely to get a response if you post a new question. If relevant refer to this one.  
  
  ---
  
  