4

CiviCRM 5.19.2 WP 5.3

Testing my bounce settings, and I'm not sure whether I actually have a problem or not. I've set up both 'bounce' and 'activity processing' accounts, and their respective scheduled jobs run without error (and CiviCRM has created the corresponding folders in both accounts).

Using the default 'from' address (info@mydomain), I've been sending a newsletter out to a small dummy group containing faulty addresses (one, for example, is an old work address of mine that's disabled). While I get an immediate message from the google mailer-daemon ("550 5.2.1 The email account that you tried to reach is disabled"), sent to info@mydomain. Shouldn't that go to bounce@mydomain, the account I've set up for bounce processing? Or am I misunderstanding something basic?

I can also confirm that I can send email to bounce+ (and receive it there), but the when I'm sending with CiviMail I only receive the bounce message in the reply-to (which is the sending) address. See the image below.

Original Message

3 Answers 3

0

You may want to ensure that the mailbox you are using supports tagging. Send a [email protected] email and see if it arrives.

Microsoft outlook365 servers generally do not. Gandi can be good, but there are also many other providers that do support tagging (the +123 bit).

Google isn't so good, as there can be issues with SPF records which can lead to your mails being marked as Spam and may lead to blacklisting etc.

in general, mail-tester.com is a good site to use to test integrity of email (and the likelyhood of them failing / being marked as 'junk'. If you send a mail from civi to the "address" provided by mail-tester it will flag a problematic reply address (in the sense of spf failing etc). It will also let you know if there are any other infrastructure issues to look into.

3
  • Using a single mailbox to process your bounces is possible if it supports "tagging" (usually called subadressing: en.wikipedia.org/wiki/Email_address#Sub-addressing). But that's not required for bounce processing, and the more industrial way is to use a dedicated domain (typically a subdomain of your main domain, but not necessarily).
    – Alan Dixon
    Commented Dec 4, 2019 at 18:49
  • The key problem with using a single mailbox is that the domain will need to be configured for deliverability from your server, i.e. using SPF records, so you need some control over the domain, which you're not going to get from @gmail or any other domain that you don't own (unless it's provided by whoever is doing your bounce processing, e.g. typically a dedicated service provider like UAS).
    – Alan Dixon
    Commented Dec 4, 2019 at 18:50
  • Ahh... thanks Alan. I've always had control over the domain for mailboxes, so not realised.
    – Marsh
    Commented Dec 6, 2019 at 9:27
2

The key to getting bounces sent to the right account is the Email Domain of the Mail Account that you've configured for Bounce Processing. The emails that are sent out use that domain for the "envelope" from address (which is not the one you see as sender or recipient, but the one that's hidden in the smtp conversation between machines).

As more detailed explanation is here: https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/inbound/

In summary:

The "envelope" From address for a civi message is built uniquely per message and recipient as "[email protected]". When it bounces, the bounce processing will process it based on that from address to determine what to do with it.

So your bounce domain is usually NOT your from address domain, it's a special domain that can handle bounces. You normally would not want to do this yourself, though it's been done and there are instructions to do it using specially setup gmail addresses using some more involved addressing magic.

2
  • Thanks, Alan. I understand all of your words, but I can't figure out what action I might take -- the email domain setting is correct. It is the same 'domain.org' as the rest of my addresses. Should it not be? (I mean, I'm sending from <[email protected]> and my mail account settings for bounce also indicate <mydomain.org> as the Email Domain). I don't know what I could change, here. I've read the more detailed explanation so many times I can almost recite it! I love the CiviCRM documentation, actually, but this one keeps bringing me to where I already am.
    – mc_burger
    Commented Dec 3, 2019 at 1:29
  • Okay, I added a bit more, I expect you need to read up on 'envelope from addresses'.
    – Alan Dixon
    Commented Dec 3, 2019 at 17:55
0

One possible cause for this is that the mail server software you're using assumes mail to your domain is for you.

In my example, using Postfix, I had the following line in /etc/postfix/main.cf:

mydestination = $myhostname, mysite.org, server1.mysite.org, localhost.mysite.org, localhost

That means that any mail sent through this server to an address ending in @mysite.org will be processed by this server. However, this is NOT the mail server for mysite.org! Removing mysite.org from mydestination fixed the problem.

The line that tipped me off was in /var/log/mail.log which read:

May 26 18:33:23 server1 postfix/local[120265]: 01CD0405FB: to=<[email protected]>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "bounces")

The unknown user: "bounces" showed that Postfix was trying to deliver this email locally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.