On Jun 03 2010 16:04, Eric Smith wrote: > Often my mutt instance is not refreshed to read the latest > mutt/aliases file so that alias expansion fails. > > Is it possible to warn of this bhaviour and abort mail sending. > For example if a mail address does not have an @ sign, > then it is an alias. This rule holds for my usage behaviour. > > -- > - Eric Smith
Well, it isn't perfect, but this does sort of what you asked for. If an alias does not resolve, it is assumed to be a user on the local system. So, you can look for the hostname in the recipient (unless you send messages to other people on the same host -- in my case, not even my email address is on the local host because I use a POP3 account). in .muttrc, add: send-hook '~t @localhost$' 'alias' Change 'localhost' to the name of your local host. For instance, my computer is named 'libertas' and belongs to the domain local.camdensoftware.com, so my hook reads: send-hook '~t @libertas.local.camdensoftware.com$' 'alias' Now, when sending a message, mutt will look for any recipient whose address matches the pattern, and will execute the command 'alias'. Since that command requires an address, mutt pops up an error message 'alias: no address'. It only stays up for a second, but at least that's a little warning. -- Sterling (Chip) Camden | camdensoftware.com | chipstips.com | chipsquips.com