LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Procmail cloning mail (https://www.linuxquestions.org/questions/linux-server-73/procmail-cloning-mail-532343/)

Blyiss 02-25-2007 05:19 PM

Procmail cloning mail
 
I use exim4, getmail and procmail. I want procmail to filter spam.It works OK, only doesn't stop. When I get an email, procmail starts cloning it. And there's no way to stop it, until removing .procmailrc completely. I don't want my hard drive to be stuffed with a multiple copies of the same spam email.How can I stop procmail?

gilead 02-25-2007 06:28 PM

Can you post the contents of your .procmailrc file please? It would help if we could see what might be causing the problem...

Blyiss 02-26-2007 12:06 AM

OK, gilead, if you are interested. But I guess, I found the solution. I don't try procmail any more. I am not running an email server. I just need to filter spam for my domestic purposes. I use slocal instead. But anyway,
I use exim4 to send emails, getmail to receive emails and nmh to handle emails. Getmail was configured to output to procmail like this:

~/.getmail/getmailrc:
Code:

[destination]
type = MDA_external
path = /usr/bin/procmail
unixfrom = True

~/.procmailrc was like this:
Code:

PATH=/usr/bin:/usr/local/bin:/usr/lib/mh
MAILDIR=HOME/Mail
DEFAULT=/Mail/inbox
LOGFILE=$MAILDIR/procmail.log
SHELL=/bin/sh

:0
* ^X-Spam-Status: Yes
| /usr/lib/mh/rcvstore +spam

I see now a kind of a mistake for my HOME directory.
There should be probably a "$" sign ahead of HOME,
or maybe, procmail is just not compatible with MH trough
getmail,I don't know.

~/.mh_profile is
Code:

Path: /home/rex/Mail
Msg-Protect: 600
Folder-Protect: 700
draft-folder: drafts
unseen-sequence: unseen

I spent two days to make procmail to respond. And when I did, it went the way I described. Now I switched to slocal. It doesn't clone the mails but I didn't get spam yet to test how it works. Thank you for your reply.

gilead 02-26-2007 12:19 AM

I'm glad you've been able to figure out a solution and yes you are correct - it should have been $HOME, not HOME. Also, I wouldn't put the procmail.log file in your MAILDIR - but neither of those look they would cause a loop.

billymayday 02-26-2007 02:11 AM

I don't know procmail, but with postfix/maildrop, I use user+spam rather than +spam

Blyiss 02-26-2007 12:31 PM

Hello, guys. Slocal filters spam very well.
To the guys who have the same problem I would recommend:
don't use the "getmail-procmail-mh" combination,
use "getmail-slocal-mh" instead.


All times are GMT -5. The time now is 01:51 PM.