Re: mutt scripting

1999-12-11 Thread Subba Rao

On  0, Edmund GRIMLEY EVANS [EMAIL PROTECTED] wrote:
  You mean like with:
  
  mutt -s "Subject here" 'A. Recipient [EMAIL PROTECTED]'  msg_file
 
 If you try this, I think you'll find the To field gets rewritten as:
 
   To: "A . Recipient" [EMAIL PROTECTED]
 
 I discovered this slightly annoying behaviour last night while
 investigating why a piece of junk mail I received appeared to be from
 "Amazon . co . uk" when I saw it at work, but from "Amazon.co.uk" when
 I saw it at home. (Sendmail at work rewrites the From field.)
 

When I attempted to send with the following syntax,

mutt -s "Subject here" 'A. Recipient [EMAIL PROTECTED]'  msg_file

it was substituted as follows,

'A. Recipient [EMAIL PROTECTED], '@attglobal.net

I got 2 copies for such mail. One that was rejected and one that was actually
delivered.

When I tested this syntax, it seems to work.

mutt -s "Subject here" "A. Recipient [EMAIL PROTECTED]"  msg_file

If this did not work for you please let me know, so I can correct the syntax.

Subba Rao
[EMAIL PROTECTED]
http://pws.prserv.net/truemax/

 = Time is relative. Here is a new way to look at time. =
http://www.smcinnovations.com



Re: Happy with mutt, but...

1999-12-11 Thread Zsombor Gergely

On Fri, Dec 10, 1999 at 09:26:08AM +, Edmund GRIMLEY EVANS wrote:
These are like , now with flying accents a' e' o" u'
   
   If there were some 8-bit characters there, I didn't see them, but that
   might be because of a problem with MTAs.
  
  Certainly not. I see everything correctly with Netscape :-(
  
   
   Here are those chars: 
  
  Great. Now, as I REPLY in vim, I see them well. No problem with either MTA or
  MDA. But I Mutt, man...
 
 I got them this time. (It might be because this time your message was
 in quoted-printable, if there is an MTA problem.)
 
 You probably need either to select a proper locale by setting the
 environment variables LC_CTYPE, LANG, LC_ALL, or configure mutt with
 --enable-locales-fix if locales just don't work on your machine.
  


  Bingo! This Was Great! Now it works now without any other modification.

\begin{offtopic}
  (Anyway, I am sad not being able to do things in the "proper" way, ie. with
  locales. LANG is set to "C" in my machine, since "hu" does not work - Perl
  compains during Slink Installation. It also did weird things in Gnome. Some
  menuitems appeared in Hungarian, others totally disappeared. I go not try to
  set it now.)
\end{offtocpic}

 
 If vim was running on the same terminal (xterm or whatever) as mutt
 then presumably your terminal is working correctly.
 
 Edmund

Anyway, thanks you all.

Cheers, Zsombor


-- 
Zsombor Gergely
Junior Research Fellow  
Hungarian Academy of Sciences, Institute of Economics   Phone: (36-1) 309-2659
P.O. Box 262, H-1112 Budapest, Hungary  Fax:   (36-1) 319-3136
   



Re: Still monthly mailboxes

1999-12-11 Thread Kris

At 14:22 10/12/1999 +, Andreas Wessel wrote:
   MAILDIR="$HOME/Mail"   # or wherever your monthly folder resists
  
   And in muttrc:
  
   set folder="$HOME/Mail"# or wherever your folder resists
 
  I already have all these settings - just forgot to mention them...
  Works for all my "static" mailboxes - but NOT for the monthly ones...
  WHY NOT?

You said that you used `test ! -d` to see whether the mailbox
existed. Would this access the mailbox and therefore change the
various time/date attributes?

When I experimented a while ago, I'm sure that I didn't have to
use `test` - the mailbox is created automatically by procmail
(it doesn't create directories by itself, though). I filter my
mail by using...

# Mutt
:0:
* ^Sender: [EMAIL PROTECTED]
/home/smaug/mail/lists/mutt-users/${MONTHSTRING}

... with ${MONTHSTRING} being simply "MONTHSTRING=`date +%Y-%m`"
- there are no tests to see whether the file exists before the
mail is put there.

HTH, etc, blah.

Ciao,
   Kris (I would've replied earlier but I assumed someone else
would reply before me. And don't blame me if the formatting in
this male is icky... not my fault, honest!) 



Re: mutt, folders procmail

1999-12-11 Thread Stan Ryckman

At 05:21 PM 12/11/99 +1100, Craig McVean wrote:
Hi to all muttets?
I have mutt working quit well Except my .procmailrc is not placing all my
mailing lists into theire own mailboxes mutt-users is working nicely.

[snip]

I'm using Maildir should i be using mbox as my mailbox type? My machine is 
standalone. and i'm not very puter smart.

I believe only the very newest procmail versions (recently released)
handle maildir.  You may need to upgrade.

i have the lists in my muttrc and thats working well.
my mbox is getting messy please HELP
 
I'm subscribed to debian-user, gimp-user, and fetchmail-freinds in a vain hope
of trying to work it all out :)

You might try the procmail list for procmail help! :-)
Subscribe at [EMAIL PROTECTED]
as noted in the man page on procmail.  That's probably a better
list than any of the others to get help with procmail.

Hope that helps,
Stan



Several mutt questions

1999-12-11 Thread Richard Hakim


Hi,


I'm sort of new to mutt, and there are some things I'd like to be able to 
do with it that I'm not sure how to accomplish.  Can anyone offer advice?
Sorry if this list seems long - I've been collecting.  :)

- In the index of a folder, I'd like the arrow key to scroll over deleted
messages as well.  Right now if I delete a message and then want the 
scrollbar to go back to that message, I have to type the msg #.

- When I get to the end of the message, right now if I scroll down any more
(either via space bar or arrow key or whatever) it automatically jumps me
to the next one.  I want it to stop doing that - I often don't know that's 
the end, so I dont' get to read the bottom (or hit the delete key).  Ideally
I'd like the space bar to not move to the next message, but the down arrow
key to still do so.

- This isn't strictly a mutt question, but...I use emacs as my editor.
Do you know if there is a way to make it position the cursor at the
first empty line automatically?  Also is there an e-mail writing mode?
Not sure what that would be, but I thought I'd ask


Thanks everyone.

Richard



Re: Setting envelope-sender according to alternates

1999-12-11 Thread Thomas Roessler

On 1999-12-10 10:28:07 +0100, Thomas Roessler wrote:

 It would be fairly easy to bloat up mutt_invoke_sendmail (in
 sendlib.c) a bit - depending on a suitable option (say,
 set_envelope_from), mutt could just pass "-faddress" to sendmail.

 Note that at least sendmail and the sendmail emulation of postfix
 can handle this.

diff -u .bak/init.h ./init.h
--- .bak/init.h Fri Dec 10 11:14:22 1999
+++ ./init.hFri Dec 10 11:31:01 1999
@@ -410,6 +410,16 @@
   ** Useful to avoid the tampering certain mail delivery and transport
   ** agents tend to do with messages.
   */
+  { "envelope_from",   DT_BOOL, R_NONE, OPTENVFROM, 0 },
+  /*
+  ** .pp
+  ** When \fIset\fP, mutt will try to derive the message's \fIenvelope\fP
+  ** sender from the "From:" header.  Note that this information is passed 
+  ** to sendmail command using the "-f" command line switch, so don't set this
+  ** option if you are using that switch in $$sendmail yourself,
+  ** or if the sendmail on your machine doesn't support that command
+  ** line switch.
+  */
   { "escape",  DT_STR,  R_NONE, UL EscChar, UL "~" },
   /*
   ** .pp
diff -u .bak/mutt.h ./mutt.h
--- .bak/mutt.h Fri Dec 10 11:14:24 1999
+++ ./mutt.hFri Dec 10 11:23:51 1999
@@ -284,6 +284,7 @@
   OPTDELETEUNTAG,
   OPTEDITHDRS,
   OPTENCODEFROM,
+  OPTENVFROM,
   OPTFASTREPLY,
   OPTFCCATTACH,
   OPTFCCCLEAR,
diff -u .bak/protos.h ./protos.h
--- .bak/protos.h   Fri Dec 10 11:14:25 1999
+++ ./protos.h  Fri Dec 10 11:16:04 1999
@@ -241,7 +241,7 @@
 int mutt_get_postponed (CONTEXT *, HEADER *, HEADER **, char *, size_t);
 int mutt_get_tmp_attachment (BODY *);
 int mutt_index_menu (void);
-int mutt_invoke_sendmail (ADDRESS *, ADDRESS *, ADDRESS *, const char *, int);
+int mutt_invoke_sendmail (ADDRESS *, ADDRESS *, ADDRESS *, ADDRESS *, const char *, 
+int);
 int mutt_is_autoview (BODY *, const char *);
 int mutt_is_mail_list (ADDRESS *);
 int mutt_is_message_type(int, const char *);
diff -u .bak/send.c ./send.c
--- .bak/send.c Fri Dec 10 11:14:27 1999
+++ ./send.cFri Dec 10 11:15:17 1999
@@ -898,8 +898,8 @@
 return mix_send_message (msg-chain, tempfile);
 #endif
 
-  i = mutt_invoke_sendmail (msg-env-to, msg-env-cc, msg-env-bcc,
-  tempfile, (msg-content-encoding == ENC8BIT));
+  i = mutt_invoke_sendmail (msg-env-from, msg-env-to, msg-env-cc, 
+   msg-env-bcc, tempfile, (msg-content-encoding == 
+ENC8BIT));
   return (i);
 }
 
diff -u .bak/sendlib.c ./sendlib.c
--- .bak/sendlib.c  Fri Dec 10 11:14:28 1999
+++ ./sendlib.c Fri Dec 10 11:20:28 1999
@@ -1629,7 +1629,8 @@
 
 
 int
-mutt_invoke_sendmail (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */
+mutt_invoke_sendmail (ADDRESS *from,   /* the sender */
+ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */
 const char *msg, /* file containing message */
 int eightbit) /* message contains 8bit chars */
 {
@@ -1660,8 +1661,15 @@
 ps = NULL;
 i++;
   }
+
   if (eightbit  option (OPTUSE8BITMIME))
 args = add_option (args, argslen, argsmax, "-B8BITMIME");
+
+  if (option (OPTENVFROM)  from  !from-next)
+  {
+args = add_option (args, argslen, argsmax, "-f");
+args = add_args   (args, argslen, argsmax, from);
+  }
   if (DsnNotify)
   {
 args = add_option (args, argslen, argsmax, "-N");
@@ -1850,7 +1858,8 @@
 mutt_copy_bytes (fp, f, h-content-length);
 fclose (f);
 
-mutt_invoke_sendmail (to, NULL, NULL, tempfile, h-content-encoding == ENC8BIT);
+mutt_invoke_sendmail (NULL, to, NULL, NULL, tempfile, 
+ h-content-encoding == ENC8BIT);
   }
 
   if (msg)





Re: Several mutt questions

1999-12-11 Thread Eugene Lee

On Sat, Dec 11, 1999 at 03:46:03PM -0500, Richard Hakim wrote:
:
:- In the index of a folder, I'd like the arrow key to scroll over deleted
:messages as well.  Right now if I delete a message and then want the 
:scrollbar to go back to that message, I have to type the msg #.

You need to re-bind your arrow keys.  Something like this should work:

bind pager up next-entry
bind pager down previous-entry

:- When I get to the end of the message, right now if I scroll down any more
:(either via space bar or arrow key or whatever) it automatically jumps me
:to the next one.  I want it to stop doing that - I often don't know that's 
:the end, so I dont' get to read the bottom (or hit the delete key).  Ideally
:I'd like the space bar to not move to the next message, but the down arrow
:key to still do so.

set pager_stop


-- 
Eugene Lee
[EMAIL PROTECTED]



Re: Several mutt questions

1999-12-11 Thread Nathan Cullen

On Sat, Dec 11, 1999 at 03:46:03PM -0500, Richard Hakim wrote:
 - In the index of a folder, I'd like the arrow key to scroll over deleted
 messages as well.  Right now if I delete a message and then want the 
 scrollbar to go back to that message, I have to type the msg #.

Yeah, this drove me crazy as well.  Basically, you just need to bind
next-entry and previous-entry in the index.  If you use a
split-screen view (you set pager_index_lines), you'll also need to bind
the next-entry and previous-entry in the pager as well.  Here's the
entry in my .muttrc:

bind index j   next-entry
bind index k   previous-entry
bind pager j   next-entry
bind pager k   previous-entry

Just change j and k to whatever your tastes are. 

 - When I get to the end of the message, right now if I scroll down any more
 (either via space bar or arrow key or whatever) it automatically jumps me
 to the next one.  I want it to stop doing that - I often don't know that's 
 the end, so I dont' get to read the bottom (or hit the delete key).  Ideally
 

Add "set pager_stop" to your .muttrc. 

-- 
==
 Nathan Cullen [EMAIL PROTECTED]
==



Re: mutt scripting

1999-12-11 Thread Byrial Jensen

On Sat, Dec 11, 1999 at 11:00:00 -0500, Subba Rao wrote:
 On  0, Edmund GRIMLEY EVANS [EMAIL PROTECTED] wrote:
   You mean like with:
   
   mutt -s "Subject here" 'A. Recipient [EMAIL PROTECTED]'  msg_file
  
  If you try this, I think you'll find the To field gets rewritten as:
  
To: "A . Recipient" [EMAIL PROTECTED]

The above recipient specification violates RFC 822. The real name
part needs to be quoted when it contains special characters such
as a dot. And Mutt doesn't like wrong specifications too much.
Try instead:

mutt -s "Subject here" '"A. Recipient" [EMAIL PROTECTED]'  msg_file

 When I attempted to send with the following syntax,
 
 mutt -s "Subject here" 'A. Recipient [EMAIL PROTECTED]'  msg_file
 
 it was substituted as follows,
 
 'A. Recipient [EMAIL PROTECTED], '@attglobal.net

Hmm. Did you configure Mutt with --enable-exact-address?

-- 
Byrial



Re: mutt scripting

1999-12-11 Thread Subba Rao

On  0, Byrial Jensen [EMAIL PROTECTED] wrote:
 
 The above recipient specification violates RFC 822. The real name
 part needs to be quoted when it contains special characters such
 as a dot. And Mutt doesn't like wrong specifications too much.
 Try instead:
 
 mutt -s "Subject here" '"A. Recipient" [EMAIL PROTECTED]'  msg_file
 
  When I attempted to send with the following syntax,
  
  mutt -s "Subject here" 'A. Recipient [EMAIL PROTECTED]'  msg_file
  
  it was substituted as follows,
  
  'A. Recipient [EMAIL PROTECTED], '@attglobal.net
 
 Hmm. Did you configure Mutt with --enable-exact-address?
 

No, I have not used that option for compiling Mutt.
I will recompile with that option and try it. Thanks for the suggesstion.

Subba Rao
[EMAIL PROTECTED]
http://pws.prserv.net/truemax/

 = Time is relative. Here is a new way to look at time. =
http://www.smcinnovations.com