943,625 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 678
  • C RSS
Jun 8th, 2008
0

Hooking SMTP Server

Expand Post »
Hi there.
All mail sent through the SMTP server, i need to modify the message being sent through.
I thought of making either a C,bash,perl script to take in the message, modify it and return it to SMTP, or stop the SMTP process, and re-call it from the script.

Purpose of this is to have a pre-defined HTML template, and when users send plain text through, to wrap the HTML template around that.

It would be preferred to have my own file set up the HTML headers and for HTML, and do the sending through that. However killing the initial SMTP process that called the script in the first place.

Maybe i'm going about it all wrong, so i thought i'd get some feedback from someone.

Thanks.
Reputation Points: 35
Solved Threads: 5
Junior Poster
dr4g is offline Offline
136 posts
since Apr 2007
Jun 8th, 2008
0

Re: Hooking SMTP Server

email client <---> filter <---> SMPT server
Rather than connecting directly to mail.myisp.com, you connect to 127.0.0.1 and the filter then connects to mail.myisp.com

Your filter looks like an SMTP server to your normal email client, and looks like an email client to your ISP's mail server.

The filter sees everthing going back and forth, so it can then mess about with the messages as it sees fit.

Start simple with a "logger" filter which just dumps everything to a file, so you get the hang of it.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: compiling linux driver in eclipse
Next Thread in C Forum Timeline: Replacing argv[0] with a char*





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC