Intercepting and post processing of SMTP Mail

Discussion for developers using MailEnable.
Post Reply
dslchiphead
Posts: 69
Joined: Wed Jun 27, 2007 8:47 pm

Intercepting and post processing of SMTP Mail

Post by dslchiphead » Thu Feb 03, 2011 9:33 pm

Would anyone know if it would be possible to intercept the incoming mail, edit the mail then allow it to flow out to the Smart Host for delivery? What I want to do is to look at a custom SMTP message header and based on that value call a routine to translate the message body into another language using Googles Translation API.

If so, do anyone know of an close example of modify the message body and how to configure ME to do so?

Thanks!

-Dave

johnd34
Posts: 73
Joined: Thu Jul 29, 2004 10:43 am
Location: UK

Re: Intercepting and post processing of SMTP Mail

Post by johnd34 » Thu Feb 17, 2011 5:07 pm

Yes, you grab it using the MTA

You have to write code to be executed by the mta which will be called everytime an email needs 'moving' around the system.

You can then determine if it is an smtp cal and whether it is comgin in or going out.

then do whatever you need to do.

My MTA gateway code currently runs at php calls, but this approach may have problems on a high volume server.
John D
JD Projects

Developer of E-Mailing Systems
West of England
Check out our email service built on mailenable
www.proserviceemail.co.uk
www.jdprojects.co.uk
www.smarterweb.co.uk

dslchiphead
Posts: 69
Joined: Wed Jun 27, 2007 8:47 pm

Re: Intercepting and post processing of SMTP Mail

Post by dslchiphead » Thu Feb 17, 2011 5:50 pm

Thanks johnd34.

Do you know if there is any documentation on writing for the MTA external process?

-Dave

johnd34
Posts: 73
Joined: Thu Jul 29, 2004 10:43 am
Location: UK

Re: Intercepting and post processing of SMTP Mail

Post by johnd34 » Thu Feb 17, 2011 8:33 pm

Not very good.

I had to research and develop from a bit of trial, playing and error.

The documentation does give you an idea of what is going on. Read about the control file and the folders for the different operations, but after that you have to 'play' to learn exactly what goes on.

John
John D
JD Projects

Developer of E-Mailing Systems
West of England
Check out our email service built on mailenable
www.proserviceemail.co.uk
www.jdprojects.co.uk
www.smarterweb.co.uk

Post Reply