none
How to intercept mail messages before reaching a SMTP server RRS feed

  • Question

  • I need an application that will intercept all incoming mail messages and modify them according to some specs. I am an absolute rookie at this, please detail :)

    a)     I need to either hook into it's SMTP events, and modify the message before it is passed on to the local intended user.

    or

    b)    A SMTP proxy service, that sits in front of your real SMTP server. Inside of the SMTP proxy, modify the message, and pass it on to your real SMTP server.

     

    Any ideas?

    Wednesday, April 6, 2011 10:43 AM

Answers

  • Hi,

    I do not know your exact requirements, because you didn't write anything about them. In general I would be very carefull what you are doing, because in a lot of countries there are laws regarding emails. (at least in germany we have very strict emails!)

    I would very carefully check the configuration settings of the used mailserver. I think that it might be much easier to simply check the possibilities there and then configure it correctly than rewriting such a complex tool (and it is complex! Do not underestimate it!)

    In case your currently used email server does not support the required stuff, I would check out other mail systems. Also be aware, that you always have to change some configuration settings on the main smtp server. (And you should take care that the configuration settings are correct on the new mailserver. At least I filter a lot of spam through some simply greylist settings (Bots does not care to come back to give me their SPAM so far!) and I would be very angry if a rooky sets up a new mailserver for me, accepts all emails and then his server will undergo all my settings!

    And of course there are some things like relay settings and such things. You do not want to be spammers choice when sending spam :)

    So you should carefully check:

    a) what kind of laws do you have in your country (In germany it is easy to go to prison as admin when doing some things wrong :) And a "the boss ordered me" does not count.)

    b) check out all email stuff. That is a very complex topic with all settings and options. A good start could be the RFCs regarding SMTP with all extensions.

    c) check out the documentation of the used email server to learn about the options. Maybe ask in some forums targeting the server about configuration options. Often there are ready to use tools, too.

    With kind regards,

    Konrad

    • Marked as answer by Paul Zhou Thursday, April 21, 2011 2:26 AM
    Wednesday, April 6, 2011 11:47 AM
  • There are things called SMTP hooks, maybe that's what you want.
    Phil Wilson
    • Marked as answer by Paul Zhou Thursday, April 21, 2011 2:26 AM
    Wednesday, April 6, 2011 6:08 PM

All replies

  • Hi,

    I do not know your exact requirements, because you didn't write anything about them. In general I would be very carefull what you are doing, because in a lot of countries there are laws regarding emails. (at least in germany we have very strict emails!)

    I would very carefully check the configuration settings of the used mailserver. I think that it might be much easier to simply check the possibilities there and then configure it correctly than rewriting such a complex tool (and it is complex! Do not underestimate it!)

    In case your currently used email server does not support the required stuff, I would check out other mail systems. Also be aware, that you always have to change some configuration settings on the main smtp server. (And you should take care that the configuration settings are correct on the new mailserver. At least I filter a lot of spam through some simply greylist settings (Bots does not care to come back to give me their SPAM so far!) and I would be very angry if a rooky sets up a new mailserver for me, accepts all emails and then his server will undergo all my settings!

    And of course there are some things like relay settings and such things. You do not want to be spammers choice when sending spam :)

    So you should carefully check:

    a) what kind of laws do you have in your country (In germany it is easy to go to prison as admin when doing some things wrong :) And a "the boss ordered me" does not count.)

    b) check out all email stuff. That is a very complex topic with all settings and options. A good start could be the RFCs regarding SMTP with all extensions.

    c) check out the documentation of the used email server to learn about the options. Maybe ask in some forums targeting the server about configuration options. Often there are ready to use tools, too.

    With kind regards,

    Konrad

    • Marked as answer by Paul Zhou Thursday, April 21, 2011 2:26 AM
    Wednesday, April 6, 2011 11:47 AM
  • There are things called SMTP hooks, maybe that's what you want.
    Phil Wilson
    • Marked as answer by Paul Zhou Thursday, April 21, 2011 2:26 AM
    Wednesday, April 6, 2011 6:08 PM