procmail help
am 04.02.2007 10:36:41 von Jason Williams
I'm setting up an email system - but probably the long way round - we
get a lot of spam, and it makes more sense to use our host's email spam
removal system than Spamassassin as that requires training.
I've set it up so far so that fetchmail will collect from the mail
server, then qmail will deliver it to the client - I'm now adding
procmail into the middle of this lot, but have a problem.
When I collect the mail from the server, and it is pushed to procmail (I
have verbose on so I can see what happens) - it gets sorted into
different mailbox folders, but renames it from what it would be if I
collected it with just fetchmail.
Then when I try and collect if using an email client, it connects, moves
the email to a different folder and sends a message back to the client
saying it's no longer there! I just can't figure out what I'm doing wrong!
Thanks
Re: procmail help
am 04.02.2007 20:06:49 von Alan Clifford
On Sun, 4 Feb 2007, Jason Williams wrote:
JW>I'm setting up an email system - but probably the long way round - we get a
JW>lot of spam, and it makes more sense to use our host's email spam removal
JW>system than Spamassassin as that requires training.
Spamassassin is not just a baysian filter.
JW>
JW>Then when I try and collect if using an email client, it connects, moves the
JW>email to a different folder and sends a message back to the client saying
JW>it's no longer there! I just can't figure out what I'm doing wrong!
Neither can anyone else. Why not post your .fetchmailrc, your
..procmailrc, any procmail recipes and the verbose procmail log of anything
that you think has been directed to the wrong mailbox. In there is
something you have installed to move mail.
--
Alan
( If replying by mail, please note that all "sardines" are canned.
There is also a password autoresponder but, unless this a very
old message, a "tuna" will swim right through. )
Re: procmail help
am 04.02.2007 22:11:15 von Garen Erdoisa
Jason Williams wrote:
> I'm setting up an email system - but probably the long way round - we
> get a lot of spam, and it makes more sense to use our host's email spam
> removal system than Spamassassin as that requires training.
>
> I've set it up so far so that fetchmail will collect from the mail
> server, then qmail will deliver it to the client - I'm now adding
> procmail into the middle of this lot, but have a problem.
>
> When I collect the mail from the server, and it is pushed to procmail (I
> have verbose on so I can see what happens) - it gets sorted into
> different mailbox folders, but renames it from what it would be if I
> collected it with just fetchmail.
>
> Then when I try and collect if using an email client, it connects, moves
> the email to a different folder and sends a message back to the client
> saying it's no longer there! I just can't figure out what I'm doing wrong!
>
> Thanks
Based on this description of what you are attempting to do it's almost
impossible to tell where the problem if any would be.
fetchmail can be configured to handoff directly to procmail, or to
handoff to another mail server. In your case it seems you are doing the
handoff to a mailserver, in your case Qmail, which in turn hands of to
procmail.
Procmail is the mail delivery agent in either case, so why bother having
Qmail in the mix? You really only need a local mail server in this if
you plan on receiving mail directly to your server instead of through
some third party via fetchmail, or if you plan to send mail directly
from your server instead of through some third party.
If all your users are on the same box that is using fetchmail to
retrieve the mail then you really don't need another mail server in the mix.
Anyway, as for procmail, it's an MDA (Mail Delivery Agent) in it's own
right. It's primary purpose is to parse the email, then based on the
conditions you set either deliver to the user's standard inbox, or to
any other folder or set of folders you specify, forward the email on to
yet another email account, or deliver the email to a wrapper program or
yet another delivery agent.
The conditions used by procmail can be regular expressions you set to
check for patterns in the email header or body, other filter programs
such as SpamAssassin, Spambouncer, or Bogofilter, or any other custom
wrapper program you want to bother with.
I recommend that you study the following man pages then if you still
can't figure it out post the relevant code you are having problems with
and someone here will help likely jump in and help you with it. It's
next to impossible for anyone to troubleshoot or give feedback to you
with out the actual code you are using to look at.
man procmail (Man page describing procmail's command line switches.)
man procmailrc (Man page describing how to write procmail run control
files)
man procmailsc (Man page describing how to use procmail scoring)
man procmailex (Man page with some simple example procmail recipes)
--
Best Regards
Garen