ip address range of google notification servers google-cloud-storage - google-cloud-storage

We have setup google object notification for buckets in google-storage, our network administrator wants to restrict incoming ip address and wants it to be only google specific.
Is there a range of IP address that are used by google for posting object notification request?

There are no guarantees about what IP addresses the notifications will come from.
Instead, when you initially create the notification channel, set a custom client token. When notifications are delivered, they will include the custom token. Your servers can verify the token before processing the incoming messages.

Related

How to track activity for a do-not-reply email in the SendGrid account

We are new in Sendgrid and we want to use it to track our system email but it did not seems to work with the new API key. The system are using do-not-reply email to track on the user activity.Can I know how can we authenticate this email to keep track on the activity in the SendGrid?
If you want to receive emails with SendGrid you need to do a few things. Here's an overview of what you'll need to do:
Get a domain that you want to receive emails on.
Set up MX records for a hostname on that domain to receive emails via SendGrid. Note that the hostname you choose (it can be a subdomain) should be used exclusively to parse your incoming email. The MX record should point to mx.sendgrid.net with a priority of 10.
Set up the webhook URL. In your SendGrid dashboard, click settings, then Inbound Parse and then Add Host & URL
Specify the receiving domain or hostname and a URL that will receive the webhooks when an email is received.
Save
The process of setting up the Inbound Parse Webhook is documented in detail here.
What you do with the webhook from then is up to you.

How do I change the email address that Amazon SES feedback reports go to?

Background: I was handed the reins for our company's AWS account to implement a process to make sure our SES delivery report notifications can get acted on instead of just being filed away or deleted.
That said, the first hurdle is that the email address associated with our company's helpdesk keeps receiving all Amazon SES notifications for bounces, complaints and delivery failures. This creates a mess for our support staff in having to wade through these emails individually, and our ticketing system doesn't have the capability of auto-forwarding emails even though I can categorize them based on rules when they arrive.
I have read through all the knowledge base articles for SES notifications as well as ~380 forum topics relating to email notifications, but I didn't see an answer posted this question even though it had been asked a handful of times.
What we've done:
Set up a dedicated email inbox for these requests so we can then process them correctly (that we want to divert these messages to).
Created an SNS topic with the new email address as its endpoint and applied it to all categories, but the emails still kept going to support, so that clearly wasn't the solution.
Removed all hard-coded references to these emails from our software code, but we still get individual Amazon SES notifications to the helpdesk (~30 a day).
Simple idea, but AWS is pretty intimidating especially for our small company where no one has taken the time to learn through the ins and outs after first setting it up (fire and forget).
Edit for clarity, the emails I'm trying to redirect are "Delivery Status Notification (Failure/Delay)" and "Undeliverable:..."
Here's how i got this to work:
Under "AWS SNS"
Create an SNS Topic
Create a subscription to the topic that sends an email to your desired "catch address"
Confirm this subscription by clicking the link sent by AWS to this address
Under "SES Management - Identity Mangement"
Verify a domain or email address
At the domain/email address go to Notification and DISABLE Email Feedback Forwarding
Same place select your SNS topic for Bounces and Complaints
Under "SES Managment - Email Receiving"
Create a Rule set and then create a rule with the domain or email address above
Make the action the SNS rule above
When sending mail be sure that the From address is using the domain/email address above. All bounces and complaints should now end up in the catch address inbox. ALL OF THIS must be setup in the same region.
These notifications are configured either at a verified Domain level or at a verified email address level. This page has info on it. At the bottom, it talks about how you can confirgue to have messages sent to email or a SNS topic. You probably have a notification setup on your domain or the specific email address you are using.
You'll find all this in the SES section of the AWS Console under the Identity Management section. Make sure you check both the Domains area and the Email Addresses area.
You make the feedback address differ from the sender by setting the Return-Path header in your message (subject to a few other rules):
From the developer guide:
If you used the SMTP interface to send the message, then notifications go to the address specified in the MAIL FROM command.
If you used the SendEmail API operation to send the message, then the notifications are delivered according to the following rules:
If you specified the optional ReturnPath parameter in your call to the SendEmail API, then notifications go to that address.
Otherwise, notifications go to the address specified in the required Source parameter of SendEmail.
If you used the SendRawEmail API operation to send the message, then the notifications are delivered according to the following rules:
If you specified a Source parameter in your call to the SendRawEmail API, then notifications go to that address. This is true even if you specified a Return-Path header in the body of the email.
Otherwise, if you specified a Return-Path header in the raw message, then notifications go to that address.
Otherwise, notifications go to the address in the From header of the raw message.

Sending email from GCE or AWS on behalf of users

How could I use Google Compute Engine (or a similar service, like AWS) to send email on behalf of users via their SMTP server?
I am interested in building an online email client which allows users to enter their SMTP and POP servers and send/receive email, like they would with their desktop clients. GCE blocks all SMTP ports to prevent abuse and recommends using a mail service like SendGrid instead. However, after researching dozens of these services, they all seem to only support transactional email using their own SMTP servers, or possibly a pre-cleared smtp server. I simply want to send email using the user's SMTP server (ex smtp.mail.yahoo.com), just like they would if they were using a desktop client.
I realize I could host my own servers but I am not interested in maintaining the infrastructure. I would like to host everything on a cloud service. Is there any way I can work around Google's restrictions with an existing service?
As I'm sure you are aware, you would have to have the user enter their SMTP server information and account credentials. You would then use that information to connect to their SMTP server.
By default AWS EC2 instances have SMTP traffic on port 25 rate limited. To remove this limitation, you would need to fill out and submit the following form:
https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
If you're looking to send mail as a Gmail, Hotmail, or Yahoo user, you'll probably want to call the service's API to have the server send mail on the user's behalf. There are several benefits of this:
You'll need to get authorization from users (usually via an OAuth flow)
in order to access their mail. This means that users shouldn't be
surprised that you're sending mail from their accounts, and they'll
have some control over your access.
The mail will be signed and come from the appropriate IP addresses to
comply with the various spam-control mechanisms set up by those
companies. Without this, it's likely that the mail you send will end
up in the bit-bucket of the recipient.
By using the API, the service should be able to keep a copy of the
sent mail in the user's outgoing mail folder. This will let the user
see and search for the original message sent if they want.
Unfortunately, this may also mean that each mail service you want to send from will need separate integration, and that you may not be able to send as the user's email address from smaller providers.
Note that the App Engine mail API allows you to send mail as the currently logged-in user (when logging in, users have a similar consent screen to the OAuth process mentioned above).

Gmail images are requested through Google's Image Proxy and not the IP of the user who opened the email

I noticed that all requests to load images from my server in Gmail come through Google's Image Proxy service under IP 66.249.93.42
Is there any way to know what the source IP that initiated the request? My server performs some localization logic based on the originating country of the request - and at the moment it appears that all Gmail users are 'physically' located in Mountain View, CA when they are obviously not
Gmail will only serve images though Google's own proxy servers, according to the official Gmail blog. They also do this to prevent senders from getting the recipient's IP address.
Gmail serves all images through Google’s image proxy servers and
transcodes them before delivery to protect you in the following ways:
Senders can’t use image loading to get information like your IP
address or location.
However, in my experience, if the recipient is checking their emails inside Outlook or another mail client, the IP address is passed when requesting the image assets.

Best way to get another Facebook user's IP address

My Facebook application needs the IP Address of another user to communicate with that other user. So two users are using my application and one user wants to communicate with the other user. How does user A get the IP address of user B, or alternatively how does user B send its IP address to user A?
If this is not possible without passing the data manually is there a DB table that the IP address can be written to. My Facebook application has the ability to get its own local IP address. I just need a way to get the remote IP address using API's.
Facebook don't have support for any custom data storage, you will need to handle this on your own in your applications server code.
Basically you will need to have a database (or similar storage) where you store facebook user id and IP-address.
Another note is that you can't get another Facebook users IP-address from Facebook, you need to get it from your connection to the user.
Have both users connect to a server of your choice, register the IPs there.
Facebook does not supply users' IP addresses, so you'll need to handle this on your own. You should be able to retrieve this from the HTTP request headers your users submit. Check the source IP and store it in a database, then use that to send to the other user.