is this outdated?

2002-10-16 Thread Gregory Seidman

http://www.angio.net/misc/mail.html says the following:

Why use IMAP locally? If you refile messages between mail
folders directly using Mutt, you'll store invalid X-UID headers
into the wrong mail folders. When you then check your mail with
IMAP, the IMAP server will decide that you've goofed up your
mailbox, and renumber it for you, and change the IMAP
uidvalidity identifier. Isync will then barf. You could
accomplish this by having Mutt strip out the X-UID header on a
refile, but this way is much more clean. 

Is this still accurate, or did it only apply to some 1.3 version and has
been fixed in 1.4?

--Greg




Re: Sending escape sequences with $status_format

2002-10-03 Thread Gregory Seidman

Vincent Lefevre sez:
} Is there a way to specify terminal espace sequences in $status_format,
} for instance to write some data to the title or icon string? Of course,
} these characters mustn't be taken into account in right-justifying
} (%X). In zsh, one can do that with the prompt string, enclosing the
} escape sequence with %{ and %}.

I have, for a longtime, wanted something like that. It might even have been
the reason I joined this mailing list. My understanding, however, is that
curses/slang interferes with doing it directly.

It would be nice, though, to have something like zsh's %{ %} that mutt
would interpret as just send this to stdout and don't worry about it
(after, of course, expanding enclosed expressions such as mbox name). Any
developers/hackers (note the crosspost) like the idea? I'll try doing it
myself if I have the time, but that doesn't seem likely.

} Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/ - 100%
--Greg




Re: Mutt, SSH and Urlview

2002-10-03 Thread Gregory Seidman

D. J. Bolderman sez:
[...]
} Sorry, but was I complaining ? I was just ASKING a small question!!!
} 
} I notice some kind of offensive behaviour on this list the last couple
} of days. Too bad.

Don't worry, it's just Sven. You get used to him. And he pulls his weight
in the community, both by giving useful answers (however grumpily) and in
other ways.

} D.J. Bolderman
--Greg




Re: Mutt, SSH and Urlview

2002-10-03 Thread Gregory Seidman

Nancy McGough sez:
[...]
} Some ssh clients support this. For example SecureCRT, which you
} can get here
} 
}  http://vandyke.com/
} 
} has this feature. You just right click anywhere on a URL and
} choose Open URL and it will be opened in your local Windows
} browser. I discuss this and others in the SSH section of my main
} Pine page:
} 
}  http://www.ii.com/internet/messaging/pine/#ssh
} 
} I just switched to Mac OS X and this is pretty much the only
} thing that I miss about Windows. If anyone knows of a Mac OS X
} ssh client that supports this, please let me know!

Well, I use mutt in an xterm under XDarwin. This has the advantage that
simply selecting some text copies it into the clipboard. I use Keyboard
Maestro (great tool, shareware, worth every penny) to bind a key to a
simple AppleScript. I can't get to that script right now (it's on a
different machine, and I can't figure out how to read the compiled
AppleScript from the commandline), but it is equivalent to the following
shell script (note the *very important* quoting):

osascript -e 'open location '`pbpaste`''

This means that launching an URL from mutt takes two steps: select,
then keypress. (If the URL is long and wraps, however, I have to pipe it
through cat or something first.)

} Nancy
--Greg




Re: Open a formular when sending mail to a special address

2002-10-03 Thread Gregory Seidman

Oliver Fuchs sez:
} Hi,
} 
} I often have to send mails to a address (like [EMAIL PROTECTED]) and I always
} use a pattern file loaded via vim.
} 
} Can I please mutt to open this file when i mail to a/this special address?
} 
} Example:
} To: [EMAIL PROTECTED]
} Subject: Bug Rogers
} 
} And then mutt should open my pattern file with vim
} /home/me/pattern.file.

Figure out what sort of pattern you want to use, first of all. It looks
like you want to match the recipient. Then use a send-hook on that
pattern to set your editor slightly differently. For example:

send-hook '.' 'set editor=vim'
send-hook '~C bug@' 'set editor=vim +\\\$r ~/bugpatternfile\'

(You may have to check on the backslash-quoting of the $.)

} Oliver
--Greg




Re: Mutt, SSH and Urlview

2002-10-02 Thread Gregory Seidman

D. J. Bolderman sez:
} On Thu, 03 Oct 2002, Robert Ian Smit wrote:
}   Subject says it all: if I'm using Mutt over an ssh connection, how can I
}   execute http links in mails ? Or is this simply not possible ?
[...]
} Yes, I mean the graphical client on my workstation (winxp...) I got some
} links that lynx won't show correctly.

If I understand you correctly, you have an ssh connection from your WinXP
box to some other box, on which you run mutt. I can only think of one way
to go about opening a link from mutt-running-on-the-remote-box in a browser
on the local box. It requires three steps, only the first of which is
trivial:

1) In your ssh connection, forward a port on the local machine to the
   remote machine, e.g. ssh -R 31337:localhost:31337 user@host

2) Write a program for urlview to open which takes an URL as a commandline
   parameter, connects to the chosen port (e.g. 31337), and writes the URL.

3) Write another program which listens on the chosen port and, when it
   receives a connection, reads the URL from the socket and opens it in a
   local browser.

If you have the (open source) program named socket (and Cygwin on your XP
box) then this becomes relatively simple (though it still requires some
commandline for opening an URL):

#!/bin/sh
#urlview calls me
echo $ | socket localhost 31337

#!/bin/sh

#I listen on the port
#run me with a port number argument to start listening

if test $# -eq 0
then
openThatUrl `head -1`
else
if test x`dirname $0` = x.
then
ex=`pwd`/`basename $0`
else
ex=`dirname $0`/`basename $0`
fi
exec socket -b -f -q -r -p $ex -s -l $1
fi

} D.J. Bolderman
--Greg




Re: Howto mark all messages as read?

2002-10-01 Thread Gregory Seidman

Jose Romildo Malaquias sez:
} Hello.
} 
} Please, would someone tell me how can I mark all messages
} in the mailbox as read, with a single key command?

In your .muttrc:

macro index \cr 'T~O\n;NT~N\n;N;t'

Now ctrl-R will mark all messages as read unless, of course, you've
rebound T, N, ;, or t in the index. To avoid rebinding problems, change
those characters into their apprpriate, angele-bracket-enclosed
functions. This task is left as an exercise for the reader.

} Romildo
--Greg




mutt and exchange

2002-09-26 Thread Gregory Seidman

Happily, I have mutt playing nice with the Exchange server at work over
IMAP. This pleases me. Now I am looking for further interaction with the
Exchange server. In particular, it is my understanding that there is some
way to use the global (and personal?) address book(s) on the server. Maybe
it's LDAP? Perhaps it has something to do with the query functions? Do I
need an external program to help? Is there a HOWTO somewhere (Google did
not find anything useful for mutt exchange howto)?

--Greg




imap and new mail

2002-09-12 Thread Gregory Seidman

At work I now have mutt set up to properly connect via IMAP to an Exchange
server. The problem is, though, that new messages always appear as old and
unread. This means that mutt -Z is useless. Is there some adjustment that
would have to be made on the server to make new messages appear as new (I
know next to nothing about either Exchange or IMAP)? Is there something I
can tell mutt to get it to treat old/unread as new, particularly with
reespect to the -Z option?

--Greg




Re: setting From dynamically

2002-09-08 Thread Gregory Seidman

Aldy Hernandez sez:
[...]
} For example, if someone mails me at [EMAIL PROTECTED], I'd like my return
} address to be set to [EMAIL PROTECTED] when I reply to the message.
} 
} I've been playing with various hooks, to no avail.  None of them get
} triggered at the right time.
} 
} Am I missing something?  Has someone attepmted something similar?

Check out the reverse_name variable.

} Cheers.
} Aldy
--Greg




mutt and exchange

2002-09-04 Thread Gregory Seidman

I looked around for information on how to do this, but didn't find any. I
would like to be able to deal with my email using mutt, as I have for a
year or two. Unfortunately, the job I now have uses MS Exchange for email
and I can't seem to get mutt talking to it.

When I run mutt -f imap://server/ it asks for my username and password,
then tells me that the login failed. The username and password are right,
since I use them successfully with Outlook. Much the same thing happens
with Mozilla mail, incidentally. Is there any way to get more information?
Is imap the wrong choice for dealing with Exchange? Do I need something
more in the URL?

--Greg




Re: mutt and exchange

2002-09-04 Thread Gregory Seidman

Michael Leone sez:
} 
} Elimar Riesebieter said:
} 
}  No! The admin has to enable imap. Does he knows how to?
} 
} I believe that IMAP is enabled by default on Exchange (it was on mine, I
} believe). So if it's not running, the admin must have turned it off.

I have determined that IMAP is enabled, and that the servername I was using
in Outlook does map to an IP address.

Omen Wild sez:
} Quoting Gregory Seidman [EMAIL PROTECTED] on Wed, Sep 04 15:21:
}  Unfortunately, the job I now have uses MS Exchange for email and I
}  can't seem to get mutt talking to it.
} 
} At my previous job it took me a while to get fetchmail working with
} Exchange.  It has been a while, but I seem to remember that my username
} included the Windows Workgroup in it: \\WORKGROUP\USERNAME.  Or maybe
} after escaping the backslashes it was this: WORKGROUP\\USERNAME .
} Try something like that.

Well, I guessed a couple of workgroups, which didn't work, but I don't know
what workgroup I am in. Is there any way to tell from Windows XP
Professional (which is where I have Outlook working)? I don't believe the
machine itself is part of a workgroup, since I installed WinXP on it
myself. I don't recall entering a workgroup anywhere at all.

} Omen
--Greg




Re: forwarding with attachments but...

2002-08-02 Thread Gregory Seidman

Patrik Modesto sez:
} Hi!
} Maybe this is stupid question but I searched man-page to muttrc and find
} nothing about it. So, I need to forward message that contains some
} attachments. But I need to edit/update the text part of the forwarded
} message. What I've found is forward only text part or forward whole
} untouched message. I need somethig between.

This one of the less intuitive parts of mutt. To forward a message with
attachments as you would naturally want to you need to go to the
attachments view of the message, tag eveerything you want to forward
(including the body if you want to forward that), and then tag-forward
(i.e. tag-prefix forward, which if usually ;f). You'll find yourself in
your editor with whatever text you're forwarding, and when you exit the
editor the attachments will be there on the compose screen.

} Patrik
--Greg




Re: forwarding with attachments but...

2002-08-02 Thread Gregory Seidman

Sven Guckes sez:
} * Gregory Seidman [EMAIL PROTECTED] [2002-08-02 12:52]:
}  To forward a message with attachments as you would naturally
}  want to you need to go to the attachments view of the message,
}  tag everything you want to forward (including the body if you
}  want to forward that), and then tag-forward (i.e. tag-prefix
}  forward, which is usually ;f). You'll find yourself in your
}  editor with whatever text you're forwarding, and when you exit
}  the editor the attachments will be there on the compose screen.
} 
} yup..
} 
}  This one of the less intuitive parts of mutt.
} 
} but i wonder where you would improve the intuitiveness of that.
} suggestions?

With a quad-option (defaulting to ask-yes?). The option (I can't think of a
good name... forward-includes-attachments is too long), when set, would
make the ordinary forward action act as if all attachments had been tagged,
i.e. when you forward then all attachments are forwarded with it. When it
isn't set then mutt exhibits the current (unintuitive?) behavior.

I would consider it much more intuitive if forwarding a message forwarded
everything sent to me in that message, not just the text, but given that
that was not what was programmed in the first place I can only assume that 
there was some demand to have forwarding only forward the message body. I
would, in fact, be just as happy if there were no quad-option and the
default behavior was just to forward all attachments. Those who wanted only
specific attachments could either delete the unnecessary ones in the
compose screen or use the tag attachments tag-forward thing that is
currently required to forward all attachments.

I think either solution is better (easier and more intuitive) than the
current situation.

} Sven
--Greg




Re: forwarding with attachments but...

2002-08-02 Thread Gregory Seidman

David Champion sez:
} * On 2002.08.02, in [EMAIL PROTECTED],
} * Sven Guckes [EMAIL PROTECTED] wrote:
}  * Gregory Seidman [EMAIL PROTECTED] [2002-08-02 12:52]:
}   To forward a message with attachments as you would naturally
}   want to you need to go to the attachments view of the message,
}   tag everything you want to forward (including the body if you
}   want to forward that), and then tag-forward (i.e. tag-prefix
}   forward, which is usually ;f). You'll find yourself in your
}   editor with whatever text you're forwarding, and when you exit
}   the editor the attachments will be there on the compose screen.
}  
}  yup..
}  
}   This one of the less intuitive parts of mutt.
}  
}  but i wonder where you would improve the intuitiveness of that.
}  suggestions?
} 
} I find that these improve intuitiveness. I on;y use the attachment menu
} when I want to forward a specific attachment and leave the rest out.
} 
} message-hook .  set mime_forward=ask-no
} message-hook ~h multipart set mime_forward=ask-yes

Not bad, but mime_forward does the wrong thing also. It's great if you want
to forward an entire message (which, occasionally, I do), but it doesn't
serve the more common case of wanting to forward everything in the message
as parts of your message and adding a comment to the forwarded message
body.

--Greg




Re: reverse_name and send-hook

2002-07-17 Thread Gregory Seidman

Alain Bench sez:
}  On Tuesday, July 16, 2002 at 4:42:23 PM -0400, Gregory Seidman wrote:
} 
} } You want the same address in Reply-To: as in From:? What for?
}  Some mailing lists don't put in the proper reply-to, which means that
}  normal replies go to the list as a whole.
} 
} Unfortunately most of these mailing lists will overwrite your
} Reply-To: with the list address.

No, most of the broken lists add no headers at all, and mail from them
appears to be coming from the list, not the person who sent them.

} In muttrc you may want to set $followup_to and $honor_followup_to,
} and declare your mailing lists with lists or subscribe commands.
} This will help you sending and receiving replies where appropriate, at
} least with MFT compatible MUAs. See also $ignore_list_reply_to.

...which helps me with the mail I receive, not the mail I send.

}  Some mail clients use the envelope rather than the From header
} 
} Which ones? If you talk about some autoresponders and bouncers:
} They'll most probably continue to use the envelope, neglecting your
} Reply-To:.

I don't know which ones, but I've had it happen and had it fixed by adding
Reply-To.

}  I don't want to use $envelope_from because at least my sendmail setup
}  gives a warning about -f being used.
} 
} The last time this issue came on the list (last week) the answer by
} WBY was: « you need to add your user as a trusted user in the sendmail
} configuration ».

Great! ...unless you are not the administrator of the machine you are
using. And I'm not. And the administrator is not going to give any users
any greater privileges than they have.

} Bye!  Alain.
--Greg




Re: [PATCH] reply-hook (Re: reverse_name and send-hook)

2002-07-17 Thread Gregory Seidman

Michael Elkins sez:
[...]
} I believe the following approach is a good compromise.  This patch adds
} a reply-hook command which is just like the send-hook, except that it
} matches against the message you are replying to rather than the message
} you are sending.  All reply-hook's are execute prior to send-hook's.
} However, you can inhibit send-hook's in the reply case by using the
} pattern '! ~Q' (not-replied) in the send-hook to tell when reply-hook's
} have been executed.
[...]

I love it! How soon and how likely is that to get into the official source? 
I'd love to be able to tell my sysadmin to install the latest version and
have that functionality.

--Greg




Re: reverse_name and send-hook

2002-07-16 Thread Gregory Seidman

Alain Bench sez:
} [followups set to mutt-users only]
} 
} Hello Gregory,
} 
}  On Tuesday, July 16, 2002 at 12:09:29 PM -0400, Gregory Seidman wrote:
} 
}  I'd love to be able to set the Reply-To to be whatever the From
}  happens to be, i.e. all mail I send has a Reply-To matching the From
} 
} You want the same address in Reply-To: as in From:? What for?

Generally to work around stupid mailing lists and stupid mail clients. Some
mailing lists don't put in the proper reply-to, which means that normal
replies go to the list as a whole. Some mail clients use the envelope
rather than the From header, and I don't want to use $envelope_from because
at least my sendmail setup gives a warning about -f being used.

} Bye!  Alain.
--Greg




reverse_name and send-hook

2002-07-15 Thread Gregory Seidman

I just posted this to comp.mail.mutt but I don't think all that many people
read the newsgroup, especially the developers.

I'm doing some tricky things with send-hooks to set the From: and Reply-To:
fields based on the outgoing email address (mainly for mailing lists). This
works great, but it means I also need the following two lines:

send-hook '.' 'unmy_hdr Reply-To:'
send-hook '.' 'unmy_hdr From:'

In addition, I have a similar pair of lines (which come after the lines
above but before all the send-hooks for mailing lists) which set the From:
and Reply-To: to a reflector when sending mail outside my organization.

Given that setup, essentially every mail to any address outside my
organization gets a custom From: and Reply-To: field. The problem is that I
want reverse_name to supersede all send-hooks. If I send something to a
mailing list with a particular address and receive a personal reply from
someone, I want my reply to be sent out with the same address I use to send
to the mailing list. This is what reverse_name is all about. Unfortunately,
the person I am sending to will almost certainly be outside my organization
and, therefore, match the send-hooks that set the fields to the reflector,
overriding what reverse_name would have done for me.

I can't find anything in the documentation to fix this. I suppose the
simplest thing would be a ~something which would match if reverse_name had
set something, but no such thing seems to exist.

Any ideas?

--Greg




Re: reverse_name and send-hook

2002-07-15 Thread Gregory Seidman

Michael Tatge sez:
} Gregory Seidman ([EMAIL PROTECTED]) muttered:
}  I'm doing some tricky things with send-hooks to set the From: and Reply-To:
}  fields based on the outgoing email address (mainly for mailing lists). This
}  works great, but it means I also need the following two lines:
}  
}  send-hook '.' 'unmy_hdr Reply-To:'
}  send-hook '.' 'unmy_hdr From:'
}  
}  In addition, I have a similar pair of lines (which come after the lines
}  above but before all the send-hooks for mailing lists) which set the From:
}  and Reply-To: to a reflector when sending mail outside my organization.
[...]
} I have send-hooks which set a special From: for some recipients, too.
} I also have a default send-hooks unsetting my_hdr From: and I have
} $reverse_name set - works like charm.
} Please post your setup since I figure it's not mutt to blame here.
} 
} To give you an example:
[...]

The crucial difference is the reflector. I have the following:

send-hook '((~f gss) | (~f [EMAIL PROTECTED])) (~C @)' 'my_hdr Reply-To: 
[EMAIL PROTECTED]'
send-hook '((~f gss) | (~f [EMAIL PROTECTED])) (~C @)' 'my_hdr From: Gregory 
Seidman [EMAIL PROTECTED]'

(Note the the NOSPAM is simply to avoid email from spammers scraping the
archives.)

This basically says that anything coming from me and being sent to any
address with an @ in it (i.e. not on the local cluster) should set the
Reply-To and From fields.

It looks like the solution may be to set $from to the reflector and use a
hook to set From to the local address for local mail. Is there any other
way? I'd *really* like a pattern for whether reverse_name has found
something or not.

} HTH,
} Michael
--Greg