Re: Bug in send-hook? Offline mode for pop?
- To: mutt-users@xxxxxxxx
- Subject: Re: Bug in send-hook? Offline mode for pop?
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Wed, 15 Oct 2008 10:06:55 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=ROCYMGoegNp+0yr+HwBF++T0k7k=; b=KliX 7IRNUElKSeJiRAqOuAcEfXozePK9O2z1kMsxYj8ZZ8RQtyw9xJJXtMAP5A8rRfQL 3MknXrhvPt/6CWh2YE2zFGW5KRU7/qtmC4Db4jUqlCjgPdQDs++7TD4JiE/nokrT Hr3CJE5c10R/p+LS5F4SdEga2ZHoIXXCqXjHByY=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=gQ6nPJ4PlL+M+2tJ6FiGgfceE8w6rF4DocXk2NC2x3BRjV0RkiCbMaWFx0pblNM0eAaMZPyngHgeaPK1uvwNVXsnQPyzY3fh4Aq8fH8KQD6TGT17sGRpTBXf6rzS91bWqTDegf+yzKMb1NDBSlSKxRQliepau/5CjSk81cKVni0=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <605241.47123.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <605241.47123.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.18 (2008-09-25)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday, October 15 at 07:18 AM, quoth amscopub-blender@xxxxxxxxx:
> 1. Is there an offline mode for pop? Something similar to kmail --
> where it doesn't connect to the server unless you *explicitly* tell
> it to? It seems that mutt always connects to the pop server even
> after changing the pop_checkinterval to 10 minutes.
Not really. The way to think about mutt is that it's a mailbox viewer.
If you want to see the contents of a POP3 mailbox, you have to
connect. And then, once connected, there's no reason to *close* the
connection if you're still looking at messages stored on the server.
Mutt doesn't have an "offline mode" for *anything*. However, you can
probably get what you want using multiple tools. For example, you
could use something like fetchmail to periodically copy the contents
of your pop3 server to a local folder, and then use mutt to view the
contents of that folder.
> send-hook '^foo.*$' 'set content_type="text/plain"'
The reason this isn't doing what you want is that mutt is consulting
the contents of the $content_type variable BEFORE running the
send-hook. So the send-hook is changing the value of $content_type,
but since mutt's already used the contents of that variable for
something, the change isn't reflected in the message you're sending.
(This is probably a bug - you can report it to http://bugs.mutt.org)
Then, when you send a second message, the $content_type variable has
already been changed, so it is applied to this second message.
You can work around this like so:
send-hook '^foo' 'push <edit-type><kill-line>text/plain<enter>'
> I have no other send-hooks.
That's *probably* a mistake. Send-hooks do not set up a temporary
environment that disappears as soon as the message is sent. Send-hooks
execute commands whenever a message is sent that matches their
pattern. Thus, if you want to change some setting for just some
recipients, you have to change it back for all other recipients. The
usual way to do this is with two send-hooks: one to change the
setting, and one to change it back. Like so:
send-hook . 'set setting=defaultvalue'
send-hook '^foo' 'set setting=foovalue'
~Kyle
- --
The answers may be in The Book, but we're expected to show our work.
That's the only way that we can enjoy the fruits of DOING the work.
-- Howard Tayler
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAkj2Bw8ACgkQBkIOoMqOI15KTACg3phnlhNka46QoL9etB1RZ3td
N8AAoLwVYkaDMa/FJCG8cfYPCKh8irRi
=oJ+1
-----END PGP SIGNATURE-----