/ Leonardo M. Ramé wrote on Mon 5.Nov'12 at 10:08:41 -0300 / > On 2012-11-05 12:42:23 +0000, Jamie Paul Griffin wrote: > > / Leonardo M. Ramé wrote on Mon 5.Nov'12 at 9:16:04 -0300 / > > > > > Hi, I use different accounts and signatures depending on the mailbox I'm > > > working on, and would like to be able to configure my signauture > > > position (at bottom or at top) when I start writing an email. To do > > > this, I've set up a couple of folder hooks. > > > > > > Most mailboxes are related to programming or Open Source lists, where > > > people mostly doesn't do top posting, but my main mailbox is related to > > > my company's emails, where *nobody* knows what I talk about when I > > > mention top posting, so I end up going to the bottom, copying the > > > signature, go to top, paste it and then start writing my replies. > > > > > > Is there a way to define the position of the signature depending via a > > > folder hook or similar command?. > > > > Yes it shouldn't be too difficult -- look at the $sig_on_top muttrc setting > > in muttrc(5) which you can configure in your folder hooks. > > Thanks Jamie, I've added that setting to one folder hook, but it > affected all folders. > > Does it means that I must set it up in all my hooks?.
Decide what is the default first. So, assuming you don't want the signature on top to be the default: folder-hook . 'unset sig_on_top; set signature=~/some_sig_file; [ ... ]' folder-hook work 'set sig_on_top=yes; set signature=~/some_work_sig_file; [ ... ]' You could also use send hooks based on the address you're sending to or from. set from=y...@normaldomain.net set reverse_name alternates y...@workdomain.net send-hook . ' my_hdr From: y...@normaldomain.net; set sig_on_top=no; set signature=~/some_sig_file' send-hook '~f y...@workdomain.net | ~C @workdomain.net' \ # from address "or" to or cc addresses 'set my_hdr From: y...@workdomain.net; set sig_on_top=yes; \ set signature=~/some_work_sig_file;' These might be crappy examples, but with hooks you need to set your sefault setting at the top so mutt can revert back to it after executing a proceeding hook. Someone will show something better i'm sure. There are several ways to do it.