Bluehost.com Web Hosting $6.95

Re: [courier-users] Header Re-Writing

This is a discussion on Re: [courier-users] Header Re-Writing within the Courier-Imap forums, part of the Mail Servers and Related category; -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 shyam s wrote: > Yes, I tried to get the mail from stdin. But ...


Go Back   Usenet Forums > Mail Servers and Related > Courier-Imap

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-04-2005
Jeff Jansen
 
Posts: n/a
Default Re: [courier-users] Header Re-Writing

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

shyam s wrote:
> Yes, I tried to get the mail from stdin. But I didnt get that one.


I think you misunderstood what Gordon was saying. The "xfilter" command
in maildrop pipes the entire message to whatever program you specify.
It then expects to read the message back in from that program. Your
program can then alter the message anyway that it wants.

For example, if you added the following to your maildroprc file:

xfilter "/usr/bin/sed -e '/X-ClamAV-Scanned: Pass/ \
a X-No-Viruses: YEAH' "

Then any time the header "X-Clam-Scanned: Pass" appears in a message,
the line (header) "X-No-Viruses: YEAH" would be added immediately after
it as a new line.

So you should be easily able to create a small script (in bash, perl,
python, ...) which reads your message, changes the headers, and then
spits it back out.

Just remember that the ENTIRE message gets piped to your script, not
just the headers. So make sure that you correctly set up the conditions
in the script which do the rewriting.

HTH

Jeff Jansen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDQpvPZxtYeNk78A8RApDJAJsFFknUqNtmYj+CIkQUok 8da9dcZwCdHxNv
+OTG+sX8zx4hp/71RA3oFyU=
=SJFy
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/.../courier-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:21 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0