Re: subscribe

2010-01-20 Thread Gen-Paul

Freeman wrote:

Thanks guys. I had read something that, on revisiting, seems rather unclear.

I have a text file of lists for spam-bouncer/procmail which muttrc grep's
for 'subscribe' .

Of course, that doesn't get me aliases and recipes. Seems I could approach
your py elegance with a bash script, which I have been studying of late.
With all your mailboxes in ~/mail/lists, you could set up something 
basic like

this in ~/.muttrc:

#--
# Define mailing lists
#--
unsubscribe  * # clean slate
subscribe`cd ~/mail/lists  echo  *` #all mailing lists
#--
# Dynamically generate entries for each mbox in ~/mail/lists folder
#--
mailboxes `for file in $(ls ~/mail/lists); do \
echo -n +lists/$file ;  \
done`
#--
# Initialize mailing lists' alias file
#--
set my_dummyvar=`ls -1 ~/mail/lists | \
 grep @ | \
 awk -F@ '{print alias   $1$1 @ $2}'   \
   ~/.mutt/lstal`
#--
# Source mailing lists aliases
#--
source  ~/.mutt/lstal  # source aliases

Since procmail automatically creates a new mailbox in ~/mail/lists when I
receive the first message from a newly-subscribed mailing list, the above
is 100% maintenance-free.

Note that my_dummyvar is not set to anything. I needed something where I
could plug my alias file creation mini-script. Access is not serialized,
so this might break if several instances of mutt are started concurrently.

I never type my mailing list aliases, only the shortest non-ambiguous
string and hit theTab  key:

I am subscribed to 'fontcon...@lists.freedesktop.org', the alias generated is
the still too long 'fontconfig' but since I know I have not other alias that
starts with 'f', I only have to enter 'fTab' at the To: prompt.

Gen-Paul.




Re: Vim fold key bindings for mutt threads

2010-01-06 Thread Gen-Paul

david wrote:

[..]

Cool..!

Thanks for posting.

Gen-Paul.


Re: Mutt 256 color themes

2010-01-06 Thread Gen-Paul

Horacio Sanson wrote:

 Currently I am using the ivy league color theme from Aaron Toponce
 (see link below) with a couple of modifications to make it work in my
 transparent KDE Konsole.



 http://pthree.org/2008/10/22/ivy-league-theme-for-mutt/



 I was looking for similar 256 color themes for mutt but there does
 not appear to be any on the whole Internet.


There are some config file samples at http://wiki.mutt.org - look for a 
link called
Configlist - some include coloring, and screenshots are provided, but 
there are many
broken links. There used to be a lot more when I downloaded some to my 
laptop a couple

of years ago when I was setting up mutt.


 Are there any other themes around? Or is anyone willing to share
 their colors?

 Here I attach the color setting I use. To use it I source it in my
 .muttrc file like:

 source /path/to/ivy256


Attaching mine, I use different tones of a couple of colors and shades 
of grey rather
than the entire color spectrum, so if you were looking for something 
colorful, you

will be disappointed :-)

If you want to take a look at it, make sure you're running mutt on a 
dark background.


Gen-Paul.



# -*- muttrc -*-
#
# Color settings for mutt.
#

# Default color definitions
color normal  color250  default
color hdrdefault  color136  default
color quotedcolor244  default
color quoted1 color240  default
color quoted2 color236  default
color quoted3 color244  default
color quoted4 color240  default
color quoted5 color236  default
color signature   color254  default
color indicator   color231  color233
color error   color88   default
color statusblack color245
color treecolor240  default
color tilde   black default
color attachment  brightyellow  default
color markers   color240  default
color message color250  default
color search  color231  color233
color boldcolor231  default

# Color definitions when on a mono screen
mono bold bold
mono underlineunderline
mono indicatorreverse
mono errorbold

# Colors for message headers
color header  color231  default ^(From|Subject):
color header  color231  default ^To:
color header  color231  default ^Cc:
mono  header  bold  ^(From|Subject):

# This is a mess.  What happens when a message is flagged twice?

# reset index to medium grey
color index   color246  default  
# regular new messages
color index   color145  default ~O | ~N
# regular 'old' messages
#color index  color145  default ~N 
# regular tagged messages
color index   color184  default ~T
# regular flagged messages
color index   color185  default ~F
# messages to myself
color index   color221  default ~p
# messages from myself
color index   color221  default ~P
# big messages - don't see much point for this one
#color index  color52   default ~z 32765-
# deleted messages
color index   color160   default ~D

# Highlights inside the body of a message.

# Attribution lines
color body color208 default \\* [^]+ [^]+ \\[[^]]+\\]:
color body color208 default (^|[^[:alnum:]])on [a-z0-9 ,]+( at [a-z0-9:,. 
+-]+)? wrote:

# The TOFU
#color body color231 default \[\-\-\-\=\|
color body color231 default TOFU

# Highlights inside the body of a message.

# URLs
color body color231default (http|https|ftp|news|telnet|finger)://[^ 
\\t\r\n]*
color body color231default mailto:[-a-z_0-9...@[-a-z_0-9.]+;
mono  body bold(http|https|ftp|news|telnet|finger)://[^ 
\\t\r\n]*
mono  body boldmailto:[-a-z_0-9...@[-a-z_0-9.]+;

# email addresses
color body color231default [-a-z_0-9.%...@[-a-z_0-9.]+\\.[-a-z][-a-z]+
mono  body bold[-a-z_0-9.%...@[-a-z_0-9.]+\\.[-a-z][-a-z]+

# PGP messages
color  bodycolor84 default ^gpg: Good signature .*
color  bodycolor250default ^gpg: 
color  bodycolor88 default ^gpg: BAD signature from.*
mono   bodybold^gpg: Good signature
mono   bodybold^gpg: BAD signature from.*

# Various smilies and the like
color body color220default [Gg]# g
color body color220default [Bb][Gg]# bg
color body color220default  [;:]-*[}){(|]  # :-) etc...
# *bold*
color body color231default 
(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)
mono  body bold
(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)
# _underline_
color body color231default 
(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)
mono  body underline   
(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)
# /italic/  (Sometimes gets directory names)
color body color231  default 
(^|[[:space:][:punct

Re: Links in message body.

2009-12-02 Thread Gen-Paul

Buzzer wrote:

Can I make http and ftp links in plain text message body accessible for
Lynx browser?
   

I coded the following macros in my ~/.muttrc:

macro index \cv |elinks\n
macro pager \cv |elinks\n

When I hit Ctrl-V, the message under the cursor is piped to the E Links 
web browser.


I can see all the links in context and navigate them as if the message 
had been html.


Maybe you could convince lynx to display plain text messages as if they 
were html?


Gen-Paul.


Re: Links in message body.

2009-12-02 Thread Gen-Paul

Buzzer wrote:

  2-Dec-2009 числа в 17:01 часов, Gen-Paul написал(а) следующее:

   

Can I make http and ftp links in plain text message body accessible
for Lynx browser?

   

macro index \cv |elinks\n
macro pager \cv |elinks\n

When I hit Ctrl-V, the message under the cursor is piped to the ELinks
web browser.

Maybe you could convince lynx to display plain text messages as if
they were html?
 

By pressing hot key? Then tell me more about it, please.

   
For some reason the bit where wrote that I have coded the following in 
my .muttrc

seems to have disappeared.

Here's a more detailed description:

macro   : tell mutt that the rest of the line is a macro, that you are 
going to

  associate a key combo to an action

index   : tell mutt where you want the function enabled, the index 
screen - that's
  the one that displays the message list, the pager screen that 
displays
  one particular message, or 'generic - ie. all screens. 
Because you are
  feeding a message as input to another program, this 
particular action

  only makes sense for the index and the pager.

\cv : Ctrl + v (the key combo that will execute the macro). You can 
change
  that to anything that's not already doing something else in 
the index

  and the pager.

|   : the pipe-message function - invokes an external program that will
  receive the current message as input

elinks  : the program that will process the message. I use ELinks because it
  renders web pages a lot closer to the graphical browsers _and_ it
  recognizes http://www.example.com or em...@example.com even 
in the
  middle of an ASCII text file. I don't know if you can just 
substitute
  lynx for elinks and if you will be able use the tab key or 
the arrow
  keys to move between links and hit enter follow links. I 
don't use lynx.


\n  : if you don't code this, mutt will prompt you for a 
confirmation each

  time you hit the key combo - it's equivalent to enter.

I prefer this solution to urlview/urlscan because it directly switches me to
a web browser where I can see the links in the context of the message. I am
subscribed to a newsletter that can have some 50-60 links easily, and maybe
I have not configured it optimally, but all I get with urlview is two 
screens'
worth of links with numbers and cryptic URI names, and I'm left to guess 
what

they correspond to.

Gen-Paul.


Mail Box formats - pros and cons.

2009-11-24 Thread Gen-Paul
Is there an online document that features an in-depth discussion of the 
different mailbox formats?


Thanks,

Gen-Paul


Re: Mail Box formats - pros and cons.

2009-11-24 Thread Gen-Paul

Christian Brabandt wrote:

Is there an online document that features an in-depth discussion of the

different mailbox formats?
 

as far as I know, not for covering all possible mailbox formats mutt
knows (maildir, mbox, mh, mmdf).

But mostly it boils down to maildir vs. mbox and there is some
documentation available on the net, like this:

http://www.linuxmail.info/mbox-maildir-mail-storage-formats/
http://www.courier-mta.org/mbox-vs-maildir/

   

Thanks!! The second document is precisely what I was looking for.

Gen-Paul


Re: Mail Box formats - pros and cons.

2009-11-24 Thread Gen-Paul

Michael wrote:

[..]


http://wiki.mutt.org/?MuttFaq/Maildir
http://wiki.mutt.org/?FolderFormat
   

Thanks, the MuttFaq actually has as link to

http://www.courier-mta.org/mbox-vs-maildir/

and I missed it.

Gen-Paul


Re: mutt no longer renders HTML or spawns browser on text/html

2009-11-05 Thread Patrick Gen-Paul

martin f krafft wrote:

Hey folks,

for a few weeks now, my mutt (version info below) renders HTML
messages as HTML, i.e. it does not run them through w3m, which is
configured in mailcap as the first copiousoutput text/html viewer.
I also have implicit_autoview on.

This used to work and I did not touch my config in months.
http://git.madduck.net/v/etc/mutt.git

What's worse is that hitting enter on such attachments just places
the raw HTML into the internal pager. If I use view-mailcap ('m'),
then a browser is spawned.

Does anyone have an idea what could be going on?


Shot in the dark, assuming you use urlview:

check the configurable section in /etc/urlview/url_handler.sh

Gen-Paul.


No indent string displayed

2009-10-29 Thread Patrick Gen-Paul
I have noticed some threads on another mailing list where the quoting 
via the indent_string character is not visible on some posts, making 
it difficult to keep track of who said what.


This is apparently not caused by mutt's not displaying the thread 
correctly, since I see the same thing in the mailing list archive.


Here's a short example:

http://lists.gnu.org/archive/html/help-texinfo/2009-09/msg0.html
http://lists.gnu.org/archive/html/help-texinfo/2009-09/msg1.html
http://lists.gnu.org/archive/html/help-texinfo/2009-09/msg2.html

The second of the above has the message from the OP indented four 
columns to the right, but there is no trace of the usual ' '.


The ensuing messages from the OP all have the ' ' clearly marking the 
second poster's reply.


It appears that all messages posted by the second poster, are displayed 
likewise, leading me to suspect that it might be something in his setup, 
or the mailer he is using that cause this unusual behavior.


The messages in the above thread are otherwise nicely trimmed and 
articulate, but I've seen other cases in the past with 3-4 levels of 
quoting or more, where it quickly became quite difficult to make sense 
of what was being discussed.


In fact, this looks as if our second poster has set his indent_string 
or equivalent to space.


Since these messages are displayed the same way in a web browser I don't 
suppose that there is any way one could work around this in mutt?


Thanks,

Gen-Paul.






Re: Subfolders

2009-10-29 Thread Patrick Gen-Paul
 to clear followed by Tab and navigate via the ls-like 
display to ~/tmp/mailarchives/Y2009/m3 and hit Enter.


You will be prompted again:

Append messages to /tmp/mailarchives/Y2009/m3: [yes]/no:

Hit Enter to choose the default [yes] or 'n' for no.

This all sounds rather complicated, but in fact it takes considerably 
longer to describe in words than actually perform.


Actually, in my experience, once you get have these keyboard actions 
wired into your muscle memory, scouring the entire file system takes 
seconds and makes you feel sorry for the mouse clickers :-)


All the above is a description of how I am currently set up and how I 
manage to function effectively with both a flat list of mail boxes and 
tree structures that emulate the nested folders of other mailers.


Note that I only use the mbox format and although I don't know how this 
would translate to a maildir setup, or to remote mail via IMAP, I 
wouldn't be surprised if something similarly effective and ergonomic 
could be achieved in these contexts.


Not sure if that's what you were missing but I certainly didn't find it 
obvious when I switched to mutt a few years ago.


Gen-Paul.































































the attachments command

2009-10-17 Thread Patrick Gen-Paul
I ran into the :attachments command by accident while tabbing at the : 
mutt command line prompt.


I checked the muttrc man page as well as the mutt manual and I was 
unable to find it documented anywhere.


Unless I missed it, it's not even listed under 6.2 Configuration 
commands in the Mutt E-Mail Client manual that ships with the version 
that's installed on my system.


$ mutt -v

Mutt 1.5.18 (2008-05-17)

I did some online searching with the mutt attachments command 
keywords, and nothing relevant showed up.


Only thing that found is that if I issue the :attachments command when 
in mutt, with no parms/options, I get an error message that says 
attachments: not disposition - so it definitely causes some code to be 
invoked.


Could you please direct me to where it is documented?

Thanks,

Gen-Paul.


[Fwd: Re: the attachments command]

2009-10-17 Thread Patrick Gen-Paul

My apologies for replying to you personally.

T-Bird does not have a reply-to-list function and I forgot to  change 
the To: header accordingly.


Gen-Paul.
---BeginMessage---

Patrick Shanahan wrote:

* Patrick Gen-Paul pgenp...@gmail.com [10-17-09 16:49]:

I ran into the :attachments command by accident while tabbing at the
: mutt command line prompt.

I checked the muttrc man page as well as the mutt manual and I was
unable to find it documented anywhere.

Unless I missed it, it's not even listed under 6.2 Configuration
commands in the Mutt E-Mail Client manual that ships with the
version that's installed on my system.

$ mutt -v

Mutt 1.5.18 (2008-05-17)

I did some online searching with the mutt attachments command
keywords, and nothing relevant showed up.

Only thing that found is that if I issue the :attachments command
when in mutt, with no parms/options, I get an error message that says
attachments: not disposition - so it definitely causes some code to
be invoked.

Could you please direct me to where it is documented?


Look in TFM:  6. Attachment Searching and Counting
(for ver 1.5.20)


Ah.. thanks, 1.5.20.

As stated, I'm running 1.5.18 and find it more condign to refer to the 
corresponding doc. :-)


Gen-Paul.



---End Message---


Re: Print Japanese UTF-8 mails

2009-10-16 Thread Patrick Gen-Paul

Horacio Sanson wrote:

I want to print emails from within mutt but when the emails contain Japanese
text in UTF-8 encoding I get very bad results and wasted paper.

For printing Japanese text I use the command:

  cat JapaneseDoc.txt | paps | lpr

Here the paps converts the japanese text to postscript that lpr can correctly
send to the default printer.

The question is how to set this command in the print_command of mutt? It seems
this command does not support pipes.


Maybe you didn't code it correctly?

In mutt,

1. select a message that contains Japanese text

2. type:

:set print_command='paps | lpr'

3. hit 'p' for print

Message printed.

4. add the above to your ~/.muttrc

Tested this successfully with the following:

ユズの香りの炊き込みご飯


Gen-Paul.




Using vim's 'clientserver' feature to compose messages

2009-10-14 Thread Patrick Gen-Paul

Is anybody using this feature?

One thing that I find mildly frustrating with mutt, is that once you
fire up the editor, you no longer have access to mutt's message browsing
capabilities.

For instance, when I'm in the middle of replying to a message and I need
to refer to other messages, I have to save the message I am currently
composing, exit the send menu where I am automatically directed, and
postpone the message before I can do anything else.

Then, after I have found what I was looking for, I need to recall the
message so that I can resume composition.

So as to avoid the above, I usually have a second instance of mutt
running in another window that I can switch to when I'm in editor mode 
in the first mutt instance in the event, I should I need to browse the 
contents of my mail boxes.


Over the weekend, I ran into vim's clientserver feature and thought
I'd give that a try and see if I could improve on my current setup.

Barring a few glitches, I pretty much got it to work, in my context,
although I haven't quite been able to make the whole thing as user
friendly and automated as I had hoped, mainly due to my imperfect
knowledge of mutt and vim's capabilites.

What I do is that I fire up an xterm, and start GNU/screen with a mutt 
session and a vim server session in separate halves of a split window.


Vim is started via a 'vim --servername MAIL' command. In mutt, the 
editor variable is set to 'vim --servername MAIL --remote'.


With this setup, hitting 'r', 'L', 'g' for replies or 'm' for new
messages in the mutt half of the display, causes the vim window in the 
other half to display the corresponding message, ready to be edited.


Once I am done editing, I hit a key that I have mapped to a vim macro 
that does some housekeeping and starts a second instance of mutt from 
the vim session, which I have set up to take me directly to mutt's send 
menu where I have access to all the usual functionalities - spell 
checking, attaching files, etc.


Once the message is finalized, I hit 'y' to send and proceed to exit
the transient mutt instance to return to my vim session.

As seen by the user, this setup pretty much feels as if mutt were 
running vim in a sub-window, alongside with the index and the pager, 
with the ability to switch between them.


It also benefits from vim's tabbing capabilities, where you can for
instance start composing several messages concurrently in separate tabs, 
say, if you were in the middle of writing something fairly involved like 
the current message :-) and suddenly remember something more urgent.


As hinted earlier there are some glitches and limitations.

Since the vim clientserver capability has been around for quite some
time, I wouldn't be surprised if someone else had already come up with a 
similar idea and hopefully an implementation that might be both more 
robust and user-friendly.


Thanks,

Gen-Paul.


Re: keyboard paste address in compose, To: line

2009-09-07 Thread Patrick Gen-Paul

Thomas Baker wrote:

[..]


I'll try to find the where the mappings of X colors to features
of mutt are defined...


That would be in your ~/.muttrc.

There used to be a slew of such mappings at wiki.mutt.org but right now 
practically all the links appear to be broken.


Useful samples and screenshots:

  http://www.xs4all.nl/~matto/mutt-themes.html

HTH

Gen-Paul.


Re: keyboard paste address in compose, To: line

2009-09-04 Thread Patrick Gen-Paul

bill lam wrote:

On Thu, 03 Sep 2009, Patrick Gen-Paul wrote:

I'm pretty sure that a bit like mutt, gnu/screen supports piping its
commands to an external application, but I'm don't see at a glance
how this could be implemented.


You can use screen bindkey.  Adding the following into ~/.screenrc,
the xsel serves the same purpose as the xclip and you may also change
the option to use clipboard instead of x selection.

-- 8 --


-- 8 -- ?

I think I'm getting confused, mixing up mail quoting 's and the above.

:-)


# set the second mark, write to the screen-exchange
# file, and use xsel to synchronize the paste buffer
# with the X selection.
bindkey -m  eval stuff ' ' writebuf exec sh -c 'xsel  
/tmp/screen-exchange'
bindkey  eval stuff ' ' exec sh -c 'xsel -o  /tmp/screen-exchange' readbuf


I'd need more help to fully understand the above two lines, but I'm 
reluctant to abuse the mutt-users list with a continued discussion of 
something that no longer has anything to do with mutt - especially since 
I'm more interested in better understanding screen than terminal to X 
data exchange.


Unfortunately, I don't think you are on the screen-users list, or at 
least you haven't posted to it for a long time.


Anyway, thanks for sending me on my way to becoming a GNU/screen power 
user. ;-)


Gen-Paul.





Re: keyboard paste address in compose, To: line

2009-09-03 Thread Patrick Gen-Paul

brownh wrote:
Often, when composing a message, I want to past an address in the To: 
line without using my mouse. However, the usual C-y or C-v keyboard 
commands don't work. Any suggestions?


What terminal are you running mutt in?

How do you select the address you want to paste?

Where are you copying from - same mutt session, an address book running 
in another terminal?


Are you running a Desktop environment?

I run mutt under gnu/screen, a terminal multiplexer that provides a 
powerful copy/paste mechanism between windows.


You may want to read this:

http://www.kuro5hin.org/story/2004/3/9/16838/14935

If I may, a minor secondary question. When I type in an address on the 
To: line, the insertion point is not visible. This is annoying when I 
need to go back to correct a typo. I don't know where I am so that I 
can do a DEL or type at the right place. Can I change this behavior?


Does not happen here in an xterm.

If the To: line is at the bottom of the screen, I have seen something 
similar on the linux (framebuffer) console. In the case of a bash shell, 
a Ctrl-L would re-display the screen with the command input line at the 
top of the screen and make the cursor visible again. Not that this would 
help with mutt, of course.


Otherwise if your default cursor is of the underline type, you could 
check whether your terminal has an option to set it to something more 
visible such as a block cursor?


Gen-Paul.




Re: keyboard paste address in compose, To: line

2009-09-03 Thread Patrick Gen-Paul

Gary Johnson wrote:

[..]


That's true, and I use it frequently, but it will only copy and
paste among windows running in that terminal.  You can't, for
example, use it to copy from Firefox and paste into mutt.


But in this instance, you still have to use the mouse to select what you 
paste to the X clipboard?


Which is the part that I really find inconvenient.

Once you've managed to select what you really wanted, copying it to a 
terminal is only a middle-click away.


Since I use ELinks for 99% of my browsing, this is rarely an issue for 
me but I'll keep your tip in mind.


Is their anyway I could copy something mutt+vim to the clipboard and 
retrieve it in Seamonkey via a Ctrl-V for instance?


Thanks,

Gen-Paul.


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Patrick Gen-Paul

Gary Johnson wrote:

On 2009-09-03, Patrick Gen-Paul pgenp...@gmail.com wrote:

Gary Johnson wrote:

[..]


Is their anyway I could copy something mutt+vim to the clipboard and 
retrieve it in Seamonkey via a Ctrl-V for instance?


Ahem.. there..? maybe - I'll have to remember proofreading one's mail 
is not an option.



For vim, it depends on your terminal and on the way vim was built
and configured, but you can usually access the clipboard from vim
via the + and/or * registers.  For example,

+yiw

will yank the word under the cursor to the clipboard.  See

:help x11-selection

for more on this.

There is no way that I know of to do this from mutt.  However, there
is a command-line interface to screen, so you might be able to
transfer the contents of screen's copy buffer to the X clipboard
(actually the selection or cut buffer) by using a mutt macro calling
screen and xclip.  I've never looked into doing that, though.


Seems that doing it in screen rather than vim would be the better choice 
since it would work with every application that I use on a daily basis.


I could even use it in ELinks when I'm faced with one of those annoying 
messages that tell me that I need to install a better browser because 
mine does not support JS and then have to go through the motions of 
starting Seamonkey, copy/paste the URL.. etc.


Does not happen very often, but a nuisance when it does.

I'm pretty sure that a bit like mutt, gnu/screen supports piping its 
commands to an external application, but I'm don't see at a glance how 
this could be implemented.


I'll play with it a bit and ask the screen-users list if I'm stuck.

Thanks much for your comments..!

Gen-Paul.


Re: Malformed From: address in headers

2009-08-21 Thread Patrick Gen-Paul

Cameron Simpson wrote:

On 15Aug2009 14:06, Gen-Paul pgenp...@gmail.com wrote:



[...nice rant...]


Thanks for snipping. I've read some of his older posts and he sounds 
like a decent enough sort of chap otherwise.


Actually, a few months back, his malformed From: email address was 
quoted and did not cause me any grief.


For all I know, he probably does not even know this is happening.

As mentioned earlier, he uses gnus/emacs and he may have set some option 
or other that actually causes the From: address to be generated 
automatically without his even seeing it - I can't imagine anyone 
creating such a bizarre From: address voluntarily.


I don't use emacs, so I won't speculate further.


| Phew..!! I managed to get through this message, w/o mutt or vim..
| only took me twice the time and effort.. just hope my
| T-Bird-whatever settings won't cause this rant to materialize as a
| ten megabyte html thing with very long lines - in your and other
| folks' Inbox-es.

Looks like nice text/plain to me.

What's reduced you to using TBird/Seamonkey?


:-)

I had a feeling I was being unfair to other posters on a number of 
mailing lists who use the gmail mailer and regulary come up with 
rather messy stuff.. and so I decided to take a look and see for myself 
how the other half live.. well now I can see what they have to contend 
with and will try to ignore them..


Feeling sociable, I thought I'd also take a look at a regular GUI mailer 
and since I had TBird already installed as part of the Seamonkey suite.. 
Oh, that wasn't _too_ bad, a lot less convenient than mutt when you need 
to handle large volumes, but if you take your time..


So, when I noticed the malformed address causing an issue in mutt, I 
started wondering what subscribers who do not use mutt were seeing and 
since I had these environments available, I decided to subscribe this 
gmail account to the python mailing list and wait for his next post.


Well, he posted again a couple of days ago, and interestingly, both 
gmail and TBird correctly display his name in their equivalent of the 
message index, possibly because neither of them even bothers to look at 
the ... stuff that follows the sender's name in the header (?)


In any case, since his contributions to the list are generally useful, 
instead of breaking threads by dumping his posts, I will fish out your 
procmail recipes and implement them.


Thanks,

Gen-Paul.


Malformed From: address in headers

2009-08-11 Thread Patrick Gen Paul
On the python-users mailing lists, there are posts from a user who
forges his From: email address to something like:

Joe User http://phr...@nospam.invalid

The result in mutt with index_format set to:

 %-30.30n ...

is that the following is displayed in the index:

python-list-bounces+pgenpaul=gmail@python.org instead of Joe User

I edited the mbox and changed the malformed email address in the From:
field, to:

Joe User phr...@nospam.invalid

and on the particular message this fixed the problem.

Does anyone know why this is happening, and how I can work around it?

Thanks,

Gen-Paul.


Re: Malformed From: address in headers

2009-08-11 Thread Patrick Gen Paul
On Tue, Aug 11, 2009 at 8:19 PM, Kyle Wheelerkyle-m...@memoryhole.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 On Tuesday, August 11 at 07:41 PM, quoth Patrick Gen Paul:
Does anyone know why this is happening, and how I can work around it?

 I think you pretty much hit the nail on the head: his From: header
 is invalid. Mutt can see that it's invalid, and so refuses to trust
 it. As I see it, mutt is behaving defensively. But more specifically,
 several of those characters are invalid in email addresses, which
 demonstrates that the header does not contain trustworthy data.

 Since mutt cannot trust the From header, and thus cannot properly
 decode that header, it cannot *use* that header. So mutt treats the
 message almost as if it didn't have that header.

 For a metaphor: if you were in a restaurant and found something that
 shouldn't be there (e.g. a screw) in the sauce on the dish you
 ordered, what would you do? Would you just take the screw out, assume
 that the sauce is fine, and continue eating? Or would you choose not
 to eat the sauce? Mutt, like you, chooses not to eat the sauce.

 Make sense?

In a roundabout way, as you probably intended.

I'm mostly trying to build some form of argumentation that may
convince this annoying poster to mend his ways.

Is there a well-respected mail etiquette, or RFC even, that I could
refer him to?

I have contacted the poster via the list and asked him to contact me
off-list to discuss further but he has not responded yet.

I'm giving him another 24 hours before I killfile him for good.

Thank you for your comments, much appreciated.

Gen-Paul


Re: Malformed From: address in headers

2009-08-11 Thread Patrick Gen Paul
On Tue, Aug 11, 2009 at 10:12 PM, Kyle Wheelerkyle-m...@memoryhole.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 On Tuesday, August 11 at 09:34 PM, quoth Patrick Gen Paul:
 Is there a well-respected mail etiquette, or RFC even, that I could
 refer him to?

 Ah! Why did you say so? I thought you were trying to decide whether or
 not mutt was misbehaving (I wonder what Thunderbird does with this
 fellow's email).

Sorry, I should have mentioned that I was convinced from the word go that
there's nothing wrong with mutt's behavior, since no other email on this list or
any of the thirty I am subscribed to is thus affected.

In any case I would  never think of filing a bug report for something
this frivolous.

Was thinking the fellow might start arguing and quite easily may know a
bit more about electronic mail than I do. Call it getting ready for the
onslaught :-)

Funny your mentioning T-Bird, btw, since my correspondent (?) actually
appears to use gnus.

 You may find RFC 822 useful. The relevant header definition is this
 one:

 authentic =   From   :   mailbox  ; Single author
   / ( Sender :   mailbox  ; Actual submittor
   From   : 1#mailbox) ; Multiple Authors

 He's using the first option, which means his email address MUST
 conform to the mailbox description, which is as follows:

 mailbox = addr-spec ; simple address
 / phrase route-addr ; name  addr-spec

 He's chosen the latter form. His name eats up the phrase portion, so
 his email address must conform to a route-addr, defined thusly:

 route-addr =  [route] addr-spec 

 Since he's not including a route, the thing within the wockas ()
 MUST conform to the addr-spec definition, which is:

wockas..?

 addr-spec = local-part @ domain

 The objectionable part of his address is the local-part, which is
 required to be formed like so:

 local-part = word *(. word)

 His local-part is composed of two words, separated by a period. The
 FIRST word, though, is broken. A word is:

 word = atom / quoted-string

 The quoted-string definition doesn't apply here (since he isn't using
 quotes), and an atom is defined as:

 atom = 1*any CHAR except specials, SPACE and CTLs

 specials, as you'll note in section 3.3 of RFC 822 are:

 specials = ( / ) /  /  / @  ; Must be in quoted-
  / , / ; / : / \ /   ;  string, to use
  / . / [ / ]  ;  within a word.

 In other words, he's using a colon in an atom, which is explicitly
 forbidden by the definition of email.

 Is that sufficiently explicit for you? :)

:-)

 (And, in case you get into an argument with him, addr-spec has not
 changed, even with more recent less-standardized RFCs)

.. I'm planning on politely asking him to desist - the simple fact that
he starts to argue would be quite sufficient to categorize him as killfile
fodder.

 I'm surprised that his email isn't instantly classified as spam.
 Usually it's just spammers that violate basic well-recognized rules
 like that, and it's fairly common to blacklist emails that are
 fundamentally malformed or disobey basic rules like that---especially
 in an age when it's equally common to see software come out with
 updates warning security fix! malformed input caused cancer in users;
 who would have thought a stray colon would cause that kind of trouble!
 Oh the humanity, how were we poor developers to know that not everyone
 was trustworthy?!? (or something similar).

That, actually is a much better option than killfiling him locally..!!
If he is not
amenable, I'll contact the list's whip and ask him to ban the guy until he
make amends.

With your permission, I will point my report as spam to your exposé

 I'm giving him another 24 hours before I killfile him for good.

 Good luck with that.

Adding a procmail rule that directs his ensuing contributions to my SPAM
folder shouldn't be too hard.

Thank you,

Gen-Paul.


Using templates - [plain text]

2009-08-02 Thread Patrick Gen Paul
I have created a template:

From: Gen Paul pgenp...@gmail.com
To: pgenp...@gmail.com
Cc:
Bcc:
Subject: [To be defined]

When I do:

$ mutt -H template.txt

I see this at the bottom of the screen:

To: pgenp...@gmail.com

So I have to hit enter to continue,

Then I see this:

Cc:

So I hit enter again,

And only then mutt launch the editor and then I am able edit
my template - add the messsage body etc.

I don't understand why mutt prompts me for the To: since
mutt already knows the answer, or why it prompts me for the
Cc: since my template leaves it blank, while it is not prompting
for the Bcc: - or even for the Subject:.

This behavior is not what I expect after researching the
subject - does it mean that there is something wrong with my
template, or is it that I have missed a flag or configuration
option that would prevent all the needless prompting?

Much obliged,

Gen-Paul.


Re: Using templates

2009-08-02 Thread Patrick Gen Paul
On 8/2/09, Rocco Rutte pd...@gmx.net wrote:

 See these variables:

 $ mutt -Q askcc askbcc abort_nosubject
 askbcc is unset
 askcc is unset
 abort_nosubject=ask-yes

 and the following ticket:

 http://dev.mutt.org/trac/ticket/1113

 Rocco

I missed askcc - so there is no askto variable and this problem cannot
be solved.

Thank you,

Gen-Paul