Procmail, MAILDIR

Hi,

I wonder if you can help me with configuring Procmail. I'm following this: http://www.ii.com/internet/robots/procmail/qs/ tutorial.

I'm editing:

$HOME/.procmailrc
Code:
# Replace $HOME/Msgs with the directory where your personal (non-system-spool) mailboxes reside 
# Mailboxes in maildir format or served by Courier IMAP are often in $HOME/Maildir
# Mailboxes served by UW IMAP are sometimes in $HOME, sometimes in $HOME/mail, & sometimes elsewhere
# MAILDIR default is the value of $HOME
# Make sure that $MAILDIR exists and that it is a directory!

MAILDIR=$HOME/Msgs
  
# IMPORTANT:
# * On most systems $MAILDIR is a subdirectory of $HOME
# * Upon reading a line that contains MAILDIR=
#     Procmail does a chdir to $MAILDIR
#      ...and $MAILDIR becomes the Procmail working directory
#       ...and relative paths are relative to $MAILDIR
# * Do not include a trailing slash in your MAILDIR setting
# * The $MAILDIR directory must exist and must be writable by your LOGNAME
# * The MAILDIR variable is an entirely different entity from maildir mailbox format
     
#### End Variables Section; Begin Processing Section ####

It's these lines that I'm unsure about:

Code:
Make sure you replace  MAILDIR=$HOME/Msgs  with the directory where your personal (non-system-spool) mailboxes are stored and that this directory exists and is writable by your LOGNAME. The MAILDIR variable specifies Procmail's working directory and all relative paths are relative to this directory.


I've created a $HOME/Msgs directory and set
Code:
MAILDIR=$HOME/Msgs
Is this the correct path? Only I'm a little unsure. If I'm logged in as 'me' say, I thought my personal (non-system-spool) mailboxes would reside in:

$ cd /var/mail
$ ls
Code:
me	admin	ftp	mysql	root	tqadmin	www

So should
Code:
MAILDIR=/var/mail
or the former?
 
wblock@ said:
It would be your user's local mail directory. For user me, that would typically be /home/me/mail.

And if /home/me/mail didn't exist, one would simply create it?
 
Backing up: there are two directories involved. Users will have a directory in /var/mail where "system spooled" mail is kept, their "inbox". maildrop or procmail can filter incoming mail into other directories, and these will be in the user's home directory.

Your MUA may create a mail directory automatically. If not, creating it on your own should be fine. Set the permissions to 700 to keep others from reading your mail.
 
Back
Top