Gravatar

Re: fixing email dates

* Rocco Rutte <pdmef <at> gmx.net> [2009-04-28 05:02 -0500]:
> It would be nice if you could keep an eye on database file sizes. If
> the db libraries don't reuse freed space (either by deleted or updated
> entries), then we get a growing db file.

I'm running HEAD with your patch, and am running the following commands
at 2330 local every night.

#v+
find ~/.mutt/cache/ -iname "*.hcache" -printf "%p %s\n" | sort -u > ~/.mutt/$(date "+%F").hcache
diff -uwd ~/.mutt/$(date -d $(date "+%Y-%m-")$(($(date +%d)-1)) +%F).hcache ~/.mutt/$(date +%F).hcache
#v-

I'll review in a few days and see if the header caches for my ham/spam
training folders reduce after I empty them.

Regards,
--

-- 
dave [ please don't CC me ]

Gravatar

Re: use current folder name as argument to abitrary command

First, my goal is to change the from variable based on which mailing
list mailbox I'm in (my non-list email addresses don't change enough to
make this worthwhile for them).  I was using a one-line patch to export
the mailbox name to the shell.  With your solution that should no longer
be necessary, but I'm having trouble getting this to work.  All my list
email addresses are based on the mailing list name so the actual
translation is easy.  I'm almost there.

* Noah Sheppard <nhsheppard <at> taylor.edu> [2008-12-15 08:52 -0600]:
> I modified it slightly so that I get the current folder path in a
> variable on its own so I can be free to play with it further:
>
>     folder-hook . "set my_oldrecord=\$record"
>     folder-hook . "set record=^"
>     folder-hook . "set my_curdir=\$record"
>     folder-hook . "set record=\$my_oldrecord"

Once I had time, this was very helpful - thanks to both you and Kyle.

> The next step is to strip down that name so I have only the folder
> name, not the full path.  The best way I can think to do this would be
> to pass the full path folder variable to a shell command which will
> strip that down, and return the folder name to another variable (or
> the same one, I don't care).  I'm stuck at figuring out how to pass a
> mutt variable to a shell command.

I tried your way for a bit, but was unable to make it work - here's
where I'm at now.

#v+
(Continue reading)

Noah Sheppard | 2 May 08:55

Re: use current folder name as argument to abitrary command

On Fri, May 01, 2009 at 11:28:39PM -0500, David J. Weller-Fahy wrote:
> folder-hook +lists* "set shell=\"~/.mutt/gen-set-from.pl \$my_curdir && sleep 0.5\""
> folder-hook +lists* "push <shell-escape><enter>"
> folder-hook +lists* "push <enter-command>source ~/.mutt/list-from<enter>"
> #v-
> 
> Some explanation is in order.  The gen-set-from.pl script takes the
> current mailing list mailbox name (something similar to
> "=lists.mutt-users") on the command-line, and writes the file list-from
> containing the line "set from=dave-lists-mutt-users <at> weller-fahy.com".
> 
> Right now everything works except from never gets set.  I thought this
> might be because of the timing (source happening before the link is
> created), so I added a 0.5 second sleep after "list-from" generation.
> Adding the sleep did not fix the problem from never gets set because the
> source command runs before the shell finishes creating the link, but I'm
> not sure.
Hmm, I implemented a similar thing, and it worked correctly (thanks for
suggesting the whole using a script to write a mutt command to a file and
then sourcing it, since I hadn't gotten that far before).

For reference, here is exactly what I had:
in muttrc:
#get the name of the current directory in a variable, but preserve the
normal
#record setting (where to save sent messages)
folder-hook . "set my_oldrecord=\$record"
folder-hook . "set record=^"
folder-hook . "set my_curdir=\$record"
folder-hook . "set record=\$my_oldrecord"
(Continue reading)

Nicolas Sebrecht | 2 May 08:55
Favicon

mailing lists and gmail with mutt

Hi folks!

(My question is not purely mutt related. I'm posting here because I
think here is where I can have the best answers).

Recently, I moved one of my email address to gmail. The problem is that
Google thinks it's a good idea to not show what _they_ consider to be
duplicated mails.

I have one folder per mailing list. When I send/receive emails to a
mailing list, I expect to have a copy into my INBOX and another copy
into the dedicated folder (e.g. the sender did 
	To: list-address
	Cc: me
)

Also, I'm filtering emails with imapfilter. The rules are based on
fields like "List-Id". What's happening quite often is that when
somebody answers (both to a mailing list and me), the first message
I receive is that which addressed to me. As the second mail is not
downloaded, it breaks the threads in the folder of the mailing list.

Is there a way to tell Google to NOT do what _they_ think is the best
for me?
Or maybe I missed a mutt configuration option?

My web researchs didn't help me.

Thanks,

(Continue reading)

Patrick Shanahan | 2 May 13:29
Picon

Re: mailing lists and gmail with mutt

* Nicolas Sebrecht <nicolas.s-dev <at> laposte.net> [05-02-09 05:15]:
> 
> Recently, I moved one of my email address to gmail. The problem is that
> Google thinks it's a good idea to not show what _they_ consider to be
> duplicated mails.
> 

I bypass this anomaly by *not* using gmail's smtp service.  I use
gmail *only* to receive mail and send by relaying thru my isp using a
gmail *return* address.  The headers of this post will reveal that.

This way I have local record of my posts and still see my mail on the
lists and gmail.
--

-- 
Patrick Shanahan         Plainfield, Indiana, USA        HOG # US1244711
http://wahoo.no-ip.org     Photo Album:  http://wahoo.no-ip.org/gallery2
Registered Linux User #207535                    @ http://counter.li.org

Dave Patterson | 2 May 14:40
Picon

Re: mailing lists and gmail with mutt

* Nicolas Sebrecht <nicolas.s-dev <at> laposte.net> [2009-05-02 08:55:41 +0200]:

 
> Is there a way to tell Google to NOT do what _they_ think is the best
> for me?

No.  Like Microsoft or Apple, they will not listen to what the user
wants.

I don't imap gmail, because I don't like their folder layout, and they
won't let me change it.

So I pop it, and sort my mail locally.  I do not use gmail at all for
anything legal or sensitive.  They keep copies of everything, they say
as a 'convenience' to the uѕer, but mainly to keep their butts covered
with the governments of China and the United States.

To get around the gmail problem of not sending what they think is a
copy, I use a folder-hook to make a copy of mail sent and place the copy
in the folder I'm working from, or the catch-all 'Sent' folder. 

Occasionally, I will actually log on to their site and delete everything
I can see.

One day later, moѕt 'conversations' will remain.

Think about it.

--

-- 
Dave
(Continue reading)

Gravatar

Re: use current folder name as argument to abitrary command

* Noah Sheppard <nhsheppard <at> taylor.edu> [2009-05-02 01:56 -0500]:
> On Fri, May 01, 2009 at 11:28:39PM -0500, David J. Weller-Fahy wrote:
> > Right now everything works except from never gets set.  I thought
> > this might be because of the timing (source happening before the
> > link is created), so I added a 0.5 second sleep after "list-from"
> > generation.  Adding the sleep did not fix the problem from never
> > gets set because the source command runs before the shell finishes
> > creating the link, but I'm not sure.
>
> Hmm, I implemented a similar thing, and it worked correctly (thanks
> for suggesting the whole using a script to write a mutt command to a
> file and then sourcing it, since I hadn't gotten that far before).

You're welcome, I'm glad it works for you.  My initial attempt was to
have a script which would use the filename of the script as the input,
then create a link to that script which was named "=lists.mutt-users"
(or whatever the mailbox is).  That seemed overly complicated, though
neat, so I dropped that for command-line parameters.

My mutt runs on a debian install under VirtualBox which is running on a
Vista Host.  That said, my theory is that mutt is going fast enough that
the file is not available in time for mutt to source it on my
installation.  Not sure what to do if that's the case, though.

Here's my "mutt -v" output just in case there's something screwy.  I'm
following HEAD on a personal install of mutt.
#v+
Mutt 1.5.19 (2009-04-28)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
(Continue reading)

Cameron Simpson | 3 May 06:18
Picon
Picon
Gravatar

Re: use current folder name as argument to abitrary command

On 02May2009 14:55, David J. Weller-Fahy <dave-lists-mutt-users <at> weller-fahy.com> wrote:
[...snip...]
| # save the state of wait_key
| folder-hook . "set my_wait_key=\$wait_key"
| # turn off wait_key
| folder-hook . "set wait_key=no"
| # run command to create file to source
| folder-hook . "push <shell-escape>\"~/.mutt/muttecho.sh \$my_curdir\"<enter>"
| # set wait_key to saved state
| folder-hook . "set wait_key=\$my_wait_key"
| # source the file
| folder-hook . "push <enter-command>\"source ~/.mutt/muttintest\"<enter>"
| #v-
| 
| And the following muttecho.sh file.
| #v+
| [ -e ~/.mutt/muttintest ] && rm ~/.mutt/muttintest
| echo set my_revdir="$1" > ~/.mutt/muttintest
| #v-
| 
| I get two results that I did not expect.
| 1) I get the "any key" prompt after the shell command executes.
| 2) my_revdir is not filled with the current folder name.

Ok, you've got a few issues.

Mutt config commands _are_ executed in series, in the order in the
config file.

The keyboard input stream is not consulted until commmands have stopped.
(Continue reading)

Alex Huth | 3 May 20:23

Sidebar keys

Hello!
I am using mutt on debian with the sidebar patch. Even with the lines below in
the muttrc i am not able to move in the sidebar.

----------------
# Sidebar Settings
set sidebar_visible
set sidebar_width
set sidebar_delim

# Sidebar keys
macro index \CP sidebar-prev
macro index \CN sidebar-next
macro index \CO sidebar-open
macro pager \CP sidebar-prev
macro pager \CN sidebar-next
macro pager \CO sidebar-open
------------------

Which mistakes have i done?

Greetings

Alex

Wolf Wiegand | 3 May 22:13
Picon

Re: Sidebar keys

Hi,

Alex Huth wrote:

> # Sidebar keys
> macro index \CP sidebar-prev
> macro index \CN sidebar-next
> macro index \CO sidebar-open
> macro pager \CP sidebar-prev
> macro pager \CN sidebar-next
> macro pager \CO sidebar-open
> ------------------
> 
> Which mistakes have i done?

Try 'bind' instead of 'macro' (at least that's what works for me).

hth,

Wolf
--

-- 
Multidimensionale Ordnung sieht fuer den einfach gestrickten Betrachter halt 
meistens wie Chaos aus, weil er die Ordnung nicht erfassen kann. (Juergen P. 
Meier in d.a.s.r.)


Gmane