1

I have James server (SMTP server) hosted on AWS EC2. I have small application running on this AWS instance which fetches certain emails from my Gmail account.

Gmail rejecting any IMAP request from my AWS EC2 with message suspicious activity.

When I did login (RDP) to EC2 instance and open gmail in a browser (in which case it prompted me to valid few other details apart from regular password), it worked fine and all subsequent requests from my small application working fine.

It doesn't make sense to ask all users to do RDP to server first, then only use this application.

Does any one have any suggestions on how can I overcome this issue and make sure Gmail server trusts my AWS EC2 instance as valid instance?

Thanks for your time.

7
  • 1
    Gmail has likely blacklisted EC2's IP range due to abuse. Use Amazon SES, Mandrill, Postmark, or another similar e-mail provider.
    – ceejayoz
    Nov 1, 2013 at 19:03
  • @ceejayoz: I can't use SES because of custom functionality I have (that is one of the reason why I ended up with Apache James). Is there way I can put in requests to unblock my IP?
    – kosa
    Nov 1, 2013 at 19:09
  • 1
    Another method: go to google.com/accounts/DisplayUnlockCaptcha then have your EC2 instance initiate an IMAP connection. See support.google.com/mail/answer/14257?p=client_login&rd=1 Nov 1, 2013 at 20:38
  • 1
    @Nambari I'm having a hard time imagining custom functionality that would forbid you from using a service like SES. Can you elaborate?
    – ceejayoz
    Nov 1, 2013 at 21:09
  • @ceejayoz: (Please note that I have high level info SES, so correct me if I am wrong). I need capability to create email account on server for every user registered from my application 2) need to have a capability to read emails from SES (I think this can be achieved)
    – kosa
    Nov 1, 2013 at 21:19

1 Answer 1

3

In fact, the problem is simple: your JAMES server is running in an instance that's probably geographically far from where you usually are when you log in to your Gmail account, so it appears to Google like someone is trying to break into your account (after all, how can you be logging in from California and Virginia within a couple of hours of each other?). So to be safe, they block the connection and send a warning. The warning is usually accompanied by an "Is this you?" link and if you say "yes", you'll be able to log in with JAMES in a few hours.

Recently, Google has implemented a setting that lets you connect using what Google refers to as "less secure mail clients", so the dreaded "Suspicious signin detected" message should become a thing of the past.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .