Validate Google Bot ip address on GAE standard - sockets

I have a website built with a GAE 2nd gen Python 3 app.
Scrapers are scraping my website by forging the Google Bot user agent. I'd like to validate the IP address of the scrapers so I can reject them but not reject real Google Bot traffic.
It seems that the best way to do this is with DNS lookups as described here. Doing DNS lookups, however, requires using socket.gethostbyaddr and socket.gethostbyname but sockets are not allowed in GAE standard. I know that sockets are available with GAE flex but I can't switch to GAE flex.
Thanks to Steffen's comment I see that you can download the google bot IP addresses, but I don't want to have to track this and update my code when it changes. The dynamic approach seems easier and safer.
Is it possible to dynamically validate that an IP address corresponds to the Google Bot in a GAE 2nd gen Python 3 app?

Related

How to set up website domain email address for access on Windows Mail and others

I have recently developed a website for a client and don't have much experience working with emails. I have set up and configured an info#ourdomain.com email address and can access it through our web hosting service.
However I want to be able to get my client to log into the email so they can begin working with it, ideally with Windows mail.
This is the information I have been given by the host (I changed all the information for security).
Information Provided
Would be great if I could get a step by step on what options to choose, account type, and where to put the certain port numbers etc.
Thanks in advance

Email protocol, mail server change and using another protocol from exist hosting

I have a domain which name is asifulmamun.info
Then, I've purchased a hosting for host website and connect this domain to hosting with cpanel by nameserver change.
I've create an email with this domain from Cpanel i.e. xx#asifulmamun.info.
Hosting provider told me that, my email has a limit for sending or receiving up to (25-30) email per hour.
But, if i will need to send/receive more than email from limitation how can I do this?
I think it's using my hosting server protocol for using mail email service.
Is it possible using another service provider protocol for using more than email from hosting server protocol?
Is it possible to use gmail server without purchase google cloude?
Is it possible, my domain will host in my exist hosting (Cpanel) and mail protocol using another service provider i.e. google, godaddy, aws or any service provider? If possible how?
Yes, you can use different service providers for incoming emails and for outgoing emails. In particular, you can use several email service providers for outgoing emails.
The "how" depends on what you want to do. I recently wrote a lengthy article on email. You find answers to all protocol-related questions there. The sections about email's architecture and its entities might be especially interesting to you.

Setting up Sendgrid using AWS

I currently have a site where the data is hosted on Firebase and the static files are hosted on AWS (I registered my domain using NameCheap, but am routing to AWS using Route 53 and S3).
I now want to use SendGrid to send emails, but they are saying that I need to set up an SMTP server. I can't find anywhere what the best way to do this is. Can I get suggestions please on the best solution? I want to use SendGrid to send transactional email such as "Welcome to the site!", "Forgot Password", etc.
There seems to be some misunderstanding here. You don't need to setup an SMTP server (that's the whole point of using a provider like SendGrid or SES). However, firebase is all client-side code, so if you want to do things like send emails or integrate third party APIs or do heavy computation that is not feasible on the client side, you'll have to have some server-side code running somewhere to manage those things.
You can read more about this in the Firebase FAQ
Update You can now achieve this using Firebase's integration with Zapier: https://www.firebase.com/blog/2013-11-25-fireabase-to-apis-with-zapier.html
Is there a reason you want to specifically use sendgrid? If you are already running on aws, you could use AWS SES instead. I've had nothing but problems getting sendgrid to work and finally gave up; with SES you can be up and running in minutes.
http://aws.amazon.com/ses/

How to create an email account and set up email receiver when using AWS EC2 and SES?

So we are planning to use AWS SES for sending emails. But how do we set up the email receivers? And how do we create an email accounts? When activating AWS SES, it asks to verify an email account (eg. help#example.org)...
I tried to create a mail server on one of the instances using postfix following this article: http://flurdy.com/docs/postfix/, but it's not easy at all... Does anybody know any better alternatives?
Thanks.
SES is for sending email only. As you note, you must have some other way set up to receive email at least at the "From" address you intend to use, because Amazon will verify it before letting you send.
While you certainly could set up an email server and domain on an EC2 instance, it's very complicated. I recommend that you get an email service for just that purpose. If you only need a single address for all your messages, just get a free address from Google, Microsoft, Yahoo, etc.
If you need multiple addresses, consider getting Google Apps for Business, either for an existing or new domain name (it's easiest to set up if you have it register a new domain name for you). It's no longer free, but it's still quite cheap. A single user account can receive emails for every address in the domain, it's flexible, and it's reliable. It's a good companion to using SES for sending automated emails.
Use Amazon WorkMail if you prefer AWS. Gmail for work, Office 365, Hostgator, are some other examples. FYI, none of these providers simply provide domain emails. They come bundled with many other things such as chat clients, calenders, etc. Pricing of these services depends on what other things they are bundled with.
$4/user/month for AWS
$5/user/month for Google
$5/user/month for Microsoft
Since you are in AWS cloud, I will tell you a few things about Amazon WorkMail.
You get your own domain and 50GB of storage per user.
You get calendars for free.
You cannot use just any desktop mail client. You have to either use Outlook, or Mac's mail client, or the web interface. This is their weakest point. However, including other IMAP clients is in their roadmap (I guess atleast a year).
Integrates nicely with SES.
Important links:
FAQ page.
Features page.
There are many more features such as remotely removing emails from a device, managing your users, and so on.
What I can recommend you is to use Amazon WorkMail because they almost provide all the features supported by others, and you are tied with AWS anyway. AWS also recently launched Workspace and Workdocs (both separately billed) that will allow you to create a complete work solution. These services also combine nicely with IAM.

connect private XMPP account through gtalk

Recently started at a new small company that has the following infrastructure:
Private XMPP Openfire server that hosts #chat..com
Google Apps for email, chat, docs, etc. with account of #.com
The company uses the private/internal chat server heavily for communication. However that requires me to install and run a client on my machine like Adium/Psi and then chat history is stored locally etc.
Since getting the entire company to move away from their beloved internal chat server and use gtalk that comes built-in with google apps is not an option, the hope was to register the #chat..com account with gtalk and then handle all communication through gtalk similar to what folks have done with AIM, Facebook, and other transports. Benefit would be the following:
All chat history stored server side on gtalk side and serchable
Other people in the company do not need to change behavior
Android phone that is already sync'd with Google services will not be able to leverage the chats without the need to install another XMPP client.
No need to have a thick client installed on the desktop/laptop
I have researched the XMPP transports and tried to the registering but they do not seem to cover my situation. I have investigated two routes thus far with no luck:
Transport plugin for Openfire
Use public transport at http://jabberd.eu
Guidance and/or experience from someone who has accomplished this would be appreciated.
I've used Spectrum (v1 and v2) to connect Openfire to Gmail and Facebook. It shows up in the users' clients as a discoverable service. It requires that a remote roster plugin be added to Openfire and that Spectrum be run on the same box as Openfire.
In short, it acts similar to a web proxy. Your users don't have to change their account on your system but to Gtalk users, your users appear to be other Gtalk users. Any of your users who access Gtalk will be using their own Gtalk authentication so you don't need to maintain any extra authentication schemes.
Take a look at it at http://spectrum.im. The remote roster plugin for Openfire is attached to the bottom of the first message in http://community.igniterealtime.org/thread/46580 (it's filename is "gojara.jar").