Any way to add a header with send-hook?
I'd like to add an extra (custom, for my use) message header to messages sent to a specific address. Send-hook explicitly doesn't do this so is there any easy way of doing this or will I have to write a little script to actually edit the file and execute that via a send-hook? -- Chris Green ([EMAIL PROTECTED])
Re: Any way to add a header with send-hook?
* Chris Green [EMAIL PROTECTED] [2002-10-10 09:27]: I'd like to add an extra (custom, for my use) message header to messages sent to a specific address. Send-hook explicitly doesn't do this so is there any easy way of doing this or will I have to write a little script to actually edit the file and execute that via a send-hook? send-hook . unmy_hdr X-Foo send-hook '~t [EMAIL PROTECTED]' my_hdr X-Foo: blah blah blah I'm using similar constructs all over the place. (darren) -- It has long been an axiom of mine that the little things are infinitely the most important. -- Arthur Conan Coyle
Re: Any way to add a header with send-hook?
On Thu, Oct 10, 2002 at 09:33:14AM -0400, darren chamberlain wrote: * Chris Green [EMAIL PROTECTED] [2002-10-10 09:27]: I'd like to add an extra (custom, for my use) message header to messages sent to a specific address. Send-hook explicitly doesn't do this so is there any easy way of doing this or will I have to write a little script to actually edit the file and execute that via a send-hook? send-hook . unmy_hdr X-Foo send-hook '~t [EMAIL PROTECTED]' my_hdr X-Foo: blah blah blah I'm using similar constructs all over the place. Well it says in the manual:- Also note that my_hdr commands which modify recipient headers, or the message's subject, don't have any effect on the current message when executed from a send-hook. So does the above mean what it says, or have I misunderstood it? What I'm trying to create is a macro which will do the following:- 1 - It will work exactly like the current 's' command allowing mail to be saved in a specific mailbox. Thus the macro will first call the 's' command. 2 - It will bounce ('b' command) a copy of the mail to a specific (fixed) address with an added header which will contain the name and directory of the mailbox where the message has been saved locally. Is the above remotely possible? It's easy enoough to create a macro which will do the 's' and the 'b' but I'm not sure how to set about adding the header with the required information in it. Are there completely different ways of getting to what I want? Basically what I want is to send a copy of all messages saved in certain mailboxes to another system with header information indicating where it was saved so that the remote system can archive the message automatically (using procmail). -- Chris Green ([EMAIL PROTECTED])
Re: Any way to add a header with send-hook?
* On 2002.10.10, in [EMAIL PROTECTED], * Chris Green [EMAIL PROTECTED] wrote: Well it says in the manual:- Also note that my_hdr commands which modify recipient headers, or the message's subject, don't have any effect on the current message when executed from a send-hook. So does the above mean what it says, or have I misunderstood it? It means what it says, but it might not say what it means. It's saying, I think, that my_hdr cannot modify To:, Cc:, Bcc:, or Subject: inside a send-hook. Other my_hdr headers are fine. What I'm trying to create is a macro which will do the following:- 1 - It will work exactly like the current 's' command allowing mail to be saved in a specific mailbox. Thus the macro will first call the 's' command. 2 - It will bounce ('b' command) a copy of the mail to a specific (fixed) address with an added header which will contain the name and directory of the mailbox where the message has been saved locally. Is the above remotely possible? It's easy enoough to create a macro Seems like it, although I don't know how you get the name of the folder into the my_hdr, unless it's just a hard-coded part of the macro. -- -D.We establised a fine coffee. What everybody can say Sun Project, APC/UCCO TASTY! It's fresh, so-mild, with some special coffee's University of Chicago bitter and sourtaste. LET'S HAVE SUCH A COFFEE! NOW! [EMAIL PROTECTED] Please love CAFE MIAMI. Many thanks.