I'm developing application for google app engine (python), witch needs not only to send emails, but also know which ones bounce back.
I created special account for my domain noreply#example.com, added it as an app admin and sending messages from it.
The problem is (and it was described here http://code.google.com/p/googleappengine/issues/detail?id=1800) - GAE sets the Return-Path to some internal email address, not allowing to receive bounced email messages.
Anyone aware of any possible workaround for this? Thanks.
It looks like someone bypassed this problem by switching to Yahoo's Mail API, which uses OAuth and can be used over HTTP. Until google fixes your problem, this looks like a viable solution.
Until the issue is resolved, workaround for my project is using typhoonae, bind mail service to google app's gmail as SMTP (to send messages from noreply#example.com). When sending this way, noreply#example.com receives bounced messages.
Google has actually since added a method for receiving bounced messages via an HTTP Request. It requires adding to your app.yaml:
inbound_services:
- mail_bounce
Which will cause a request to hit /_ah/bounce each time a bounce is received. You can then handle the bounce by adding a handler for it. See the section there on Handling Bounce Notifications for more details on how to glean the additional information from those requests.
You could use use a third party "email marketing" API like CampaignMonitor that keeps track of the bounced addresses:
http://www.campaignmonitor.com/api/method/subscribers-getbounced/
But you'd have to send mail through them, and sync your user list with theirs through their API.
Related
I am using Django rest Framework to build a REST API for one of my clients. The app provides some sensitive information such as passwords when the client asks for it through an API call.
Now, only authorized clients can access to the app and besides that, only authorized IP can connect.
But what if someone was listening in the middle of that connection ? He would see all the datas in clear.
Is there a way to encrypt those info, maybe with a password, and then decrypt it when it arrives ? (the client would have to update his app, but it's not a problem).
I was thinking maybe to create an "EncryptedResponse" instead of "Response" in my django app.
Thanks
If you don't have one already, purchase an SSL certificate and configure your site to load the API over HTTPS. That way the connection between the authorized client and your application would be encrypted which will prevent a man in the middle attack that you're describing.
If you're not going to load the API over HTTPS, then the authentication token, or API key, or whatever you're using to authenticate the client can also be intercepted.
However, if you're looking to stick to the encrypting the data route, I've found this guide that looks like it should help you be able do what you need to do:
http://gpiot.com/blog/encrypted-fields-pythondjango-keyczar/
Trying to do simple SendOnBehalfOf in email request, and continue to get 400 status error on post. Yes, I've read SOBO notes on RESTAPIGuide and following that, have confirmed that the user account being used to send (it's admin level) has all "Docusign API" settings toggled on under Permissions (I assume unnecessary, but also turned on same permissions for "otheruser" on whose behalf I want to send), and have narrowed down that the call works when I don't include the node in the authentication credentials and fails when I do, as in the following...
these credential work:
<DocuSignCredentials><Username>adminUser#mydomain.com</Username><Password>thepass</Password><IntegratorKey>WXYZ-0000-0000-0000-0000-00000</IntegratorKey></DocuSignCredentials>
these don't:
<DocuSignCredentials><SendOnBehalfOf>otherUser#mydomain.com</SendOnBehalfOf><Username>adminUser#mydomain.com</Username><Password>thepass</Password><IntegratorKey>WXYZ-0000-0000-0000-0000-00000</IntegratorKey></DocuSignCredentials>
I get 400 response with the later.
Many thanks in advance to pointing out what am I missing?
You need to have SOBO (Send On Behalf Of) functionality enabled on your account to be able to use it, and I think in this case that is what the issue was. I think the DocuSign system should return an error message saying feature not enabled or something of that nature instead of returning a 400 bad request when you try to use SOBO and it's not enabled.
The API Documentation does state this as well as the Dev Center -> Explore -> Features -> SOBO page with the following text:
"The DocuSign Send On Behalf Of functionality permits automated sending through the DocuSign API by an integrated sender on behalf of another sender. The Send On Behalf Of functionality is only available to accounts that use the DocuSign API to send envelopes and can be enabled for an account member by a DocuSign Customer Administrator through the DocuSign console or by contacting your DocuSign Account Manger."
https://www.docusign.com/developer-center/explore/features/sobo
So to resolve, you can contact your DocuSign account manager to get the option enabled, or you can reach out to DocuSign support at: support#docusign.com. Just make sure to tell them the environment you're working in (DEMO.docusign.net in this case)
When an email is received that generates an error what is the best way to bounce the message? For example you store a file in a db.BlobProperty but an email comes in that exceeds the 1m limit. There needs to be a bounce error to the request somehow so the email doesn't keep hitting the server and increasing the billing every 15 minutes. (Don't ask me how I know :-P ... not really it is a separate but related issue I posted in another question. here )
But that other error made it clear I need to deal with this before I get that email with multiple attachments that nails me for 1gb of data.
Normally the mail server handles the bounce, like when you send to a bad address and returns an error to the client/server. I have searched and didn't find anything helpful on this. YMMV
Is there an undocumented function? What is the proper response to return so that the originating server stops sending?
There's no way to bounce a message once it arrives at your App Engine app. You have two options:
Send the user a 'bounce message' yourself using the outgoing email API
Silently discard the message
In either case, you should install a top-level exception handler (frameworks like webapp and webapp2 have support for this) that logs the exception, performs the appropriate action, and then returns status code 200 instead of 500, so the message won't be redelivered repeatedly.
In your specific case, too, I'd start storing the attachments in the blobstore instead of a blob property, to avoid the 1MB limit.
I have a python GAE app that sends emails like in the example using the address of a registered administrator for the application as the "sender" address. When an email arrives from such an API call, here's a pic of the attached warning.
This message may not have been sent by: EmergencyButtonApp#gmail.com
Learn more Report phishing
Am I doing something wrong? None of the 3 options mentioned in the "Learn More" link are relevant I believe: the sender is a gmail address so the "SPF and DKIM authentication" solution isn't relevant, I'm not sending to a mailing list and I'm not using SMTP (I think, though maybe GAE is...).
Assuming you're seeing this in production, it's probably because you're claiming to be from a gmail address, but sending via App Engine. Use one of your app's email addresses as the sender (foo#yourapp.appspotmail.com) and it should work fine.
I think the best solution is to use Google's SMTP servers... It's the best way to not be considered as a spammer.
I've built a Python app on Google App Engine which primarily handles incoming mail and does interesting based upon the email address at which the email is received.
I would like to use a custom domain for receiving emails as <some text>#<my app name>.appspotmail.com is rather cumbersome.
Unfortunately I've been unable to figure out how to get this setup. I've gleaned from questions like this one: Custom Incoming Mail Domain With Google App Engine that there is no way to enable this directly in Google App Engine but that using some sort of DNS trickery--probably related to MX records--that I'll be able to forward the emails sent to <arbitrary string>#<custom domain> to the real address at <arbitrary string>#<my app name>.appspotmail.com.
Can someone explain how to do this? I think the basic problem would be my lack of knowledge with regards to DNS, but may also be associated with the particular restrictions associated with DNS and GAE apps.
The solution presented in this question: Directing email for a domain to AppEngine email receiving service? works explicitly for domains hosted by providers with the cPanel control panel, is there a more generic solution?
It's nothing to do with "DNS trickery". You simply have to use a regular mail service - Google Apps will do - that can be configured to forward all incoming mail to a specific address, namely any address your app can receive email on. Your app can determine the original 'To' address by examining the headers.