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 »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • SMTP outgoing / DNS issue?
Pages: [1]

Author Topic: SMTP outgoing / DNS issue?  (Read 1284 times)

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
SMTP outgoing / DNS issue?
June 16, 2010, 04:58:41 am
I was using gmail previously as my outbound smtp server as well as my account to catch bounces for civimail. When I would configure my SMTP settings for that and 'save and send test email' the from address was the gmail account.

Now I want to try to use a non-gmail account. My website domain is (as an example) 'mydomain.com'. To make my mailings look better, I want to send email from 'mydomain.net' (can't use the .com because mail for that is set up with an exchange server). So I registered 'mydomain.net' and am pointing it to the same webhost and have the email address 'admin@mydomain.net' set up. That's what I want to use for bounces.

I can configure IMAP client on my computer just fine and it sends/receives from admin@mydomain.net without a problem. So now I want to set it for outgoing mail in CiviCRM. When I go to configure that and choose 'save and send test email' the from address is 'admin@mydomain.com'. Why is this acting differently than when I use gmail?

I wouldn't care except that when I try to do a CiviMail all the bounces go to 'admin@mydomain.com' instead of 'admin@mydomain.net', so they don't get processed.

Is this DNS related or Civi related?

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SMTP outgoing / DNS issue?
June 17, 2010, 02:14:45 am
Quote from: emilyf on June 16, 2010, 04:58:41 am
I can configure IMAP client on my computer just fine and it sends/receives from admin@mydomain.net without a problem.

Ok, this means that the address is working.

Quote
So now I want to set it for outgoing mail in CiviCRM. When I go to configure that and choose 'save and send test email' the from address is 'admin@mydomain.com'. Why is this acting differently than when I use gmail?

Did you also change the ‘From Email Address’? It’s in Administer → Configure → FROM Email Addresses
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: SMTP outgoing / DNS issue?
June 17, 2010, 03:42:00 am
I think I'm not explaining myself clearly.

Here is what I need with CiviMail:
From address of: admin@mydomain.net (for bounces)
Reply to: admin@mydomain.com

IF I configure my outgoing SMTP settings with a Gmail address, then the above becomes:
From address: gmail address
Reply to: admin@mydomain.com

Meaning, it is working how I would want it. But once I configure my outgoing SMTP settings to use the 'mydomain.net' address, I get the following:

From address: admin@mydomain.com
Reply to: admin@mydomain.com

If I add 'admin@mydomain.net' to the 'From Addresses', then it only changes to the following:

From address: admin@mydomain.net
Reply to: admin@mydomain.net

Whether I do or do not override the VERP address, I either always get both From/Reply to as being from 'admin@mydomain.com' or both being to 'admin@mydomain.net'. I need the combination like it works properly with gmail.

Not to mention for the Gmail option I don't have to add a new From address and it works perfectly. So why does this happen?

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SMTP outgoing / DNS issue?
June 17, 2010, 07:22:30 am
Thanks for the examples, this is much more clear now. :)

Quote
Here is what I need with CiviMail:
From address of: admin@mydomain.net (for bounces)
Reply to: admin@mydomain.com

Note that bounces do not go to the From: address, but to Return-Path:, which – in the case of CiviMail emails – is a VERP-ed (optional_localpart+)b.…@… address.

Quote
IF I configure my outgoing SMTP settings with a Gmail address, then the above becomes:
From address: gmail address
Reply to: admin@mydomain.com

Hm, this is strange. By looking at the code we either set the Reply-To: to a VERP-ed (optional_localpart+)r.…@… address or the From: address (if ‘Override VERP address?’ is checked in step 3, assuming CiviCRM 3.1). Are you sure this is the case? Also, can you actually revert to this setting (by setting your From: to the Gmail address, which – I assume – differs from admin@mydomain.com)?

Quote
Not to mention for the Gmail option I don't have to add a new From address and it works perfectly. So why does this happen?

But in this case the From: is set to your contact’s email, right?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: SMTP outgoing / DNS issue?
June 17, 2010, 09:39:03 am
Two things in case there's some kind of bug here.

I did get this working, thank you for explaining return-path, I feel very dense but I was not understanding that properly. So I can now send from my .com address but have my return path set to the .net address and my bounces are working (I had to set up a catch all as you suggested). This worked.

However, just an FYI on the gmail stuff. I just double checked by reverting back to that, and this is what happens:

- With a Gmail address in my outgoing SMTP settings
- Gmail address as my Mail Account for the IMAP bounce connection
- No gmail address in the 'From Accounts' area

Then if I do a CiviMail doing a 'FROM' as my normal 'admin@mydomain.com', and I choose to override VERP, the email comes through with:

- FROM is the gmail address
- Reply-to is the admin@mydomain.com
- return-path is gmail address

It sounded like from your post that is in fact the wrong behavior...This is 3.1.5. So just confirming that I do see that.

For my purposes, this is resolved, so thanks so much. But if you need me to further test the gmail stuff let me know!

andrewhunt

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 13
    • AGH Strategies
  • CiviCRM version: all of 'em
  • CMS version: Drupal, Joomla, and WordPress
Re: SMTP outgoing / DNS issue?
June 17, 2010, 03:01:42 pm
When Gmail acts as a SMTP relay, it replaces the from address with its Gmail address.  It happens if you do it through Thunderbird or any other client, too.
You can find me at AGH Strategies.
Need help now?  Civi911 is your go-to for CiviCRM support.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SMTP outgoing / DNS issue?
June 18, 2010, 08:22:01 am
Quote from: emilyf on June 17, 2010, 09:39:03 am
I did get this working, thank you for explaining return-path, I feel very dense but I was not understanding that properly.

Please don’t feel that way – this is definitely not easy, and any such feelings come from the fact that everyone assumes it’s easy (the whole difference between the email’s From header and the SMTP envelope’s FROM ‘header’ – which gets translated to the email’s Return-Path header and is the one bounces should go to – is the ‘aha!’, or, more often, ‘why is this so complicated‽’ moment). :)

Quote
So I can now send from my .com address but have my return path set to the .net address and my bounces are working (I had to set up a catch all as you suggested). This worked.

You need to either setup a catch-all address or use the localpart setting; in Gmail’s (and many other servers’) case if you have an account@example.org address, any emails sent to account+anything@example.org will be delivered to account@example.org.

Quote
However, just an FYI on the gmail stuff. I just double checked by reverting back to that, and this is what happens:

- With a Gmail address in my outgoing SMTP settings
- Gmail address as my Mail Account for the IMAP bounce connection
- No gmail address in the 'From Accounts' area

Then if I do a CiviMail doing a 'FROM' as my normal 'admin@mydomain.com', and I choose to override VERP, the email comes through with:

- FROM is the gmail address
- Reply-to is the admin@mydomain.com
- return-path is gmail address

It sounded like from your post that is in fact the wrong behavior...This is 3.1.5. So just confirming that I do see that.

Thanks, this is most interesting…
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SMTP outgoing / DNS issue?
June 18, 2010, 08:22:25 am
Quote from: andrewhunt on June 17, 2010, 03:01:42 pm
When Gmail acts as a SMTP relay, it replaces the from address with its Gmail address.  It happens if you do it through Thunderbird or any other client, too.

…and Andrew’s reply is most welcome, as it clarifies the mystery. Thanks so much!
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • SMTP outgoing / DNS issue?

This forum was archived on 2017-11-26.