Answers.Body: <p>What you're requesting is possible by writing a custom extension, or possibly with CiviRules.</p>
  
  <p>I managed the creation of such an extension, which is <a href="https://github.com/JMAConsulting/biz.jmaconsulting.inemailclsfn" rel="nofollow noreferrer">available on Github</a>.  This extension changes the activity type of any inbound email sent to <code>inbound+support@example.org</code> to a different activity type.</p>
  
  <p>If you're a coder, you can adapt that extension to your purpose.  If not, try using CiviRules with a trigger of "when an activity is created" and conditions that match your inbound email, and an action of "add a tag".</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-09T03:23:23.280Z
Answers.Text: I'll look at your code, thanks. I did have a look at CiviRules. Setting a condition "on inbound email"  is easy, but I can't see how to further define the condition to being "from inbound+1@mywebsite.com". Did you also conclude CiviRules cannot handle this type of delineation as to what it's ingesting when the +1 type addresses are used? Thanks.
Answers.UserDisplayName: slbradio
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-09T01:58:08.643Z
Answers.LastActivityDate: 2017-06-09T01:58:08.643Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>We'd like to use inbound mail processing with a bit more granularity so we can do a post-processing search that will let us easily tag new or updated constituents as YOUTH or ADULT.</p>
  
  <p>Currently, we bcc: inbound@ourdomain.org and the new or updated records are created. However, we need to inspect each inbound email to understand if the contact should be tagged youth or adult.</p>
  
  <p>I don't think we can have two inbound email addresses...if we can, I'd love to know how.</p>
  
  <p>I thought maybe I could do something like use inbound+1@ourdomain.org (for youth) and inbound+2@ourdomain.org (for adults). This does result in the email and the +1 or +2 flag coming in to Civi!  However, I don't see a way to isolate what we need.  For example:</p>
  
  <p>An advanced search for CONTACTS with an INBOUND EMAIL ACTIVITY has a check box for with/added by/assigned, but does not have a place to provide the address of inbound+1@ourdomain.org. If it did, I think this would give me a list of contacts that I would tag as youth.</p>
  
  <p>Another option is an advanced for CONTACTS with INBOUND EMAIL ACTIVITY that contains "inbound+1@ourdomain.org". But I don't think the address shows in the activity records.</p>
  
  <p>Another work-around I thought of is to include a distinct "code" in the emails we write and bcc to inbound@ourwebsite.org. For example, I could put +<em>+y after my sig file when I know I'm writing to a youth and then do an advanced search for CONTACTS that have INBOUND EMAIL ACTIVITIES containing +</em>+y in the body of the inbound email.  This would work but seems <em>way</em> too complicated.</p>
  
  <p>I'd appreciate any thoughts on this process. Thanks!</p>
  
  <p>We're Wordpress 4.7 and CiviCRM 4.7.17. </p>
  
Tags: <email><activities>
Title: Rules for Inbound Mail Processing (multiple addresses? searches?)
ThreadText: # Rules for Inbound Mail Processing (multiple addresses? searches?)
  
  (Asked by: username_0 on 2017-06-08)
  
  We'd like to use inbound mail processing with a bit more granularity so we can do a post-processing search that will let us easily tag new or updated constituents as YOUTH or ADULT.
  
  Currently, we bcc: inbound@ourdomain.org and the new or updated records are created. However, we need to inspect each inbound email to understand if the contact should be tagged youth or adult.
  
  I don't think we can have two inbound email addresses...if we can, I'd love to know how.
  
  I thought maybe I could do something like use inbound+1@ourdomain.org (for youth) and inbound+2@ourdomain.org (for adults). This does result in the email and the +1 or +2 flag coming in to Civi! However, I don't see a way to isolate what we need. For example:
  
  An advanced search for CONTACTS with an INBOUND EMAIL ACTIVITY has a check box for with/added by/assigned, but does not have a place to provide the address of inbound+1@ourdomain.org. If it did, I think this would give me a list of contacts that I would tag as youth.
  
  Another option is an advanced for CONTACTS with INBOUND EMAIL ACTIVITY that contains "inbound+1@ourdomain.org". But I don't think the address shows in the activity records.
  
  Another work-around I thought of is to include a distinct "code" in the emails we write and bcc to inbound@ourwebsite.org. For example, I could put +*+y after my sig file when I know I'm writing to a youth and then do an advanced search for CONTACTS that have INBOUND EMAIL ACTIVITIES containing +*+y in the body of the inbound email. This would work but seems *way* too complicated.
  
  I'd appreciate any thoughts on this process. Thanks!
  
  We're Wordpress 4.7 and CiviCRM 4.7.17.
  
  **Tags:** email, activities
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-09. Score: 1
  
  What you're requesting is possible by writing a custom extension, or possibly with CiviRules.
  
  I managed the creation of such an extension, which is [available on Github](https://github.com/JMAConsulting/biz.jmaconsulting.inemailclsfn). This extension changes the activity type of any inbound email sent to `inbound+support@example.org` to a different activity type.
  
  If you're a coder, you can adapt that extension to your purpose. If not, try using CiviRules with a trigger of "when an activity is created" and conditions that match your inbound email, and an action of "add a tag".
  
  > **Comments:**
  > **username_0**: I'll look at your code, thanks. I did have a look at CiviRules. Setting a condition "on inbound email"  is easy, but I can't see how to further define the condition to being "from inbound+1@mywebsite.com". Did you also conclude CiviRules cannot handle this type of delineation as to what it's ingesting when the +1 type addresses are used? Thanks.  
  
  ---
  
  