Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing From and To fields

Status
Not open for further replies.

michalk108968

Technical User
Apr 20, 2006
1
PL
hI!
I have a quwstion. I'm wondering is it possible to edit fields from the email header on the fly or to store them, edit and send?
The long version of my question is like that:
I recieve email with filled fields

Code:
 From: process_on_server@internal_server.com
To: other_company@external_server.com

and I would like to read the header and basing on it's contents rewrite this email header and send it. The new header of this email should look like this:

Code:
 From: other_company@my_company.com
To: constant@other_company.com
- where constant is something I write and change once for a very long time.

Could You tell me if it's possible to be done?
Thnx for all the help :)
 
This is a function of the process being used to send the email, such as 'mail' command or perl or PHP or python or whatever script. Those headers must/should/may be written BEFORE you inject the mail into qmail or another MTA.

The MTA would need some configuration to allow your particular host to effectively relay such (spam-looking) messages through its routing, but that's something that's probably well documented.

D.E.R. Management - IT Project Management Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top