[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: maildirmake



On Wed, Jan 14, 2004 at 11:37:16AM -0500, Mike Mueller wrote:
> On Wednesday 14 January 2004 04:59, Kevin Mark wrote:
> > On Tue, Jan 13, 2004 at 02:39:21PM -0500, Mike Mueller wrote:
> > > I am a MTA/MDA/MUA email noob.  I am doing things piecemeal to understand
> > > the functioning of each component. 
> <snip>
> > > How are maildir and folders usually set up?  With an MUA?
> > > --
> >
> > Hi Mike,
> > here is something I recall.
> > I have sendmail and procmail and fetchmail.
> > fetchmail (using cron) get my email and passes it to sendmail for local
> > delivery. Sendmail using procmail to sortout what to do with my mail and
> > where to drop it.
> > so:
> > fetchmail->sendmail->procmail->mailboxes
> 
> Thanks for the reply Kevin.
> 
> I was thinking about doing this:
> 
> 1. POP3->getmail->mailboxes

this is the basic way. no frills.

> 2. POP3->getmail->procmail->mailboxes
> 3. POP3->getmail->procmail->mailboxes<-MUA (Mutt for example)

this is what I use. this allows you to do mbox or maildir. mutt can do
either.

> 4. throw in spam filtering

you can do basic spam filtering with procmail OR add other
stuff-spamassasin...

> 5. MUA->nullmailer->SMTP Smart Relay

dont know what this is.
> 
> I am avoiding sendmail because (IMO) it's big and does things I don't need.  

it was MY choice but it is not DEBIAN's default. exim3 or 4 can be
configured with d-u peoples' help in a flash.

> I wish I could find the Young Folks Book of OSS Email Solutions with big 
> colorful pictures and simple statements about the benefits and drawbacks of 
> each configuration (links appreciated).  Without that book I am left to 
> assemble what I think is the simplest collection of tools for my situation in 
> a trial-and-error fashion.  At the outset, by using getmail, I am faced with 
> the daunting choice of mbox versus maildirs.  Great. All I need is a 
> controversy.  

I think these become more of an issue when you want to: store GB of
mail, backup GB of mail or do custom searches of GB of mail. maildir is
better for those. there is also noproblem with mbox<->maildir conversion
if ever there is a need. This is the benefit of open source. choices and
freedom.

> 
> Long discussion on debian-devel on maildirmake:
> http://lists.debian.org/debian-devel/2003/debian-devel-200306/msg01420.html
> 
> Tools for converting mbox to maildir:
> http://qmail.mscnetworks.com/top.html#maildir
> 
> As I go through the steps above I wonder where the mailboxes come from.  The 

as I said before, after you set up the procmail script and setup either
a file or a directory, procmail will do what you said. no need to do
anything else.

SO, if you do:
touch /home/$USER/mail/debian-user
you have made a mbox
if you do:
mkdir /home/$USER/mail/debian-user
you have made a maildir
voila!

> various agents need to know about the mailboxes (obviously).  So the choices 
> are:
> 
> 1. use maildirmake which is not a part of base debian; I suppose I could load 
> in qmail and get it, but drag in that monster for a script?  Should I ask the 
> Debian getmail package maintainer to include maildirmake?
> 2. create them manually which worked; still haven't found how folders are 
> specified but I have found some source code to read; not enthused about 
> reading source when I'm in the noob stage; never enthused about reading PERL 
> ;-)
> 3. start learning Mutt and use it to create maildir targets; haven't really 
> got the hang of getmail yet and now I've got to get Mutt out of the box? it's 
> probably not that hard 
> 
> In the end, 3. is probably the preferred choice.  Then you modify the 
> procmail recipes to use the new mail folder as desired.  I haven't actually 
> done this yet, I am plotting a course.
> 
> > this is a portion of my .procmailrc
> > ----------------------
> >
> > PATH=/usr/local/bin:/usr/bin:/bin
> > MAILDIR=$HOME/mail
> > DEFAULT=$HOME/mbox
> > LOGFILE=$MAILDIR/rules/from
> >
> > :0 c
> >
> > $MAILDIR/backup
> >
> > :0
> >
> > * ^To:.*perlsemny
> > $MAILDIR/monthly/perlsemny
> >
> > :0
> >
> > * ^From:.*handspring
> > $MAILDIR/other/handspring
> > ----------------------------------
> > Here is sort of an answer to your question.
> > the 'mail rule' ^To:.*perlsemny asks if the message is from someone with
> > the address containing the word 'perlsemny'. if it does it moves the
> > mail into $MAILDIR/monthly/perlsemny.
> > if $MAILDIR/monthly/perlsemny is a file, then
> > the mail is saved in mbox format inside the file.
> > BUT if it is a directory, the mail is
> > saved in maildir format inside the directory.
> > This is how things work with procmail.
> > -Kev
> 
> Are you using mbox or maildir?

I started out with mbox and still use it. but one day I will take the
maildir plunge. with maildir there are many benefits.
-Kev

Attachment: signature.asc
Description: Digital signature


Reply to: