mhrw

mhrw is a commandline tool for manipulating mail headers.
Download

mhrw Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Stephan Seitz
  • Publisher web site:
  • http://www.schwarz-mode.de

mhrw Tags


mhrw Description

mhrw is a commandline tool for manipulating mail headers. mhrw is a tool for mailheader manipulation. mhrw can be useful in complex MTA setups. In general, headers shouldn't be rewritten, but i found myself configuring an MTA with special delivery methods, where delivery took place depending on spamassassin's spam-level and various other things.In this setup, smtpd and delivery were completely different tasks without any communication possible between them. So, i decided to use the mail-headers loading some additional neccessary information. To get rid of lots of slow scripts, mhrw was born.How it works:mhrw reads mails from < stdin > or (if argument is given) from < file >. It supports two 'operating modes', a) replace some part of the header, matched by a regular expression, b) add some part to the header below the former last headerline.In no way the body of a message is touched. Anything below the header is passed through. Also, the message will always pass until EOF.Examples:To show some example, on how to use mhrw, i'll define the following (notreally standard, but very simple) mail as origin:Received: somehost (somehost.somewhere) by uid 1007 with esmtp X-Authenticated-SMTP: usernameReceived: anyhost; dateSubject: some testbody...If this mailalike header is getting used by following command:mhrw '^X-Authenticated-SMTP: .*$' ''this will result in:Received: somehost (somehost.somewhere) by uid 1007 with esmtpReceived: anyhost; dateSubject: some testbody...You're able to use any regular expression you like, limited (by default) upto 4 subqueries.The second argument (the replacement string) interprets written n and r sequences.Installation:mhrw dosn't relay on libraries and is written with a very basic set of commands, so:./configuremakemake installshould build the binary on most platforms.


mhrw Related Software