Re: Charset problem

2001-12-20 Thread Josh Huber

Brian Clark [EMAIL PROTECTED] writes:

 So this is what I have:

 export LANG=en_US
 export LC_CTYPE=en_US
 export LC_NUMERIC=en_US
 export LC_TIME=en_US
 export LC_COLLATE=en_US
 export LC_MONETARY=en_US
 export LC_MESSAGES=en_US
 export LC_PAPER=en_US
 export LC_NAME=en_US
 export LC_ADDRESS=en_US
 export LC_TELEPHONE=en_US
 export LC_MEASUREMENT=en_US
 export LC_IDENTIFICATION=en_US
 export LC_ALL=en_US

Just a hint:

$ locale
LANG=C
LC_CTYPE=C
LC_NUMERIC=C
LC_TIME=C
LC_COLLATE=C
LC_MONETARY=C
LC_MESSAGES=C
LC_PAPER=C
LC_NAME=C
LC_ADDRESS=C
LC_TELEPHONE=C
LC_MEASUREMENT=C
LC_IDENTIFICATION=C
LC_ALL=
$ export LANG=en_US
$ locale
LANG=en_US
LC_CTYPE=en_US
LC_NUMERIC=en_US
LC_TIME=en_US
LC_COLLATE=en_US
LC_MONETARY=en_US
LC_MESSAGES=en_US
LC_PAPER=en_US
LC_NAME=en_US
LC_ADDRESS=en_US
LC_TELEPHONE=en_US
LC_MEASUREMENT=en_US
LC_IDENTIFICATION=en_US
LC_ALL=


In other words, all you have to do is set LANG :)

You don't need to set each variable, unless you need the values
different.

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |



Re: Scoring by X-Priority

2001-12-12 Thread Josh Huber

[EMAIL PROTECTED] writes:

 Is there something else I can do to sort messages based on the
 header field that my filter is generating?

Well, way back I wrote a small patch that adds support for a custom
scoring header to mutt.  I'm sure it was messy, and it definately
slowed folder opening (was noticable for very large folders), but you
can take a look at this (which appears to still apply to 1.3.24!).  Of
course, while it may still apply cleanly, you're on your own to test
it and make sure it works:

diff -urN mutt-1.1.9/init.h mutt-1.1.9-extscore/init.h
--- mutt-1.1.9/init.h   Wed Mar 29 21:56:12 2000
+++ mutt-1.1.9-extscore/init.h  Tue Jan 11 06:21:08 2005
@@ -1663,6 +1663,15 @@
   ** $score_threshold_delete variable and friends are used.
   **
   */
+  { score_header, DT_STR, R_INDEX|R_RESORT_BOTH, UL ScoreHeader, UL  },
+  /*
+  ** .pp
+  ** When this variable is \fIset\fP, each message header will be examined
+  ** for a header in the form of ``score_header: integer''. The integer
+  ** value that is found is used as an initial score value for the message.
+  ** This allows the use of external scoring (with procmail, for example)
+  ** while still taking advantage of Mutt's score sorting features
+  */
   { score_threshold_delete, DT_NUM, R_NONE, UL ScoreThresholdDelete, -1 },
   /*
   ** .pp
diff -urN mutt-1.1.9/score.c mutt-1.1.9-extscore/score.c
--- mutt-1.1.9/score.c  Fri Mar  3 05:10:14 2000
+++ mutt-1.1.9-extscore/score.c Tue Jan 11 06:21:13 2005
@@ -20,6 +20,7 @@
 #include sort.h
 #include string.h
 #include stdlib.h
+#include mailbox.h
 
 typedef struct score_t
 {
@@ -115,8 +116,46 @@
 void mutt_score_message (CONTEXT *ctx, HEADER *hdr, int upd_ctx)
 {
   SCORE *tmp;
+  MESSAGE *msg;
+  FILE *fp = NULL;
+  HEADER *h = ctx-hdrs[hdr-msgno];
+  long lng = 0;
+  char *search = NULL;
+  char buf[STRING];
 
   hdr-score = 0; /* in case of re-scoring */
+
+  /* 
+   * If the score_header variable is set, then use
+   * that as an initial score value 
+   */
+  if(ScoreHeader  *ScoreHeader) {
+if((msg = mx_open_message(ctx, hdr-msgno)) != NULL)
+{
+  fp = msg-fp;
+  fseek(fp, h-offset, 0);
+  lng = h-content-offset - h-offset;
+
+  /* now, search the headers... */
+  while(lng  0) {
+if(fgets(buf, sizeof(buf) - 1, fp) == NULL)
+  break;
+   
+search = strstr(buf, ScoreHeader);
+
+if(search) {
+  search = strstr(buf, :);
+  hdr-score = atoi(search + 1);
+  break;
+}
+
+lng -= mutt_strlen(buf);
+  }
+
+  mx_close_message(msg);
+}
+  }
+
   for (tmp = Score; tmp; tmp = tmp-next)
   {
 if (mutt_pattern_exec (tmp-pat, 0, NULL, hdr)  0)


-- 
Josh Huber | [EMAIL PROTECTED] |



Re: Scoring by X-Priority

2001-12-12 Thread Josh Huber

[EMAIL PROTECTED] writes:

 Patched 1.3.24i ok, but doesn't build.
 Bombs out at this point:

 gcc -DPKGDATADIR=\/usr/local/share/mutt\ -DSYSCONFDIR=\/usr/local/etc\  
-DBINDIR=\/usr/local/bin\ -DMUTTLOCALEDIR=\/usr/local/share/locale\  
-DHAVE_CONFIG_H=1 -I. -I.  -Iintl  -I./intl -I/usr/local/include  -Wall -pedantic -g 
-O2 -c init.c
 In file included from init.c:41:
 init.h:1867: `ScoreHeader' undeclared here (not in a function)
 init.h:1867: initializer element is not constant
 init.h:1867: (near initialization for `MuttVars[171].data')
 init.c: In function `mutt_init':
 init.c:1844: warning: implicit declaration of function `getsid'

 I am not good at this stuff, so could my fault.

 Thanks anyway!

Oops, sorry.  That patch didn't have the whole set of changes in it.

You'll also need the declaration of the variable:

--- globals.h.orig  Wed Dec 12 13:31:11 2001
+++ globals.h   Wed Dec 12 13:31:14 2001
@@ -152,6 +152,7 @@
 WHERE short ScoreThresholdDelete;
 WHERE short ScoreThresholdRead;
 WHERE short ScoreThresholdFlag;
+WHERE char *ScoreHeader;
 
 #ifdef USE_IMAP
 WHERE short ImapKeepalive;


It builds for me with this, but you'll have to test it yourself :)

-- 
Josh Huber | [EMAIL PROTECTED] |



Re: Scoring by X-Priority

2001-12-12 Thread Josh Huber

Josh Huber [EMAIL PROTECTED] writes:

 It builds for me with this, but you'll have to test it yourself :)

Maybe I should mention how to use it.

just add:

score_header X-Priority

to your .muttrc, and the messages with this header will use the
integer contents of said header as the inital score value for that
message.

Hope it works for you,

-- 
Josh Huber | [EMAIL PROTECTED] |



Re: newbie: gpg confusion, various shell commands

2001-12-05 Thread Josh Huber

Brian Clark [EMAIL PROTECTED] writes:

 * I've managed to be able to clear sign outbound messages using:
   macro compose \Cp Fgpg --clearsign\ny PGP clearsign (by the
   way, binding and using ^s causes mutt to freeze, forcing me to
   kill it. Haven't the slightest clue why.)  The signing works OK as
   well.

You're most likely enabling scroll-lock for your terminal when you
press C-s.  Try hitting C-q to make it go away.

Use something other than C-s, or disable C-s as the stop char:

stty -a shows:

speed 38400 baud; rows 57; columns 84; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
eol2 = undef; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
...

try:
$ stty stop 

That fixes it for me, although that may not be the right way to do it.

HTH,

-- 
Josh Huber | [EMAIL PROTECTED] |



Re: mail-followup-to standard....

2001-12-04 Thread Josh Huber

Will Yardley [EMAIL PROTECTED] writes:

 yes.  this seems like kind of a bad idea to me, and something best
 left to MUAs - even if they are slow to adopt this, it seems as if
 enforcing this in an MTA might cause some problems.  for instance if
 i set the 'Reply-To' header to my address, but my mail server,
 running qmail (mine doesn't really) adds a 'Mail-Followup-To' header
 with the list address.  Of course i don't use mutt (actually i do,
 but just suppose) so i have no easy way of overriding this header.

 now when someone using an MUA that honors this header responds, it
 won't respond to my reply-to address.  i realize that this example
 might be a bit far fetched, but it's just one example.

Er, a few points:

1) to have qmail generate the Mail-Followup-To header automatically,
   you must have a list of mailing lists for it to use, so unless you
   add addresses to this list, the header won't get generated.
2) Having a Reply-To and a Mail-Followup-To header at the same time is
   fine.
3) An MUA that honors the MFT header will use it for *followups* only
   -- replies should go to the address specified in the Reply-To
   header.

 agreed!  i guess i was just trying to say that most of us
 communicate with non-mutt users frequently (i am the only mutt user
 at my work, in my family, etc. etc.) and so it's to our advantage to
 try and push for things like this to be made standard.

Definately.  On lists that are technical and 90% use mutt it is nice.
What would be really nice is if MS OE supported these kinds of
things.  Hah, right...how many years until they will? ;)

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |



Re: Mail-Followup-To

2001-11-30 Thread Josh Huber

Samuel Padgett [EMAIL PROTECTED] writes:

 I always figured that, if it really annoys them, they should switch
 to an MUA that generates a Mail-Followup-To header (like Mutt) or
   -or Gnus- :)
 one that handles duplicates really well (like Gnus).

It will be nice when other mailers (maybe even LookOut?  perhaps in a
couple years they will innovate this feature) implement this
feature...

Unfortunately, I think that World Peace (TM) will happen before this
occurs.

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |



Re: Mail-Followup-To

2001-11-29 Thread Josh Huber

Dairy Wall Limey [EMAIL PROTECTED] writes:

 in any event, looks like i'm SOL here.

Gnus honors the MFT header.  Recent cvs gnus also generates it.

But, if you're dealing with pine users, chances are there aren't any
(many?) Gnus users in the mix...

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |



Re: Authenticating public keys...

2001-09-19 Thread Josh Huber

David T-G [EMAIL PROTECTED] writes:

 % What do you guys do? Put up with the warning? Sign the key even if
 % you're not sure? Use the X-PGP-Fingerprint header as a second
 % validation? Use fingerprints in signatures?

 I just put up with it unless I have the opportunity to meet up with
 someone.  I'm considering using --lsign-key to keep things quiet but
 I then need to figure out how to differentiate between locally
 signed and globally signed keys for when I care.

I accidentally used --lsign-key once, and I recall having a bitch of a
time when my friend and I couldn't figure out why my signature wasn't
showing up on his key on the keyservers :P

I think the best practice is to just not sign a key unless you meet
in person and verify identity, otherwise, just deal with the
warning. (it is there for a reason, after all :)

ttyl,

-- 
Josh Huber



Re: GPG / PGP verification problem

2001-08-23 Thread Josh Huber

Brendan Cully [EMAIL PROTECTED] writes:

 Version: 1.3.20-1
 Replaces: mutt-i
 Provides: mail-reader
 Depends: libc6 (= 2.2.3-7), libncurses5 (= 5.2.20010310-1),
  ^^

 libsasl7, exim | mail-transport-agent
 Recommends: mime-support
 Suggests: i18ndata, urlview, ispell, gnupg | pgp | pgp5i
 Conflicts: mutt-i, suidmanager ( 0.50)
 Filename: pool/main/m/mutt/mutt_1.3.20-1_i386.deb

I suspect that his version of libc wasn't new enough, so apt wants to
upgrade it, pulling in a shit ton of other upgrades.  should work fine
though :)

that's what you get for running sid (or maybe woody?)

ttyl,

-- 
Josh Huber




Re: How to do a regexp

2001-02-25 Thread Josh Huber

On Sat, Feb 24, 2001 at 12:15:25PM -0500, Rich Lafferty wrote:
 On Sat, Feb 24, 2001 at 08:21:28AM -0500, Josh Huber ([EMAIL PROTECTED]) wrote:
  
  * ^TO_about.com
  
  the TO_ is expanded to a nice regex which matches the proper text
  before an address.
 
 Everyone keeps saying this, and it still doesn't work. That nice regex
 doesn't match the text *in* an address. Like the @ sign, for instance.

ok, you're right.  it should be
* ^TO_.*about\.com

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |

 PGP signature


Re: How to do a regexp

2001-02-24 Thread Josh Huber

On Wed, Feb 21, 2001 at 04:21:30PM -0500, Josh Huber wrote:
 The reasoning behind this is:
 
   * ^To: .*about.com.*
 
 ...often addresses are formatted in a way like:
 
 John Doe [EMAIL PROTECTED]
 or
 [EMAIL PROTECTED] (John Doe)
 
 but are not that often just the email address alone.

The above is, as someone else pointed out, obviously wrong.  I wasn't
thinking :)

You don't need to match the .* at the end because the pattern doesn't
need to match up to the end of the To line -- it will just match as
much as you've specified, and only fail if something doesn't match.

sorry about that...

So, to summarize, something like this would be good:

* ^To: .*about.com

would work, but if you want to more careful...something like the
following would be better:

* ^TO_about.com

the TO_ is expanded to a nice regex which matches the proper text
before an address.  man procmailrc and search for TO_.

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |

 PGP signature


Re: How to do a regexp

2001-02-21 Thread Josh Huber

On Mon, Feb 19, 2001 at 06:21:58PM -0500, Bruce A. Petro wrote:
 Many thanks!
 Can you point me to some book or doc or man that says things in fairly
 plain english as you did???  I'm finding a lot of docs on regexps that
 are hard to translate when you are just starting out like me.  They
 don't seem to say things like:
  The "." means "any character", so ".*" means "any string of characters".

Personally, I'd recommend the O'Reilly book, "Mastering Regular
Expressions".  If you don't want to buy that book, find someone who's
got the "Programming Perl" book, and read the section on Regular
Expressions. (warning: perl does have some nice extentions to the
standard regex syntax)

 Also, question: I understand the leading .* based on your remark, but
 what about the trailing .* ??  The TO address should always end with t
 the ".com" - is there a need for it, or were you just being ultra
 cautious to get everything possible?

The reasoning behind this is:

  * ^To: .*about.com.*

...often addresses are formatted in a way like:

John Doe [EMAIL PROTECTED]
or
[EMAIL PROTECTED] (John Doe)

but are not that often just the email address alone.

Hope that helps,

-- 
Josh Huber | [EMAIL PROTECTED] |

 PGP signature


Re: [lula] fetchmail: SMTP connect to localhost failed

2001-02-10 Thread Josh Huber

On Fri, Feb 09, 2001 at 12:09:58AM -0800, Jason Helfman wrote:
 you don't have smtp listening on your localhost for delivery. 
 
 port 25
 
 this is what I have on a: netstat -a :grep 25, or netstat -l
 
 tcp0  0 0.0.0.0:25  0.0.0.0:*   LISTEN  
 
 also you can try connecting to localhost port 25 with telnet
 
 jhelfman@dsl-64-34-6-73:~/bash$ telnet localhost 25
 Trying 127.0.0.1...
 Connected to alice.
 Escape character is '^]'.
 220 dsl-64-34-6-73.telocity.com ESMTP
 
 this is what mine showsand if it is working correctly, it will hand
 there awaiting commands.
 
 I hope this helps.

Also, I recommend not using sendmail, but having fetchmail deliver
directly into your inbox using procmail.  Use ssmtp for sending mail.
ssmtp is a nice send-only mailer that's really simple to configure:

apt-get install procmail ssmtp

here's the important line from .fetchmailrc:

poll foo.bar.com protocol imap username "huber" password
"***" mda "procmail -d %T"

the "mda" part is the important one.

You might need a .procmailrc.  Something simple like:
PATH=/usr/local/bin:/usr/bin:/bin
MAILDIR=$HOME/mail/
DEFAULT=$HOME/mail/inbox

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |

 PGP signature


Re: thread date question

2001-01-21 Thread Josh Huber

On Sun, Jan 21, 2001 at 02:42:24PM -0500, Ken Weingold wrote:
 I'm sorry, but I have looked all over my muttrc and the mutt manual,
 but can't find this anymore.  What variable is it that pushed a thead
 to the top of the index if there is new mail in it?

I think you're looking for sort_aux.  f. ex:
set sort_aux=date-received

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: Day-By-Day work with GnuPG

2001-01-16 Thread Josh Huber

On Tue, Jan 16, 2001 at 01:19:13PM +0100, Kai Weber wrote:
 Hi,
 
 maybe it is not a question for Mutt but because I mostly use gpg with
 Mutt it fits the on-topic-rules.
 
 How can I automatically clean up my pubring? Let's say, a key has
 expired. Mutt/Gpg uses still the key in the pubring. I have to go and
 remove the key to fetch a new one.
 
 This is just an example. My question therefor is whether a solution for
 keeping the keyring up-to-date already exist?

This might not be exactly what you're looking for, but I've written a
short perl script called 'uk' (update-key(s)) which might help you out
a little.

uk user/adress match, like:
[huber@majere:~]-$ uk huber
2000-01-20 Josh Huber [EMAIL PROTECTED]

***
Updating the listed keys from pgp.ai.mit.edu
***

gpg: requesting key 6B21489A from pgp.ai.mit.edu ...
gpg: key 6B21489A: not changed
gpg: Total number processed: 1
gpg:  unchanged: 1

if you don't enter a pattern to match, all the keys in your keyring
will be updated.

Then, I've got fk (find key), which could use some work:

#!/bin/sh

lynx -dump "http://pgp.ai.mit.edu:11371/pks/lookup?op=indexsearch=$1"
| grep ^pub | perl -e 'while() { m/.*\](.*?) \S+ (.*)/; print $1,
", ", $2, "\n"; }'

example:
[huber@majere:~/bin]-$ fk [EMAIL PROTECTED]
6B21489A, Josh Huber 

uk is attached.

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A


#!/usr/bin/perl

my $keyserver = "pgp.ai.mit.edu";
my $name;
$name = $ARGV[0] unless scalar @ARGV == 0;

open(GPG, "gpg --list-keys |");

my $keystr;
my $num = 0;
my @keys;
while(GPG) {
chop;
if (m/^pub.*?\/(.+?)\s(.*$name.*)$/i) {
print $2,"\n";
$num++;
push @keys, $1;
}
}

$keystr = join ' ', @keys;

close(GPG);

if ($num == 0) {
print "No keys to get!\n";
exit 0;
}

print "\n***\n";
print "Updating the listed keys from $keyserver\n";
print "***\n\n";
`gpg --keyserver $keyserver --recv-key $keystr`;

 PGP signature


Re: Day-By-Day work with GnuPG

2001-01-16 Thread Josh Huber

On Tue, Jan 16, 2001 at 06:57:07AM -0800, Mike E wrote:
 On a related note. How do you guys get new keys anyhow? I have
 encryption/decryption working, but is there a way to have gpg/mutt
 automatically fetch public keys from keyservers for you?

If you set a keyserver in the .gnupg/options file, gpg will
automatically download keys when mutt uses it to verify a signature.

relevant part of the config:
# GnuPG can import a key from a HKP keyerver if one is missing
# for sercain operations. Is you set this option to a keyserver
# you will be asked in such a case whether GnuPG should try to
# import the key from that server (server do syncronize with each
# others and DNS Round-Robin may give you a random server each time).
# Use "host -l pgp.net | grep www" to figure out a keyserver.
keyserver pgp.ai.mit.edu

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: special reply_regexp

2000-12-18 Thread Josh Huber

On Mon, Dec 18, 2000 at 04:20:28PM +0100, Daniel Kollar wrote:
 But with your regexp you cannot determine the head of the thread (w/o
 the Re:) like the first line of your example
 
[ruby-talk:7097] Rubyize this method
 
 You need to add a "?" after the (re...) pattern.
 
 The regexp which finally works for me is now
 
 set reply_regexp=
'^(\[[a-z0-9:-]+\][ \t]*)?((re([\\[0-9\\]+])*|aw):[ \t]*)?+[ \t]*'

That's interesting, because the one I posted works fine for me, and
the default mutt reply_regexp doesn't do what you suggest:

Default: "^(re([\[0-9\]+])*|aw):[ \t]*"

I assumed the reply regexp was applied to the subject, and the matched
text is removed, then the resultant string is compared with other
subjects.  If this is true (is it not?), then you shouldn't have to
conditionalize the re portion of the subject.

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: Procmail recipe to fetch gpg keys?

2000-12-18 Thread Josh Huber

On Mon, Dec 18, 2000 at 03:41:35PM -0500, Joe Philipps wrote:
 
 wel.I can think of two ways to get rid of the lack of verified
 key message (the goal):  use a bunch of trusted-key statements either
 in options or on the command line, or sign each key w/ my key.  It's
 more of a "reduction of annoyance factor" than a truly important
 program issue.

Ah, you wouldn't want to sign everyone's keys, as you shouldn't sign a
key unless you trust that person.  But perhaps a local signature?
maybe that is what they're used for (--lsign-key with gpg)

 option(s).  But these days I'm paying more attention to that statement
 in the manual about this format being deprecated :^) :^).  Something
 might be messed up since I switched back?  Didn't undo all those
 configurations?

I had no problems verifying your signature, just so you know.

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: help: high bit chars turned to '?'

2000-12-15 Thread Josh Huber

On Fri, Dec 15, 2000 at 03:02:57PM -0500, Ken Weingold wrote:
 Sorry I can't help, but I get this too on occasion and would love to
 fix it.  Last time I got it I asked my friend what he did with the
 email he sent and he said he used Word as the editor for Outlook.
 Double wammy, eh?

*ouch*

What I ended up doing was using a utf-8 xterm, and running mutt with
set charset=utf-8.

This shows all foreign characters, including Japanese ones, but every
once in a while I get email that shows up incorrectly.  Of course, now
that I'm talking about it, I can't find any messages with this
problem. (even though I _just_ looked at one).

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: Error messages

2000-12-14 Thread Josh Huber

On Thu, Dec 14, 2000 at 07:37:47AM -0800, David Alban wrote:
 Of course, this would be O.K.  I prefer the [[ ]] operator (found in
 ksh and bash 2.x) because it is smarter and more resistant to syntax
 errors that occur with [  ] if a variable is undefined.  But
 certainly one can use [  ] and then double quote the variables
 within, as you have done.

AFAIK, it also doesn't fork a process as well, using [[ ]] the tests
are done internally to bash/ksh, and are thus much faster.

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: Display name in index

2000-12-14 Thread Josh Huber

On Thu, Dec 14, 2000 at 09:58:26AM -0600, Gottipati Aravind wrote:
 Hi 
   In the Index , in the sent-mail folder (mailbox)all the messages 
 show my name. I want to set it up so that the messages show the name of
 the person I sent the mail to.. and not my name! Is there a way to ask
 mutt to do this..? If its in the manual (I did not find it) give me the
 section number.. Thank you

Yeah, try this:

set index_format="%4C %Z %[%b %d] %-15.15F (%4l) %s"
 ^
the default index_format is this:
 "%4C %Z %{%b %d} %-15.15L (%4l) %s"
 ^
A couple of things, using the [ ] for the date converts the time the
message was sent to your local time, which is nice (IMHO), and the L,
changed to the F makes it show who the mail was sent to, if it was
sent by you:

%F author name, or recipient name if the message is from you

hope this helps,

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: Error messages

2000-12-14 Thread Josh Huber

On Thu, Dec 14, 2000 at 06:27:54PM +0200, Peter Pentchev wrote:
 I dare you to name a relatively-modern version of csh, tcsh, bash, ksh
 or zsh, which does not have test/[ as a builtin ;)

Ok, you got me there.  I'm sure they all have this as a builtin, but
was that at least the historical reason for this?  I seem to remember
this being a reason to use [[ ]] in the past.

Thanks for the tip, :)

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: special reply_regexp

2000-12-14 Thread Josh Huber

On Thu, Dec 14, 2000 at 11:12:37AM -0800, Gary Johnson wrote:
 [ifc-ml:] Re: [ifc-ml:] base subject
 
   
 reply ID  base message ID
 
 I hope that was clear.
 
 I think the only solution available to us is to change the internals of
 mutt to recognize this sort of mangled subject.  Perhaps "we" could add
 a subject_ignore_regexp to tell mutt what part of a subject line to
 ignore when threading messages.

Is this necessary?  I'm using:

set reply_regexp=
'^(\[[a-z0-9:-]+\][ \t]*)?(re([\[0-9\]+])*|aw):[\t]*'

and it's threading mailing lists of this type for me...

for example:
[ruby-talk:7097] Rubyize this method
[ruby-talk:7099] Re: Rubyize this method
[ruby-talk:7104] Re: Rubyize this method

are all threaded properly. (well, not as good as messages with
In-Reply-To: but better than having threads scattered all over the
folder)

perhaps the regex wasn't quite right?

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: From: depending on To:

2000-12-13 Thread Josh Huber

On Wed, Dec 13, 2000 at 09:57:49AM -0800, Mark Luntzel wrote:
 yeah, thats a common complaint around here with send-hook. not sure
 if its being worked on.

huh?

If you want a default value to be used with send-hook, just do
something like:

send-hook . my_hdr From: [EMAIL PROTECTED]
send-hook some@address my_hdr From: [EMAIL PROTECTED]

Each time you send an email, mutt will go through the list of hooks,
and if one matches, it will execute it.  '.' is used to specify the
default.  (it's a regex)

This is clearly documented in the manual, isn't it?

 On Wed, Dec 13, 2000 at 06:47:43PM +0100, Jakub Klausa chortled:
  'lo
  
  I want my mutt to use different "From: " field values depending on the "To:
  " field. I managed to get it almost to work with the send-hook, but the
  problem is that the "From: " field changed with "my_hdr" directive doesn't
  get changed back to the default after sending the mail.
  
  For example i want all my mail to be send with a "From: [EMAIL PROTECTED]", but when i
  send to "To: [EMAIL PROTECTED]" i want the "From: " to be "From: [EMAIL PROTECTED]". It wokrs fine
  untill i send the mail to [EMAIL PROTECTED] Then the "From: " is changed permanently to
  [EMAIL PROTECTED] How do i handle this to change "From: " back to [EMAIL PROTECTED] after sending
  the mail to [EMAIL PROTECTED]?
  
  -- 
  k.
 
 
 
 -- 
 Prepare for the inevitable, and you will be struck by something worse. 
 Before you speak, listen to my fist. 
 Walk alone before you walk ahead. 

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: charset (was Re: bla)

2000-12-12 Thread Josh Huber

On Tue, Dec 12, 2000 at 04:38:21AM +0100, Johannes Zellner wrote:
  AFAIK this is for emails, you *send*
 
 funny: I've
 
 set charset="iso-8859-1"
 
 but look at the header of this mail! -- It's us-ascii.

the charset is the encoding you want the text to be displayed in, and
the send_charset is used to determine what encoding to send with.

Since you're using a devel version of mutt, it automatically sets the
send_charset based on what the content of the mail can be converted to
without losing any data (afaik).  For example:

set charset=utf-8
set send_charset="us-ascii:iso-2022-jp:iso-8859-1:utf-8"

which automatically changes the content-type to iso-2022-jp when there
is japanese text in the mail.

pretty cool.

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: Mutt and HTML body

2000-12-05 Thread Josh Huber

On Tue, Dec 05, 2000 at 06:19:14PM +0100, Jacques Giudicelli wrote:
 Hello,
 im quite a new user for Mutt. I would like to send a mail with a html 
 body, how could i do that. I have tried a header with Content-Type : 
 text/html but it doesn't work.

is this a joke? :)

but seriously, no, I don't think there is a way to do this.  Change
the content type to text/html (control-T in the compose menu), and
just put html in the body of the email.

but -- never send it to me!

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: japanese with devel mutt

2000-11-13 Thread Josh Huber

On Sun, Nov 12, 2000 at 04:36:37PM +0800, Anthony Liu wrote:
 OK here is my take:
 
 There are two xterms you can choose to display Japanese character set.
 However I have only tried the more popular shift-jis encoding, which the
 other one is deprecated, I think.
 
 One is Kanjiterm, Kterm in short. However, it is a bit hard to find.
 
 The other one is Aterm, which is called the Afterstep Term. You have
 to compile Aterm with somthing like "--enable-kanji" with configure.
 Once you have it compiled. Start Aterm, fire up lynx and load the page
 "http://www.yahoo.co.jp/". Notice: lynx support for Japanese and Chinese
 encoding is a bit broken.
 
 Enlightened Term (Eterm) said to support Kanji (which is a bad
 description), I have yet to get it to work, you might need to set the
 locale variables.
 
 However, if you use emacs, you should try out MULE, which is a
 multi-lingual edition for emacs.  If you want X apps to display
 Japanese, there are more you have to do then just the xterm.

This isn't my problem.  I'm using rxvt built with kanji support -- the
problem is that mutt only displays the characters properly if I set
the LANG environment variable.  kanji support is working great in the
term, I just need to convince mutt to display it properly.  Perhaps
I'll try rebuilding xterm with unicode support :)

ttyl,

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


mailing list handling

2000-11-13 Thread Josh Huber

Hi again.

I like mutt's ability to set the Mail-Followup-To variable, and the
list-reply functionality, but I don't like how it shows the list name
instead of the person who sent the mail in the index view.

I already have procmail sort mail into seperate mailboxes, so I know
what mailing list I'm dealing with.

What's the proper way to keep the default behavior, but still use the
additional handy features you get when using the subscribe command.

Thanks,

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: mailing list handling

2000-11-13 Thread Josh Huber

On Mon, Nov 13, 2000 at 11:49:33AM -0800, Luke Ravitch wrote:
   set index_format = "%4C %Z %[%b %d] %-15.15n (%4l) %s"
   
 
 The default format string has "%-15.15L" instead of "%-15.15n".  The
 "n" expands to the author's real name (or address if the real name
 isn't known).  I believe the numbers have to do with the field length.

Yep, ok.  Thanks.

-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


japanese with devel mutt

2000-11-11 Thread Josh Huber

I'm trying out mutt version 1.3.11i, mostly because it has support for
automatically switching the charset= line in outgoing emails to the
proper encoding.

Here's the problem:  I can't get japanese to display properly without
using something like LANG=ja_JP /usr/local/bin/mutt, which causes
subprocessies (like gpg) to run with that language envionment.

I'd like it to display text without setting the LANG variable, so I
looked at the charset variable, and tried setting it to iso-2022-jp,
which didn't seem to do anything, except prevent me from viewing
japanese text. (of all things)

am I clueless here?  anyone have hints on how to set this up?  I'm
using xemacs with canna for input/sending email, btw.

also, is this the proper place for these questions?  people on -dev
might have a better idea :)

thanks in advance,
-- 
Josh Huber | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


\cRight not working?

2000-11-01 Thread Josh Huber

Hey, I'm trying to use control + an arrow key for some other use.  Is
this not supported, or do I need to use some sort of magical
incantation to get mutt to use it?

for example:
bind index \cright last-entry

doesn't work, and shows up in the list of bindings as:
|right last-entry

not what I expected.

quoting the whole thing doesn't work either. 

neither does this, which I thought might have worked:

bind index \c"right"

to make sure mutt considered the right as a whole character.

Thanks,

-- 
Josh Huber   | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: How to use more than one Email address for a name in the alias-file ?

2000-10-31 Thread Josh Huber

On Tue, Oct 31, 2000 at 10:52:03PM +0100, Chris De Keulenaer wrote:
 This is something I couldn't find in the Mutt manual. Most of my
 contacts have more than one Email address, e.g. one for the office
 and another one for private use. I would like to type a name (e.g. :chris)
 and then by expanding (tab), get the list of matching Email addresses.
 The problem I have is that Mutt doesn't give me a list at all. It already
 selects one address for me, without giving me the possibility to select
 the other one.

Well, you could just do something like:

alias joework Joe at Work [EMAIL PROTECTED]
alias joehome Joe at Home [EMAIL PROTECTED]

then when you type in joetab, you'll just get a list of aliases that
start with the text 'joe'

 Thanks for your time !

Is that what you wanted?

ttyl,

-- 
Josh Huber   | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: PGP key selection (Was Re: automatically changing email address...)

2000-10-26 Thread Josh Huber

On Thu, Oct 26, 2000 at 11:51:42AM +0100, Dave Ewart wrote:
 I've posted about this in the past, and I don't think I've ever seen any
 suggestions, macros, or workarounds for this problem ...  Even if you
 specify the key-ID to use in a "pgp-hook", it _still_ gives you this
 prompt, which seems bizarre ...

Yes, I've gone so far as to wrap the output of gpg so that only one
key show up as selectable, but most of the time mutt segfaulted.  I
didn't have enough time to look into it, so I'm not sure what I was
missing from the gpg output format to make mutt happy.

ttyl,

-- 
Josh Huber   | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: automatically changing email address...

2000-10-26 Thread Josh Huber

On Thu, Oct 26, 2000 at 04:06:31PM +0300, Mikko H?nninen wrote:
 Well, here's a suggested solution:
 1) put all your send-hook commands in a separate muttrc-style file
 2) make "M" into a macro that
- does "unhook send-hook"
- sets up your From header (my_hdr From ... or set from=...)
 
 Then you also need some method to restore the settings.  The easiest
 solution would be to set up a macro that just reads the send-hook file
 again, and undoes whatever settings you did in the M-macro.  But that's
 not automatic.

Hmm, ok...

How about I just make it always set the values depending on what I
press:

bind index Y mail
bind index E reply
macro index m ":source ~/.mutt/autoselect^mY"
macro index M ":source ~/.mutt/workselect^mY"
macro index r ":source ~/.mutt/autoselect^mE"
macro index R ":source ~/.mutt/workselect^mE"

~/.mutt/autoselect:
source ~/.mutt/send-hook.default
# send hooks to automatically select From: header

~/.mutt/workselect:
source ~/.mutt/send-hook.default
send-hook . my_hdr From: ...

more brute force, but less of a pain to implement? (haven't tried it
yet though)

 If you want to automatically restore the settings once that email has
 been finished, it does get quite tricky.  There's no way to make a macro
 that will "do this, then send email, and after the 'send email' step has
 completed, do this".  But, there is only a limited amount of ways you
 can get out of the compose menu.  You just have to create macros for all
 the possible exit keys in the compose menu, that restore your usual
 setup.  They could also un-macro all the compose menu bindings, although
 that's strictly speaking not necessary (it won't hurt to leave them in
 every time).

This, I think, would be more trouble than it's worth...

-- 
Josh Huber   | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: automatically changing email address...

2000-10-26 Thread Josh Huber

On Thu, Oct 26, 2000 at 04:06:31PM +0300, Mikko H?nninen wrote:
[snip]

Here's what I ended up doing:

# ~/.mutt/sending
bind index Y mail
bind index E reply
bind index H group-reply
macro index m ":source ~/.mutt/autoselect^mY"
macro index M ":source ~/.mutt/workselect^mY"
macro index r ":source ~/.mutt/autoselect^mE"
macro index R ":source ~/.mutt/workselect^mE"
macro index g ":source ~/.mutt/autoselect^mH"
macro index G ":source ~/.mutt/workselect^mH"


# ~/.mutt/autoselect
source ~/.mutt/send-hook.default

# work email (used internally)
send-hook (missioncriticallinux|mclinux|mclx).com my_hdr 'From: Josh Huber 
[EMAIL PROTECTED]'
send-hook (missioncriticallinux|mclinux|mclx).com 'set signature=~/.mutt/sig.work'

# mailing list setup
send-hook '~t debian-' my_hdr 'From: Josh Huber [EMAIL PROTECTED]
send-hook '~t mutt-' my_hdr 'From: Josh Huber [EMAIL PROTECTED]


# ~/.mutt/workselect
source ~/.mutt/send-hook.default

# work email (used internally)
send-hook . my_hdr 'From: Josh Huber [EMAIL PROTECTED]'
send-hook . 'set signature=~/.mutt/sig.work'


# ~/.mutt/send-hook.default

unhook send-hook

# gpg defaults
send-hook . 'set pgp_autosign=yes'
send-hook . 'set pgp_autosign=yes'
send-hook . 'set pgp_replysignencrypted=yes'
send-hook . 'set pgp_replyencrypt=yes'
send-hook . 'set pgp_replysignencrypted=yes'
send-hook . 'set pgp_replysign=yes'

# nightshade email (default)
send-hook . my_hdr From: Josh Huber [EMAIL PROTECTED]
send-hook . 'set signature=~/.mutt/sig.nightshade'

# don't use a sig or gnupg when dealing with listservs...
send-hook majordomo|listserv 'set pgp_autosign=no; set pgp_replysign=no'
send-hook majordomo|listserv 'set signature=""; set attribution=""'

Works great so far...

now for that pgp problem...

-- 
Josh Huber   | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


Re: automatically changing email address...

2000-10-26 Thread Josh Huber

On Thu, Oct 26, 2000 at 05:05:58PM +0300, Mikko H?nninen wrote:
 You don't need to have a separate binding for the mail-function to Y,
 you can just put "mail" instead there.

Ah, ok.  That's good to know.  Definately better than binding the
extra keys as I have been doing.

 You will also have to remember to define macros for the pager, but I
 guess you know that. :-)

Actually, thanks for reminding me. :)

 of which override previous send-hook definitions.  Not that I've ever
 seen Mutt slow down because of using too many send-hooks, but it's a
 good practice anyway to clean up after yourself. :-)

Yeah, I've been very happy with mutt's performance on dealing with
very large mailboxes, especially while threading the messages.

thanks again,

-- 
Josh Huber   | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature


automatically changing email address...

2000-10-25 Thread Josh Huber

I've got a question for you guys,

I'm using the following rules to differentiate between internal work
email and external email.  I'd like however, to be able to bind a key
(for example, 'M') to mean send but always use my work email address
as the From: header.

# nightshade email (default)
send-hook . my_hdr From: Josh Huber [EMAIL PROTECTED]
send-hook . 'set signature=~/.mutt/sig.nightshade'

# work email (used internally)
send-hook (missioncriticallinux|mclinux|mclx).com my_hdr 'From: Josh Huber 
[EMAIL PROTECTED]'
send-hook (missioncriticallinux|mclinux|mclx).com 'set signature=~/.mutt/sig.work'

That works, but how could I override this (for just one message)?

Another (completely unrelated) question I had was regarding the PGP
support.  I've been using it for a while now, but I'd like to have
some way to select a key for encryption automatically.  Well, it does
already do that, but I still get a list of all the uids listed for the
GPG key.  Selecting any of them works because gpg automatically
selects the right key for encryption, but automatically having this
done would be nice.  I immagine this could be done with a macro, but
is there a cleaner solution?

Thanks,

-- 
Josh Huber   | [EMAIL PROTECTED] |
1024D/6B21489A 61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A

 PGP signature