CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Bounce Setup with IMAP
Pages: [1]

Author Topic: Bounce Setup with IMAP  (Read 5051 times)

dmdude

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: None
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.2
Bounce Setup with IMAP
July 12, 2013, 01:53:03 pm
Hello -
  This is my first posting, so please be gentle.
  I have trying to get CiviCRM 4.3.5 bounce processing working for CiviMail mailings.  In the CiviMail Mail Accounts section, I set up two email addresses, one used for bounce handling (the default) and one used for Email-To-Activity, both using IMAP.  The domain for both accounts was set to xx.yy.gov, which is our Exchange mail domain.  The cron jobs for sending emails, bounce handling, and processing inbound emails all say "success" but there is nothing for them to process.  This is because the return-path goes to an unknown Exchange mailbox, see below.
  How do I get the return path to go to a specific address?  I did set the return-path for both CiviMail Mail Accounts, but they don't seem to be used.
  Any help would be appreciated.

To: <myemailaddr@xx.yy.gov>
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="=_830bb3ef7961a15c8aad38b6f08ad95b"
Reply-To: "Bud Smith" <Bud.Smith@xx.yy.gov>
Return-Path: b.2.1.d91c1d307cebf582@xx.yy.gov
From: "Bud Smith" <Bud.Smith@xx.yy.gov>
Subject: Take 1 July 12 Newsletter
List-Unsubscribe: <mailto:u.2.1.d91c1d307cebf582@xx.yy.gov>
To: <myemailaddr@xx.yy.gov>
Precedence: bulk
X-CiviMail-Bounce: b.2.1.d91c1d307cebf582@xx.yy.gov


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Bounce Setup with IMAP
July 13, 2013, 01:15:41 pm
You need a "catch-all" mailbox to get those. See here http://serverfault.com/questions/501584/can-exchange-create-catch-all-addresses-for-address-domain-com as it may help. At least will point you in the right direction. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Bounce Setup with IMAP
July 13, 2013, 09:51:51 pm
Hi,

To be able to find who bounces (something not trivial if the recipient has aliases and forwarded emails), we send each email with a different sender (VERP) so when it comes back, we know to whom we sent it.

The usual trick is to use a single mailbox (say bounce@xx.yy.gov) and + notation: Most mail servers are sending yourmail+whatever@example.org to the yourmail@example.org mailbox, so if you configure bounce+ as the prefix, the mail will be sent as bounce+u.2.1.d91c1d307cebf582@xx.yy.gov and end up in the bounce mailbox.

Unfortunately, exchange is the only big mail server that doesn't handle the + notation. Assuming you can't switch to a better one, you have several options:

- have a catchall mailbox (the hershel way)
- use a separate domain to handle the bounces (I often use google apps for that)
- improve civimail (code or sponsoring) to use an alternative way of identifying bounces

On the latest, I have added the needed information (u.2.1.d91c1d307cebf582) as an extra header in the mail sent by civimail, seems to be quite reliable (but not as much as VERP as some mail servers strip these extra headers when they bounce)

Good luck

X+




-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Bounce Setup with IMAP
July 14, 2013, 04:14:37 am
Quote from: xavier on July 13, 2013, 09:51:51 pm
- have a catchall mailbox (the hershel way)

LOL!

The Hershel Way is actually a celestial body not far from the Milky Way. It is a large cluster of Linux servers floating in space, attached to the nearest moon via a single T2 cable. They only run PHP 8, however, and there is not yet any software compatible with that, but a version of CiviCRM is expected to be released by a third party of trained monkeys within a week or two that should work. Stay tuned...
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

dmdude

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: None
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.2
Re: Bounce Setup with IMAP
July 15, 2013, 04:40:08 am
Thanks for the replies.  The catch-all mailbox will not work for us because we have to have recipient filtering turned on in Exchange.

We get way too many emails to have google or another outside org handle them.  I can set up subdomains in our org, but that would mean that each site would have its own server, and I'm hoping to keep this multi-site.

It appears the only solution is to:
  • improve civimail (code or sponsoring) to use an alternative way of identifying bounces

Ugh.  I can't believe there isn't a better way!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Bounce Setup with IMAP
July 15, 2013, 04:41:21 am
You can't use sub-domain email addresses?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

dmdude

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: None
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.2
Re: Bounce Setup with IMAP
July 15, 2013, 04:53:21 am
I don't think so, unless I don't understand correctly.

All our mail (for all the different website subdomains under "myorg.gov") goes to the single subdomain "email.myorg.gov".  We get probably millions of emails every week.

I can set up subdomains but wouldn't that mean a single sendmail server for each subdomain?  We are trying to set up a multi-site Drupal/CiviCRM environment.

Is there something I missed?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Bounce Setup with IMAP
July 15, 2013, 05:11:12 am
Quote from: dmdude on July 15, 2013, 04:53:21 am
I can set up subdomains but wouldn't that mean a single sendmail server for each subdomain?

No. :)

You don't need separate physical servers to support email from multiple subdomains.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

dmdude

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: None
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.2
Re: Bounce Setup with IMAP
July 15, 2013, 05:22:27 am
Well OK!  I freely admit that I am no sendmail expert.   :)

So what you are saying is that I can set up subdomains pointing back to my multi-site Drupal/CiviCRM server, and have sendmail running on it such that it can separate the emails into different mailboxes based on subdomains?

And then the bounce processor job can read from the local mailbox to retrieve the bounces?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Bounce Setup with IMAP
July 15, 2013, 05:26:58 am
Quote from: dmdude on July 15, 2013, 05:22:27 am
Well OK!  I freely admit that I am no sendmail expert.   :)

Me neither, but that's how I think it works.

Quote from: dmdude on July 15, 2013, 05:22:27 am
So what you are saying is that I can set up subdomains pointing back to my multi-site Drupal/CiviCRM server, and have sendmail running on it such that it can separate the emails into different mailboxes based on subdomains?

Yes, you should be able to. Consult a sendmail expert for a definite answer. Or just try. :)

Quote from: dmdude on July 15, 2013, 05:22:27 am
And then the bounce processor job can read from the local mailbox to retrieve the bounces?

You can use multiple domains for CiviMail--it shouldn't matter of they are top domains or subdomains. The point is that they are unique. See http://wiki.civicrm.org/confluence/display/CRMDOC43/CiviMail+Installation for how to set up CiviMail for multiple domains.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

dmdude

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: None
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.2
Re: Bounce Setup with IMAP
July 15, 2013, 05:55:15 am
Thanks!  I missed that -s flag earlier.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Bounce Setup with IMAP
July 15, 2013, 06:03:07 am
Hi,

If you have the choice, use postfix or exim rather than sendmail, the price is the same but will save you a lot of therapy sessions with your shrink.

Anyway, what matters is that you have a mail server on a domain or subdomain you control (so you can set up the SPF) and that support the + notation. You create one mailbox per site/civicrm install and you should be all good.

That "mailbox" domain doesn't have to do anything web related, you don't need to redirect it to you civicrm install, it's only there to be receiving bounces, and the only place you need to see it is when setting the mailbox on civimail

X+
X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Bounce Setup with IMAP

This forum was archived on 2017-11-26.