Amazon SES delivery

Use this forum for topics related to OpenEMM contributions like the Typo3 extension or SugarCRM connector

Moderator: moderator

garyamort
Posts: 1
Joined: Fri Aug 05, 2011 1:38 pm

Amazon SES delivery

Post by garyamort »

I was wondering if anyone has done integration with Amazone SES with the server? Also where would that sort of integration be placed?

I was also curious if there is a breakdown of what code is used where? From sourceforge I see it is a combination of Java, C, and Python. I myself prefer coding in PHP...with some C and Python but Java just doesn't 'sing' to me. So I'm hoping most of the code is in C and Python.
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Amazon SES delivery

Post by maschoff »

At least 80% of OpenEMM's code is Java.
OpenEMM Maintainer
unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Amazon SES delivery

Post by unhuman »

Got this working and it was pretty trivial. I do not know how much load this connection will handle, nor if bounce detection will continue to work, but....

You need to do 3 things:

1. Create an SMTP account:
http://docs.amazonwebservices.com/ses/l ... tials.html
2. Open up a tunnel to Amazon SES:
http://docs.amazonwebservices.com/ses/l ... unnel.html
3. Configure sendmail to route traffic through SES:
http://docs.amazonwebservices.com/ses/l ... dmail.html

My SES account is still only in development and this poses some limitations (which may persist to full account, I do not know):
1. Your sending user must be whitelisted. This may make setting up some things through SES a bit harder since you may not have control over the sending email address to go throught he verification process.
2. The receivers also must be whitelisted. This makes testing bounces impossible.
3. Do not know the maximum rate which emails may be sent.

But, it all works.
unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Amazon SES delivery

Post by unhuman »

I'm actually working towards an SES MailWriter (so MailWriterSES instead of MailWriterMeta). So far, I'm having some success generating the emails and sending them out as "Test" sends.

For World sends, I expect to have to do more work....

Also, I'm implementing my own mail generator at the start of the process so that building emails is not expensive. Basically, I'm splitting on [agnXXX ...] tags and building a list of strings. Then, when I generate the email,I use StringBuilder to build the email and iterate through that list (rather than search) to build the emails through concatenation.

This will allow for me to get rid of at least some of the Python / C code. Still concerned about bounce management, but...

Pending my continued success (and management approval), I will be sharing this all back.
unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Amazon SES delivery

Post by unhuman »

I've gotten it to work for delayed sends as well. Basically, I just needed to force the genStatus = 0 and the delayed code works properly.

Is this something the OpenEMM folks might be interested in sharing for 2012 - or is it too late? It's not completely baked yet, so my guess is that. If anyone else is interested in my work (and contributing), let me know, and I'll see about creating a branch to work on these things (outside my own version control).

Still need to see if bounces work, etc.

-H
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Amazon SES delivery

Post by maschoff »

We are interested for sure, but for OpenEMM 2012 we would rather provide the code as a separate (optional) extension of the core product or you could host it and we would link to it like we do it here at the end of the page: http://www.openemm.org/downloads.html
OpenEMM Maintainer
unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Amazon SES delivery

Post by unhuman »

Understood. Right now, my SES-specific code is pretty standalone, however, there are some required changes to other classes that would have to be made (for example, MailgunImpl makes a choice whether to create MailWriterSES instead of MailWriterMeta and Data has been altered to have configuration for SES and some other alterations).

Once I get it finished, I'll hit you up to see about how we can do this. Right now, I'm focused on trying to get bounces out of SES...
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Amazon SES delivery

Post by maschoff »

Ok, great!
OpenEMM Maintainer
baibai
Posts: 13
Joined: Wed Dec 05, 2012 11:19 am
Location: Taipei, Taiwan

Re: Amazon SES delivery

Post by baibai »

Hi there,

Sorry for my presumptuous.
I'm using OpenEMM 2011 on EC2.
I have the the the same issue with SES service, I also can not trigger the "bav" when I send the sandbox mail of SES: "bounce@simulator.amazonses.com".
(note: In OpenEMM, I sent by "Mailing: [Send]" button, it's mean I am not sent by "Admin-Mail" or "Test-Mail")
The SES seems "just" send me a mail with "bounce contents", in my mail log only see:
Dec 5 08:54:14 emm sendmail[5007]: qB58sDL2004987: to=<bounce@simulator.amazonses.com>, ctladdr=<newsletter@somelab.com> (501/502), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=148692, relay=email-smtp.us-east-1.amazonaws.com [50.19.224.18], dsn=2.0.0, stat=Sent (Ok 0000013b6a45c033-42cf8869-f365-48e0-a0b5-41f6ff9c87a5-000000)
then I receive a mail to newsletter@somelab.com with bounce contents.

So I really want to know is there any simple article or experience about OpenEMM with SES could share?
Of course any clue is welcome!!
bk007
Posts: 19
Joined: Sat May 18, 2013 3:29 am

Re: Amazon SES delivery

Post by bk007 »

I just wanted to bump this thread.

I'm (also) going to be investigating an OpenEMM / Amazon SES integration, and any insight somebody could share would be helpful!
unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Amazon SES delivery

Post by unhuman »

I got your message. I haven't worked on this project in about a year since my employer cancelled the project and wouldn't let me share back the code since it was IP. I'd be happy to answer any questions regarding my implementation (which was based on 2011 code), but as I mentioned, haven't done anything in a while.

I did get SES working with my own implementation of the mail creation code (I did everything in java, leveraging a template-based approach instead of the replacment based approach that the C code uses).

Howie
unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Amazon SES delivery

Post by unhuman »

Not sure how much interest is here, but I just got my code back! I've got to sort it all out since it's old (2 years or so and OpenEMM has changed) and I've got other changes too which probably aren't for the community. I haven't yet looked at what I've gotten to see if it's got version history... I made other changes at the same time which are probably not suitable to the community. Need to figure out all that.

This is a back-burner project for me to figure this all out and potentially share it out again. I've got the usual life interferences that will take priority over this (Family, job, fun).

-Howie
Post Reply