Michael Elkins sez: } Gregory Seidman wrote: } > It looks like the solution may be to set $from to the reflector and use a } > hook to set From to the local address for local mail. Is there any other } > way? I'd *really* like a pattern for whether reverse_name has found } > something or not. } } This type of information doesn't really fit into the send-hook pattern } neatly. I think the same functionality could be implemented by adding } another boolean variable to control whether or not the address set by } reverse_name can be overridden by a subsequent my_hdr command. So you } could instead do something like: } } set nooverride_reverse_name } send-hook . 'unmy_hdr from' } send-hook 'pattern' 'my_hdr from: foo@bar' } } This would cause the my_hdr command to only have effect when not doing a } reply to a message which matched $alternates. } } Comments?
Well, I sort of like it. Incidentally, I'm the one who brought up the problem. I'm not sure I like it better than have a search pattern (~R, maybe?) for when reverse_name has come up with something. It seems a little kludgy to make one header behave differently, rather than allowing the hook to be more specfic. In particular, I expect that there will be occasions when one wants the reverse_name to be overridden and occasions when one does not, even for the same user. (Example: I *always* want mail sent to the local LAN to have my short address, regardless of what address received the email. For everything else, though, I want reverse_name to supersede.) Even better than a boolean search pattern would be a search pattern that gives the current from address (only applicable to send-hook, maybe?), which might have been generated from $from or reverse_name or my_hdr (in or out of a send-hook). And while I'm listing wishes, I'd love to be able to set the Reply-To to be whatever the From happens to be, i.e. all mail I send has a Reply-To matching the From (unless, I suppose, my_hdr Reply-To is used). This would be something like use_replyto, essentially identical to use_from. --Greg
