Re: How can I get mail from /var/mail/jatmin to my spoolfile

2009-02-07 Thread Josef Atmin
After having discovered macros I came up with the following solution for 
moving mail from /var/mail/jatmin to ~/INBOX.

   macro index,pager G "\
unset wait_key\
\
if [[ -s /var/mail/$USER ]]; then\
  cat /var/mail/$USER >> ~/INBOX;\
  echo -n > /var/mail/$USER;\
fi\
set wait_key\
" "fetch local and pop3 mail"

This seems to do what I want.  It is a hack, and I am not quite sure 
whether it is safe (therefore my version within the if-statement looks 
like

  cp /var/mail/$USER ~/=var=mail=$USER-backup;\
  cp ~/INBOX ~/INBOX-backup;\
  cat /var/mail/$USER >> ~/INBOX;\
  echo -n > /var/mail/$USER;\
  echo There has been local e-Mail!;\
  sleep 2;\

for the time being to have some backup).  However, it's ok for me.

Cheers, Josef.



On Fri, Feb 06, 2009 at 10:30:29AM +0100, Josef Atmin wrote:
> 
> Hello mutt users,
> 
> I am new to mutt and cannot figure out how to move mail from my local 
> spoolfile /var/mail/jatmin (or /var/spool/mail/jatmin) to my mutt 
> $spoolfile ~/INBOX when I press 'G' (or automatically).  
> 
> I need this for the following reason.  Since I work in different 
> cities, I use different computers in different domains.  I synchronize 
> my home directories with unison (a great tool btw).  I receive external 
> email via a pop server and local mail via /var/mail/jatmin.  For 
> security reasons I want the local mail to stay local and not forward it 
> to my pop server.  I also cannot forward it to my ~/INBOX file, because 
> of the synchronization issue (I would get modified files on different 
> machine and would have to merge the different versions of INBOX each 
> time I synchronize my home directories).  I also want to avoid to set 
> the mutt $spoolfile to /var/mail/jatmin because I need all my current 
> mail in my home directory, again because of the synchronization issue, 
> and I don't want to visit /var/mail/jatmin each time I want to check 
> whether I have new local mail.
> 
> So I would like to configure mutt such that the 'G' command not only 
> fetches mail from the pop server but also from /var/mail/jatmin.  Is 
> there any way I can do this?
> 
> I have found nothing in the documentation.  The question came up 
> on the mailing list previously, but the solution suggested was to 
> set $spoolfile to /var/mail/jatmin and maybe $mbox to ~/INBOX.  But this 
> is not what I want, because it is quite cumbersome.  I also know 
> about the 's' commant to save a mail in a different mbox, but that is 
> cumbersome as well.  I want an elegant solution.
> 
> Best regards,
> 
> Josef.


Where did this line come from?

2009-02-07 Thread Rem P Roberti
I must be getting senile. Either I have never noticed this before, or I
inadvertently messed something up in my .muttrc.  Observe:

-N F- 1/1: Rem P Roberti  test -- (all)
Date: Sat, 7 Feb 2009 15:56:40 -0800
 
From: Rem P Roberti   
 
To: remeg...@comcast.net
 
Subject: test   

Where on earth did the first line in the header (preceding the date)
come from?

Rem


Re: How can I get mail from /var/mail/jatmin to my spoolfile

2009-02-07 Thread bill lam
On Sat, 07 Feb 2009, Josef Atmin wrote:
> After having discovered macros I came up with the following solution for 
> moving mail from /var/mail/jatmin to ~/INBOX.
> 
>macro index,pager G "\
> unset wait_key\
> \
> if [[ -s /var/mail/$USER ]]; then\
>   cat /var/mail/$USER >> ~/INBOX;\
>   echo -n > /var/mail/$USER;\
> fi\
> set wait_key\
> " "fetch local and pop3 mail"
> 
> This seems to do what I want.  It is a hack, and I am not quite sure 
> whether it is safe (therefore my version within the if-statement looks 
> like
> 
>   cp /var/mail/$USER ~/=var=mail=$USER-backup;\
>   cp ~/INBOX ~/INBOX-backup;\
>   cat /var/mail/$USER >> ~/INBOX;\
>   echo -n > /var/mail/$USER;\
>   echo There has been local e-Mail!;\
>   sleep 2;\

Did you forget to file lock mail/$USER on entry of script?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩312 王維  渭城曲
渭城朝雨浥輕塵  客舍青青柳色新  勸君更盡一杯酒  西出陽關無故人


Re: Where did this line come from?

2009-02-07 Thread David Maus

On 07 Feb 09 16:03, Rem P Roberti wrote:
> I must be getting senile. Either I have never noticed this before, or I
> inadvertently messed something up in my .muttrc.  Observe:
> 
> -N F- 1/1: Rem P Roberti  test -- (all)
> Date: Sat, 7 Feb 2009 15:56:40 -0800
> ...
> 
> Where on earth did the first line in the header (preceding the date)
> come from?

It is Mutt's statusbar and you certainly did set the variable
status_on_top to "yes" so the statusbar ist displayed ... on the
top. 

See:

-  L- 3/9: Rem P Roberti Where did this line come from?  -- (all)
From: Rem P Roberti 
To: Mutt List 
Subject: Where did this line come from?

If you see this line while viewing a message in the pager it probably
*looks like* a header because you changed the coloring.

Best regards,
David

-- 
Email. maus.da...@gmail.com
Jabber dmj...@jabber.org
ICQ... 241051416
OpenPGP... 0x316F4BE4670716FD


signature.asc
Description: Digital signature