Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Linux debian 2.6.18-3-486 #1 Mon Dec 4 15:59:52 UTC 2006 i686 GNU/Linux
Posts: 24
Rep:
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?
Distribution: Linux debian 2.6.18-3-486 #1 Mon Dec 4 15:59:52 UTC 2006 i686 GNU/Linux
Posts: 24
Original Poster
Rep:
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.
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.
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.
Distribution: Linux debian 2.6.18-3-486 #1 Mon Dec 4 15:59:52 UTC 2006 i686 GNU/Linux
Posts: 24
Original Poster
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.