Author Topic: ...use GMail SMTP with company IMAP with different username  (Read 7332 times)

Astrin

  • Newbie
  • *
  • Posts: 14
...use GMail SMTP with company IMAP with different username
« on: November 26, 2015, 04:32:23 pm »
I'm stuck. GMail started rejecting my sends due to the security protocol issue, so I deleted the account and set it up again using your GMail option. Fine. The problem is that my company uses GMail SMTP (for spam filtering) but uses internal IMAP with a different username. I can't figure out how to manually configure GMail SMTP with username@company.org while IMAP uses just username for authentication. There is no username field on the individual IMAP config.

Sent from my Nexus 10 using Tapatalk


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: ...use GMail SMTP with company IMAP with different username
« Reply #1 on: November 27, 2015, 06:11:44 pm »
Re: my company uses GMail SMTP (for spam filtering)

SMTP is for sending -- is this "spam filtering" intended to protect the world outside from spam sent by your company's staff???

Usually spam filtering is done on the receiving side, not sending...

But anyway...

What you will want to do is --

- Add account -> choose Internet mail (not Gmail)

- Enter your desired "From" email address (your corporate email address)

- Press Manual not Next

- You'll see detailed incoming server settings -- fill in your corporate IMAP server details

- Press Next to advance to outgoing server settings

- Enter smtp.gmail.com + SSL + port 465 and whatever login / password you're supposed to be using


Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Astrin

  • Newbie
  • *
  • Posts: 14
Re: ...use GMail SMTP with company IMAP with different username
« Reply #2 on: November 28, 2015, 02:31:33 am »
Actually the MX record is GMail, so it does do the spam filtering before sending it onward. We have to look at our GMail account to see the spam folder. But we pull from the company IMAP server. I totally agree that it's weird.

Sent from my Nexus 10 using Tapatalk


Astrin

  • Newbie
  • *
  • Posts: 14
Re: ...use GMail SMTP with company IMAP with different username
« Reply #3 on: November 28, 2015, 02:38:54 am »
But your suggestion is exactly what I had before Google got picky about authentication, and now when I try your setup, I get the standard error message from Google:

Outgoing mail server (SMTP): Authentication error. 534 5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbssy 534 5.7.14 RyK0bWBUHMZnRBbf5AB3wmG8-pRplofCN4Ub-VkRG-kT5otiNIUaiJFJNVqrE7IATJSYAE 534 5.7.14 Z7AqMRa-etgKL_GfjdurwTI37kERqBFNKA1Ym-POQzL-7ksW8YxXOd418JOQJvKE1Hem34 534 5.7.14 oaqSFxtRcA8fL_4qjlTUXuXkBoScgaPvtprKCgRz-LKLJ6VE6a4a2cZZR1oAX18exJbgqU 534 5.7.14 ZI1TtoolUUTF2Lw6SdTEMrICuTTw> Please log in via your web browser and 534 5.7.14 then try again. 534 5.7.14  Learn more at 534 5.7.14  https://support.google.com/mail/answer/78754 [nofollow] i12sm29494115ywg.40 - gsmtp

Please make sure the data is correct.

Sent from my Nexus 10 using Tapatalk


Astrin

  • Newbie
  • *
  • Posts: 14
Re: ...use GMail SMTP with company IMAP with different username
« Reply #4 on: November 28, 2015, 04:54:00 am »
Also, with that auth attempt, Google sends this email, which I'm sure you've seen before:

Sign-in attempt prevented

Hi [username],
Someone just tried to sign in to your Google Account [email] from
an app that doesn't meet modern security standards.

Details:
Friday, November 27, 2015 5:36 PM (Central Standard Time)
Madison, WI, USA*We strongly recommend that you use a secure app, like
Gmail, to access your account. All apps made by Google meet these security
standards. Using a less secure app, on the other hand, could leave your
account vulnerable. Learn more
<https://support.google.com/accounts/answer/6010255>.

Google stopped this sign-in attempt, but you should review your recently
used devices:

REVIEW YOUR DEVICES NOW
<https://accounts.google.com/AccountChooser?Email=[email]&continue=https://security.google.com/settings/security/activity?rfn%3D27>

Best,
The Google Accounts team


*The location is approximate and determined by the IP address it was coming
from.

This email can't receive replies. For more information, visit the Google
Accounts Help Center <https://support.google.com/accounts/answer/6010255>.



You received this mandatory email service announcement to update you about
important changes to your Google product or account.
© 2015 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA

Astrin

  • Newbie
  • *
  • Posts: 14
Re: ...use GMail SMTP with company IMAP with different username
« Reply #5 on: November 28, 2015, 04:56:31 am »
I think I'd be all set if I could specify OAuth2 authentication in the generic "Internet email" setup that you suggest, but I don't see how I can do that.

mikeone

  • Hero Member
  • *****
  • Posts: 2762
Re: ...use GMail SMTP with company IMAP with different username
« Reply #6 on: November 28, 2015, 11:43:59 am »
Hi Astrin,
Regarding "... from an app that doesn't meet modern security standards." please read the following thread in this forum :

http://www.aqua-mail.com/forum/index.php?topic=2870.msg12955#msg12955

mikeone

  • Hero Member
  • *****
  • Posts: 2762
Re: ...use GMail SMTP with company IMAP with different username
« Reply #7 on: November 28, 2015, 11:56:41 am »
I think I'd be all set if I could specify OAuth2 authentication in the generic "Internet email" setup that you suggest, but I don't see how I can do that.
Regarding "How to change my Gmail account to OAUTH2":

There is a section in the FAQ:

http://www.aqua-mail.com/?page_id=227

Search for  "Version 1.5.1+: Google's new authentication, OAUTH2"

You could also have a look into this thread:

http://www.aqua-mail.com/forum/index.php?topic=3085.msg14748#msg14748

Enjoy the weekend
Mikeone

Astrin

  • Newbie
  • *
  • Posts: 14
Re: ...use GMail SMTP with company IMAP with different username
« Reply #8 on: November 28, 2015, 05:36:06 pm »
Right, the problem is the mismatch between SMTP (GMail) and IMAP (company) usernames. The OAuth2 upgrade does not allow me to use a different username for the IMAP login. I can't authenticate with my IMAP server using my full GMail username.

Sent from my Nexus 10 using Tapatalk


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: ...use GMail SMTP with company IMAP with different username
« Reply #9 on: November 29, 2015, 01:02:58 am »
Re: The OAuth2 upgrade does not allow me to use a different username for the IMAP login

Correct, that's why I wrote:

Quote
- Add account -> choose Internet mail (not Gmail)

Or you can add the SMTP server into Gmail (in web mail) as an identity for sending, then add this identity into AquaMail under the Gmail account and work it that way. This will work with OAUTH.

The OAUTH2 upgrade -- the green panel -- is only a suggestion / notice, you don't have to do it if you know your setup is "special".
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: ...use GMail SMTP with company IMAP with different username
« Reply #10 on: November 29, 2015, 03:20:10 am »
I think the ultimate problem @Astrin is experiencing is that Gmail's SMTP server is barking on the "insecure" authentication:
But your suggestion is exactly what I had before Google got picky about authentication, and now when I try your setup, I get the standard error message from Google:

Outgoing mail server (SMTP): Authentication error. 534 5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbssy 534 5.7.14 RyK0bWBUHMZnRBbf5AB3wmG8-pRplofCN4Ub-VkRG-kT5otiNIUaiJFJNVqrE7IATJSYAE 534 5.7.14 Z7AqMRa-etgKL_GfjdurwTI37kERqBFNKA1Ym-POQzL-7ksW8YxXOd418JOQJvKE1Hem34 534 5.7.14 oaqSFxtRcA8fL_4qjlTUXuXkBoScgaPvtprKCgRz-LKLJ6VE6a4a2cZZR1oAX18exJbgqU 534 5.7.14 ZI1TtoolUUTF2Lw6SdTEMrICuTTw> Please log in via your web browser and 534 5.7.14 then try again. 534 5.7.14  Learn more at 534 5.7.14  https://support.google.com/mail/answer/78754 i12sm29494115ywg.40 - gsmtp

And for that reason, (s)he wanted to use OAUTH just for the SMTP. Aquamail cannot do that at this point.
(Mixing different types of authentication for IMAP and SMTP is probably possible in principle. - At least I don't see anything that would forbid that, but I don't know Gmail's OAUTH. But this possibility is not implemented in Aquamail.)

@Astrin:
In the current situation, you will have to follow what GMail requests in that quoted message. Namely, go to that link and follow the instructions. And you might have to do that time to time...
Or, you may enable the "two-step" authentication for devices, which presumably would prevent your from such accidents, but you'd need to re-authenticate your devices about once every 6 months.. (I haven't used that myself.)

@Kostya:
From what I understand, Astrin's company is already using GMail SMTP service. So, he doesn't need to setup the aliases in Gmail.
(I suspect that in reality, that company has signed up a contract with Google to be the corporate mail provider, and the "internal" IMAP server might be essentially pointing to a dedicated Google's server (or it might be an internal server that mirrors Gmail's IMAP server). And that's why the username for the IMAP is not USER@hiscompany.com but just USER. But it is USER@histcompany.com for authentication to the GMail's SMTP server.)

Or you can add the SMTP server into Gmail (in web mail) as an identity for sending, then add this identity into AquaMail under the Gmail account and work it that way. This will work with OAUTH.

Astrin

  • Newbie
  • *
  • Posts: 14
Re: ...use GMail SMTP with company IMAP with different username
« Reply #11 on: November 29, 2015, 04:58:31 am »
ahhh I was wondering if "identities" was the key. I'll give that a whack! (FWIW, Thunderbird is easy on this because the IMAP and SMTP configs are totally separate: you enter "bob" as your IMAP username and "robert@acmepackers.com" as your GMail SMTP username and select "OAuth2" and you're all set. You get the Google auth page, you sign in, and happiness ensues.)

Sent from my Nexus 10 using Tapatalk


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: ...use GMail SMTP with company IMAP with different username
« Reply #12 on: November 29, 2015, 03:45:36 pm »
Sorry, OAUTH in AquaMail is applied to whole account -- meaning to IMAP and SMTP servers (and it forces IMAP over POP3 too).

If you're getting auth failures on SMTP, then it probably really is Google's desire to force OAUTH on everyone, so yes, it will need to be turned off.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/