On Tue, Mar 05, 2002 at 06:05:05AM -0500, David Collantes wrote: >* John Buttery <[EMAIL PROTECTED]> [05-03-02 02:07 AM EST]: > >> >I am looking to add an extra header to my outgoing mails if there is an >> >attachment. I tried the following macro: >> > >> >macro compose a ":my_hdr: X-Attachment: Safe\n<attach-file>" >> > >> >But it seems that at that point headers can not be added that way. Anyone >> >has a better, working idea? >> >> The concept is sound, but your execution is a little off. :) First >> of all, the command is "my_hdr", not "my_hdr:", so that'll give you some >> problems. Try this: >> >> macro compose a ":my_hdr X-Attachment: Safe<enter><attach-file>" > >John and folks, > >That recommendation does not works neither. I think that when you are at >that point -email already composed- it is not possible to add any extra >headers. They need to be added 'before' you enter message compossing. IN >other words, unless someone else can provide the right macro, it can not >be done at the point I am trying to. > >Perhaps creating a macro with \' that will start the compossing of an >email with the special header on. If I am attaching something to an email >I should know before I start typing that I will be doing so... just an >idea, I guess... > >Cheers, > >-- >David Collantes - http://www.bus.ucf.edu/david/ >College of Business Administration, University of Central Florida >"Only a life lived for others is a life worth while." >
Oh, you're right of course, I didn't even think about the significance of the "compose" context. Hmph. Yeah, it looks like you may be stuck macroing a secondary compose key for what you want (well, that or manually editing the headers). Assuming you're not worried about rogue attachments being added at your end (but rather a compromised MTA along the way), you could be SUPER motivated and write a wrapper for $sendmail that takes the message, parses any attachment names out of it, adds the header with formail, and _then_ sends it to sendmail or whatever for MTA-ing. That's some pretty heavy kung fu but it might do what you want. -- ------------------------------------------------------------------------ John Buttery (Web page temporarily unavailable) ------------------------------------------------------------------------
msg25017/pgp00000.pgp
Description: PGP signature