On Wednesday 03 September 2003 08:06 am, HaywireMac wrote:
> On Wed, 3 Sep 2003 07:49:39 -0400
>
> Bryan Phinney <[EMAIL PROTECTED]> uttered:
> > This doesn't sound too hard.
>
> To a software test engineer maybe... <g>

Hey, those who can't do, test. ;-}

My personal skillset consists, modestly, of being able to figure out where 
other people's elegant solutions are likely to fail.  I don't mind the work 
and I am pretty good at it, but being able to figure out how to break other 
people's creations is not a skill that one should get too arrogant about.
>
> > 1.  Run Fetchmail as root
>
> So, if I were to follow Stephen's advice and use cron instead of
> inetd, I could just su root and crontab -e to create an entry then....?

Or use Webmin, if you prefer the easy way to do things.

> And fetchmail would call Procmail, and then Postfix would automagically
> be waiting when Procmail was done it's business? And the hip bone's
> connected to the... ;-)

IIRC, Fetchmail can pass mail through Procmail like a filter, after passing 
through, Procmail adds whatever is called for by the recipes and then 
Fetchmail delivers mail back to the local MTA, Postfix or Sendmail or 
whichever MTA you are running.  Also, Fetchmail can pass mail to Procmail 
which can act as an MDA and puts mail directly into the maildir folders, if 
that is the way that it is configured.

>
> > and pass the mail off through procmail on the way to Postfix.
> > Procmail runs a /etc/procmailrc recipe as a root service and calls the
> > nkvir recipe through an include file from that recipe.  You can also
> > add in Spamassassin and any other filters in this recipe.
>
> Ok, so I had it backwards, it's Procmail *b4* Postfix then...

Fetchmail to Procmail to Postfix to var/spool/mail to .forward file back to 
Procmail again and into maildir in the /home/user/mail directory.  I think.
>
> > 2.  Then the mail goes to Postfix who delivers to local mail box file,
> >
> > /var/spool/mail/user based on aliases or the rewrite done by fetchmail
> > in the .fetchmailrc file ([EMAIL PROTECTED] is jblow here).
>
> Ya, since I'm already with configuring that on fetchmail I would
> probably start there, and learn aliases after.

I have more than one POP email address.  Aliases are useful when you want mail 
from particular accounts to pass to specific user accounts.  So, mail from 
one POP might go to postmaster which is aliased to a specific user account 
but gets filtered into a specific folder based on the To info.
>
> > 3.  From the local user directory, create a .forward file that calls
> > procmail and applies a local user.procmailrc recipe to do local
> > filtering, although I imagine this is supposed to catch stuff that is
> > different from the first set of recipes, I am imagining a conservative
> > set of filters for global filtering and a more aggressive set here.
>
> I am looking at sticking to a strictly global config, assuming that I
> will allow for a minimal amount of spam to reach the end user. The main
> thing is to catch *all* attachments that end in .pif, etc.
>
> The occasional bit of annoying spam is OK.

Then why worry about the second call to Procmail at all.  Simply pass mail 
from Fetchmail through Procmail with all filtering or even pass mail from 
Fetchmail directly to Postfix which passes mail through Procmail on the way 
to the /var/spool/mail file.  My own setup passes mail from Fetchmail to 
Postfix, through Procmail and then on to /var/spool/mail.  Mail that is 
flagged as virus, or spam by spamassassin is tagged by Procmail and then 
moved directly to /var/spool/mail/spam mailbox where I check it once per week 
before allowing a cron job to delete it.  You could just as readily flag 
based on levels, pass viruses and definite-spam directly to /dev/null and 
then put possible-spam in a spam mailbox where you can check it periodically 
for false positives prior to deleting it.

I find that a spamassassin level of 10 has no false positives and anything 
above a 4 is a possible with very few false positives.  So above 10 gets sent 
to spam, above 4 is flagged for further checking prior to deletion.  Nkvir 
gets called first before spamassassin so viruses and nigerian stuff doesn't 
even make it to spamassassin.

>
> Ok, so you and Stephen seem to be in agreement there. With IMAP, tho, is
> it still /var/spool/mail/*?

Actually, I think that the way that IMAP works, mail goes directly to $maildir 
which would be /home/user/Mail/etc where users look directly at the mail in 
the directory.  New mail goes to inbox in the maildir directory.  With IMAP, 
I think that you bypass the /var/spool/mail which is an mbox type of file.

-- 
Bryan Phinney
Software Test Engineer


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to