2009/4/7 Kyle Wheeler <kyle-m...@memoryhole.net>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday, April 7 at 02:09 PM, quoth zhang zhengquan: >>I would like to auto cc somebody when I send mail to a recipient > > Okay, easy enough. > >>I googled and put this in to my send_hooks file >> >>send-hook a...@abc.edu \ >> "push <edit-cc>,o...@abc.eu<enter>" > > You aren't being explicit about the pattern matching. > >>Did I do something wrong here? > > When you do not specify a simple pattern operator, mutt uses the value > of $default_hook to construct the pattern. I don't know what yours is, > but... the default value of $default_hook is "~f %s !~P | (~P ~C %s)", > but who knows what it is on your system. It's better to be explicit: > > send-hook '~t a...@abc.edu' \ > "push '<edit-cc>,o...@abc.edu<enter>'" > > If that doesn't work, try this: > > send2-hook '~t a...@abc.edu !~C o...@abc.edu' \ > "push '<edit-cc>,o...@abc.edu<enter>'" I put
send-hook '~t ccl-t...@ccl.northwestern.edu' \ "push '<edit-cc>,o...@ccl.northwestern.edu<enter>'" send2-hook '~t ccl-t...@ccl.northwestern.edu !~C o...@ccl.northwestern.edu' \ "push '<edit-cc>,o...@ccl.northwestern.edu<enter>'" in my muttrc and when I launch mutt I have Error in /home/zhengquan/.mutt/muttrc, line 51: push '<edit-cc>,o...@ccl.northwestern.edu<enter>': unknown command Error in /home/zhengquan/.mutt/muttrc, line 54: push '<edit-cc>,o...@ccl.northwestern.edu<enter>': unknown command I am running debian sid and mutt here is output of mutt -v Mutt 1.5.18 (2008-05-17) Copyright (C) 1996-2008 Michael R. Elkins and others. Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'. Mutt is free software, and you are welcome to redistribute it under certain conditions; type `mutt -vv' for details. System: Linux 2.6.26-1-686 (i686) ncurses: ncurses 5.7.20090404 (compiled with 5.7) libidn: 1.12 (compiled with 1.10) hcache backend: GDBM version 1.8.3. 10/15/2002 (built Aug 27 2008 09:23:18) Compile options: -DOMAIN +DEBUG -HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE +USE_FCNTL -USE_FLOCK +USE_POP +USE_IMAP +USE_SMTP +USE_GSS -USE_SSL_OPENSSL +USE_SSL_GNUTLS +USE_SASL +HAVE_GETADDRINFO +HAVE_REGCOMP -USE_GNU_REGEX +HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET +HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM +CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME -CRYPT_BACKEND_GPGME -EXACT_ADDRESS -SUN_ATTACHMENT +ENABLE_NLS -LOCALES_HACK +COMPRESSED +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR +HAVE_ICONV -ICONV_NONTRANS +HAVE_LIBIDN +HAVE_GETSID +USE_HCACHE -ISPELL SENDMAIL="/usr/sbin/sendmail" MAILPATH="/var/mail" PKGDATADIR="/usr/share/mutt" SYSCONFDIR="/etc" EXECSHELL="/bin/sh" MIXMASTER="mixmaster" To contact the developers, please mail to <mutt-...@mutt.org>. To report a bug, please visit http://bugs.mutt.org/. patch-1.5.13.cd.ifdef.2 patch-1.5.13.cd.purge_message.3.4 patch-1.5.13.nt+ab.xtitles.4 patch-1.5.4.vk.pgp_verbose_mime patch-1.5.6.dw.maildir-mtime.1 patch-1.5.8.hr.sensible_browser_position.3 Thanks, Kyle, I don't know what is wrong here.. > > ~Kyle > - -- > Patriotism means to stand by the country. It does not mean to stand by > the President. > -- Theodore Roosevelt > -----BEGIN PGP SIGNATURE----- > Comment: Thank you for using encryption! > > iEYEARECAAYFAknbqScACgkQBkIOoMqOI17PKgCfY8ACV1jBjabHXppnnr8/fIOS > kw4AoPazuZy1yuYZz7qUBeqsexRz5iEU > =76iH > -----END PGP SIGNATURE----- > -- Zhengquan