[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: header rewriting?



On Fri, Mar 07, 2003 at 03:15:56PM +0100, Marek Kowal wrote:
> Hello,
> 
> I have the following problem: when passing the mails out of my mail system
> to the world with the smtp channel, I would like to replace some host names
> in headers with other ones (for security reasons). So, for example, the
> following header:
> 
> Received: from localhost ([127.0.0.1] helo=xxx1.zzzz.yyy.www) 
> 	by xxx2.zzz.yyy.www with smtp mailer 
> 
> would be changed to, let us say:
> 
> Received: from localhost ([127.0.0.1] helo=aaa1.bbb.ccc.ddd) 
> 	by aaa2.bbb.ccc.ddd with smtp mailer 
> 
> The replacement would be arbirarily set by admin
> (the best would be with regexp). 

  No :-(    Well, there are ways to run external programs at
  router's   process   function.  See   cf/process.cf.
  Observe how e.g.  'core*' files are treated.

  There you could run a program that mutates the file, and 
  then let normal processing continue.  Something like:


    [0-9]*)
	$MAILBIN/messagemutator "$file"
	rfc822 "$file"
	;;

  That mutator can create temporary files which
  have their name leading with DOTS:
      .$file.2   .$file.3
  (in zmsh script..)


  When things are complete, the mutator shall overwrite
  the original message file with new content.
  (spool-file name should begin with i-node number of
   the file even after it has been mutated..)

> Any ideas?
> 
> Thanks,
> Marek.
-- 
/Matti Aarnio	<mea@nic.funet.fi>
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi