<<< Date Index >>>     <<< Thread Index >>>

folder-hook problems with imap



Hello mutt users,

I've been using mutt for about four years now and recently came upon a
problem that I can't figure out. The description to this problem is
long. Please bear with me.

I have two boxes (or boxen, I'm never sure, anyhow...), mg1 and mg2. mg2
is also the mail server for my small (3 computers) home network. The
mail server is running qmail and courier imap. Both are running Gentoo
Linux and have identical versions of mutt as shown below,

<mg1>
Mutt 1.5.6i (2004-02-01)
Copyright (C) 1996-2002 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.5-gentoo-r1 (i686) [using slang 10409]
Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL  -USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  
-USE_FCNTL  +USE_FLOCK
+USE_POP  +USE_IMAP  +IMAP_EDIT_THREADS  -USE_GSS  +USE_SSL  -USE_SASL
-USE_SASL2  
-HAVE_REGCOMP  +USE_GNU_REGEX  +COMPRESSED  
+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  -BUFFY_SIZE -EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  -HAVE_LIBIDN  +HAVE_GETSID
+HAVE_GETADDRINFO  
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc/mutt"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@xxxxxxxx>.
To report a bug, please use the flea(1) utility.

patch-1.5.6.dw.mbox-hook.1
rr.compressed
patch-1.5.5.1.cd.edit_threads.9.5
</mg1>

<mg2>
Mutt 1.5.6i (2004-02-01)
Copyright (C) 1996-2002 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.4.25-gentoo-r2 (i586) [using slang 10409]
Compile options:
-DOMAIN
-DEBUG
+HOMESPOOL  -USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  
-USE_FCNTL  +USE_FLOCK
+USE_POP  +USE_IMAP  +IMAP_EDIT_THREADS  -USE_GSS  +USE_SSL  -USE_SASL
-USE_SASL2  
-HAVE_REGCOMP  +USE_GNU_REGEX  +COMPRESSED  
+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  -BUFFY_SIZE -EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  -HAVE_LIBIDN  +HAVE_GETSID
+HAVE_GETADDRINFO  
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="Maildir"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc/mutt"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@xxxxxxxx>.
To report a bug, please use the flea(1) utility.

patch-1.5.6.dw.mbox-hook.1
rr.compressed
patch-1.5.5.1.cd.edit_threads.9.5
</mg2>

Note that the only difference between the two is HOMESPOOL and MAILPATH.
I don't know if that matters (that's why I'm writing this). Sorry it's
taken me this many lines to get to the actual problem anyhow here it is
in a nutshell.

Both mg2 and mg1 have the same essential settings in .muttrc which are
posted a little farther down. I've set the same folder-hook on both
boxes so that the From and Return-Path: headers are filled with the
email I have used to subscribe to a list. When I edit a new email the
correct From address is displayed in vim; however, on mg1 (not running
the mail server) the From and Return-Path: headers are filled with my
normal non-list-subscribed email address before the mail is sent. On mg2
(running the mail server) the list-subscribed email is used as expected
for the From and Return-Path: headers. Here is the pertinent settings
from each .muttrc, (watch for wrapped lines)

<mg1>
set spoolfile=imaps://mail/INBOX        # where my new mail is located
set folder=imaps://mail/INBOX   # where i keep my mailboxes
set mbox=imaps://mail/INBOX     # where to store read messages
set mbox_type=Maildir
set imap_user=mike

set autoedit                    # go to the editor right away when composing
set editor="vim '+set tw=72'"           # editor to use when composing messages
set envelope_from=yes           # overwrite envelope from address

mailboxes ! =lists.clue-tech =lists.gentoo-user =lists.spice

folder-hook . unmy_hdr From Return-Path
folder-hook . my_hdr From: Mike Gant <mike@xxxxxxxxxxxxx>
folder-hook =lists.clue-tech 'my_hdr From: Mike <lister-clue@xxxxxxxxxxxxx>'
folder-hook =lists.gentoo-user \
        'my_hdr From: Mike <lister-gentoo@xxxxxxxxxxxxx>'
folder-hook =lists.gentoo-user \
        'my_hdr Return-Path: <lister-gentoo@xxxxxxxxxxxxx>'
folder-hook =lists.spice \
        'my_hdr From: Mike <lister-spice@xxxxxxxxxxxxx>'

lists clue-tech@xxxxxxxxxxxxxxxxx gentoo-user@xxxxxxxxxxxxxxxx
subscribe clue-tech@xxxxxxxxxxxxxxxxx gentoo-user@xxxxxxxxxxxxxxxx
</mg1>

<mg2>
set folder=imaps://mail/INBOX           # where i keep my mailboxes
set spoolfile=imaps://mail/INBOX        # where my new mail is located
set mbox=imaps://mail/INBOX                     # where to store read messages
set mbox_type=Maildir           # my mbox type
set imap_user=mike

set autoedit                    # go to the editor right away when composing
set edit_headers                # let me edit the message header when composing
set envelope_from=yes

folder-hook . unmy_hdr From Return-Path
folder-hook . my_hdr From: Mike Gant <mike@xxxxxxxxxxxxx>
folder-hook =lists.clue-tech 'my_hdr From: Mike <lister-clue@xxxxxxxxxxxxx>'
folder-hook =lists.gentoo-user \
        'my_hdr From: Mike <lister-gentoo@xxxxxxxxxxxxx>'
folder-hook =lists.mutt-user \
        'my_hdr From: Mike <lister-mutt@xxxxxxxxxxxxx>'

mailboxes ! +lists.clue-tech +lists.gentoo-user +lists.mutt-user +lists.spice

lists clue-tech@xxxxxxxxxxxxxxxxx gentoo-user@xxxxxxxxxxxxxxxx
subscribe clue-tech@xxxxxxxxxxxxxxxxx gentoo-user@xxxxxxxxxxxxxxxx
</mg2>

Let me know if more info is needed. 

Now, one final point. This started happening with the latest version of
mutt. Here are the headers of an old test email sent with version 1.5.4i from
mg1,

>From lister-gentoo@xxxxxxxxxxxxx Sun Feb  1 22:24:17 2004
Return-Path: <lister-gentoo@xxxxxxxxxxxxx>
Received: from gantsfort.com (c-24-9-179-236.client.comcast.net [24.9.179.236])
        by sdf.lonestar.org (8.12.10/8.12.10) with ESMTP id i11MOEWX018339
        for <mikeg@xxxxxxxxxxxxxxxx>; Sun, 1 Feb 2004 22:24:16 GMT
Received: (qmail 28202 invoked from network); 1 Feb 2004 15:24:09 -0700
Received: from mg1.gantsfort.com (192.168.0.10)
  by mg2.gantsfort.com with SMTP; 1 Feb 2004 15:24:09 -0700
Received: by mg1.gantsfort.com (sSMTP sendmail emulation); Sun, 1 Feb 2004 
+15:24:09 -0700
Date: Sun, 1 Feb 2004 15:24:09 -0700
From: Mike <lister-gentoo@xxxxxxxxxxxxx>
To: mikeg@xxxxxxxxxxxxxxxx
Subject: header test 17
Message-ID: <20040201222409.GB4372@xxxxxxxxxxxxxxxxx>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.4i
Status: RO
Content-Length: 0
Lines: 0

Is this a bug with the latest version 1.5.6i of mutt? Is there a new
setting or an old setting that I don't have set correctly?

Thanks for any help.

Mike

P.S One final addition. Here are my settings for ssmtp.conf on mg1

root=postmaster
mailhub=mail
rewriteDomain=gantsfort.com
hostname=mg1.gantsfort.com
UseSTARTTLS=YES