send-hook and different email accounts
ciao! i'm using mutt with two different email accounts. generally i use the first one but i need to use the second to send email to the university so i set the following send-hook: unhook send-hook unhook send2-hook send-hook . unmy_hdr From Reply-To send-hook . 'set sendmail=~/bin/msmtpQ -a gmail; \ set from = Marco Giusti [EMAIL PROTECTED]; \ my_hdr Reply-To: [EMAIL PROTECTED]' send-hook .*unibo\.it 'set sendmail=~/bin/msmtpQ -a hermes; \ set from = Marco Giusti [EMAIL PROTECTED] my_hdr Reply-To: [EMAIL PROTECTED]' with this configuration i got a strange behavior i follow these steps: 1. send emails to a generic addresses. no problem at all 2. send an email to .unibo.it. no problem, all the headers are set correclty 3. send an email to a generic address. now the headers and the variables are set to the previous values ie. unibo.it account why i got this? it's my fault or a mutt's bug? how can i achieve the behaviour needed? thanks for your help marco ps. follow some mutt infos if you need it, anyway is a debian/lenny package 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.25.11 (x86_64) ncurses: ncurses 5.6.20080830 (compiled with 5.6) libidn: 1.8 (compiled with 1.9) hcache backend: GDBM version 1.8.3. 10/15/2002 (built Apr 24 2006 03:50:27) Opzioni di compilazione: -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 [EMAIL PROTECTED]. 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 signature.asc Description: Digital signature
Re: send-hook and different email accounts
Hi, On Thursday, 25 September 2008, 12:52 (UTC+0200), Marco Giusti wrote: ciao! i'm using mutt with two different email accounts. generally i use the first one but i need to use the second to send email to the university so i set the following send-hook: unhook send-hook unhook send2-hook send-hook . unmy_hdr From Reply-To send-hook . 'set sendmail=~/bin/msmtpQ -a gmail; \ set from = Marco Giusti [EMAIL PROTECTED]; \ my_hdr Reply-To: [EMAIL PROTECTED]' I had problems trying to achieve the same thing with set from and I'm now using send-hook . 'my_hdr From: My Name [EMAIL PROTECTED]' But I didn't know about unmy_hdr, so my_hdr may not be necessary, and there may be a better way to do it with set from (better because for all I remember with my_hdr From, set reverse_name doesn't work). m.
Re: send-hook and different email accounts
Marco Giusti wrote: [Thu Sep 25 2008, 06:52:45AM EDT] why i got this? it's my fault or a mutt's bug? how can i achieve the behaviour needed? I have a configuration that's similar and it works properly for me. Is that your entire config? Aron
Re: send-hook and different email accounts
Marianne Promberger wrote: [Thu Sep 25 2008, 07:21:29AM EDT] I had problems trying to achieve the same thing with set from and I'm now using send-hook . 'my_hdr From: My Name [EMAIL PROTECTED]' Setting $from should work as of 1.5.18 http://dev.mutt.org/hg/mutt/rev/4e8e3db418ea But I didn't know about unmy_hdr, so my_hdr may not be necessary, and there may be a better way to do it with set from (better because for all I remember with my_hdr From, set reverse_name doesn't work). Right, my_hdr From overrides $reverse_name, which usually isn't desired. That's why it's nice to set $from instead. IMHO there is still a tiny problem because it's impossible to determine in a hook (send-hook or send2-hook) what the final From value is, based on the combination of $reverse_name and $from. That's a bit frustrating to me because I'd like to make some other settings based on that value. Aron
Re: send-hook and different email accounts
On Thursday, 25 September 2008, 15:31 (UTC+0200), Marco Giusti wrote: anyway i cannot understand reverse_name and i don't use it With reverse_name, when you reply to an e-mail, mutt automatically sets your From: address to whatever e-mail the original sender used to get the mail to you. If someone e-mails to your private account, your reply will have set From to your private account. If someone e-mails to your university account, your reply will have set From to the uni account. send-hooks and folder-hooks can catch a lot, but sometimes they don't. For example, I have my university address as the default from: address. But I'm also active in a cycling organisation, and if someone with whom I've never exchanged email before sends a message to me at that address, no hook will match, but I'd still like the reply to originate from the cycling address, not the uni address. Currently, I have to set this manually (using a macro). m.
Re: send-hook and different email accounts
Hi, For example, I have my university address as the default from: address. But I'm also active in a cycling organisation, and if someone with whom I've never exchanged email before sends a message to me at that address, no hook will match, but I'd still like the reply to originate from the cycling address, not the uni address. Currently, I have to set this manually (using a macro). I want the same thing and have configured it as follows (@ and . replaced ;)) set reverse_name set realname= 'Alexander Dahl' set from= post(at)lespocky(dot)de set use_from= yes alternates post(at)lespocky(dot)de|lespocky(at)web(de) This does exactly what you describe, you simply have to set the mail-adresses you use as alternates, no hooks or macros or my_hdr modifications necessary. Greets Alex -- * http://www.lespocky.de *** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 pgpaM7hmVhJ2D.pgp Description: PGP signature
Re: send-hook and different email accounts
On Thursday, 25 September 2008, 17:10 (UTC+0200), Alexander Dahl wrote: Hi, For example, I have my university address as the default from: address. But I'm also active in a cycling organisation, and if someone with whom I've never exchanged email before sends a message to me at that address, no hook will match, but I'd still like the reply to originate from the cycling address, not the uni address. Currently, I have to set this manually (using a macro). I want the same thing and have configured it as follows (@ and . replaced ;)) set reverse_name set realname= 'Alexander Dahl' set from= post(at)lespocky(dot)de set use_from= yes alternates post(at)lespocky(dot)de|lespocky(at)web(de) This does exactly what you describe, you simply have to set the mail-adresses you use as alternates, no hooks or macros or my_hdr modifications necessary. Well, yes, but I am running mutt 1.5.15, and there I need my_hdr From for send-hooks, and that then messes up reverse_name. m.
Re: send-hook and different email accounts
* Marianne Promberger [EMAIL PROTECTED] [09-25-08 11:21]: Well, yes, but I am running mutt 1.5.15, and there I need my_hdr From for send-hooks, and that then messes up reverse_name. iianm, the idea is to use reverse_name generally and send-hooks for specific situations. -- Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535@ http://counter.li.org
Re: send-hook and different email accounts
On Thursday, 25 September 2008, 11:27 (UTC-0400), Patrick Shanahan wrote: * Marianne Promberger [EMAIL PROTECTED] [09-25-08 11:21]: Well, yes, but I am running mutt 1.5.15, and there I need my_hdr From for send-hooks, and that then messes up reverse_name. iianm, the idea is to use reverse_name generally and send-hooks for specific situations. Yes.
Re: send-hook and different email accounts
* Marianne Promberger [EMAIL PROTECTED] [09-25-08 12:07]: On Thursday, 25 September 2008, 11:27 (UTC-0400), Patrick Shanahan wrote: * Marianne Promberger [EMAIL PROTECTED] [09-25-08 11:21]: Well, yes, but I am running mutt 1.5.15, and there I need my_hdr From for send-hooks, and that then messes up reverse_name. iianm, the idea is to use reverse_name generally and send-hooks for specific situations. Yes. Then, how do send-hooks mess up reverse_name? -- Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535@ http://counter.li.org