LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-25-2007, 05:19 PM   #1
Blyiss
LQ Newbie
 
Registered: Feb 2007
Distribution: Linux debian 2.6.18-3-486 #1 Mon Dec 4 15:59:52 UTC 2006 i686 GNU/Linux
Posts: 24

Rep: Reputation: 15
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?
 
Old 02-25-2007, 06:28 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Can you post the contents of your .procmailrc file please? It would help if we could see what might be causing the problem...
 
Old 02-26-2007, 12:06 AM   #3
Blyiss
LQ Newbie
 
Registered: Feb 2007
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: Reputation: 15
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.
 
Old 02-26-2007, 12:19 AM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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.
 
Old 02-26-2007, 02:11 AM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I don't know procmail, but with postfix/maildrop, I use user+spam rather than +spam
 
Old 02-26-2007, 12:31 PM   #6
Blyiss
LQ Newbie
 
Registered: Feb 2007
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: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Procmail: forwarding mail to remote mail account Cadmium Linux - Software 2 01-14-2010 01:05 PM
Problem with mail delivery procmail>cyrus imap (using sendmail,procmail,cyrus,imap) bwana Linux - Software 2 03-24-2005 07:01 PM
procmail mail sorting FLOODS Linux - Networking 1 11-26-2004 09:12 PM
Procmail Store Mail Attachment mark@mark-goebl Linux - Software 1 01-09-2003 10:01 PM
? fowarding mail using procmail ? norman Linux - Networking 1 11-18-2002 11:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration