<<< Date Index >>>     <<< Thread Index >>>

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



On  6-02-2009, at 10h 30'29", Josef Atmin wrote about "How can I get mail from 
/var/mail/jatmin to my spoolfile ~/INBOX ?"
> 
> 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 have my maibox in file located in $HOME/Mail by simply setting the
MAIL variable. I use tcsh so this goes in my .login:

setenv MAIL $HOME/Mail/Inbox 

for bash you may need to have this in .profile or similar:

MAIL=$HOME/Mail/Inbox 
export $MAIL

Then, in my .procmailrc config file, I also set the default to the
same file. Here is the head of my $HOME/.procmailrc file:

 SHELL=/bin/sh
 PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
 MAILDIR=$HOME/Mail         #make sure it exists
 Mail=$MAILDIR
 DEFAULT=$MAILDIR/Inbox     #completely optional
 LOGFILE=$MAILDIR/from      #recommended
 EGREP=/bin/egrep
 FORMAIL=/usr/bin/formail

   :0
   * ^From .*@some string.*
   $DEFAULT


The first setting tells mutt (and other applications) were to look for
new e-mails. The second tell were the mail should be delivered.


For a easier solution move /var/spool/mail/Inbox to your file of
choise and then make a symlink from that file back to
/var/spool/mail/Inbox .



Good luck,
        Ionel