On Tue, 2009-04-28 at 11:07 -0500, Robert Ober wrote:

> filter in Outlook.  Problem is that some users are setup to have their 
> email forwarded to their cellphone/blackberry and the spam is in that 
> inbox.  So I found some articles and decided to have the spam go to a 
> file.  The following is the new version of the /etc/procmailrc:
> 
> DROPPRIVS=yes

procmail is being run on behalf of the recipient.

> LOGFILE=/var/log/procmail.log
> VERBOSE=yes
> LOGABSTRACT=all

MAILDIR is not set, so it defaults to $HOME.

Does your "main offsite user" even have a $HOME? What user is this being
run as? Check its home...

> :0fw
> | /usr/bin/spamc
> 
> 
> # Mail that is very likely spam (>15) can be dropped on the floor.
> # Move the # down one line to drop it.
> # Note that dropping mail on the floor is a *bad*
> # idea unless you really, really believe no false positives will
> # have a score greater than 15.
> SPAMFOLDER=spam
> :0:
> * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> #/dev/null
> almost-certainly-spam

This would deliver in *mbox* format into $MAILDIR/almost-certainly-spam

> :0 w :$SPAMFOLDER/.lock
> * ^X-Spam-Status: Yes
> $SPAMFOLDER/.

Here you specify *MH* format, delivering into $MAILDIR/spam/


> No spam is going to the spam file in /var/spool/mail although the main 
> offsite user did have a .lock . I even dropped the level from 8 to 5 . 
> The main offsite user is being flooded and sees all the spam on his 
> phone.  I even rebooted the server (Fedora Linux Core 6) last night.   
> Also, what ownership should the logfile(procmail.log) have?  I did 660 
> and tried mail.mail and it still complains in the maillog that it cannot 
> write to the logfile.

procmail is not being run as user mail. See DROPPRIVS in man procmailrc.


You should sort out *where* to deliver, and what *format* to use. Also
it seems the user procmail runs as is not allowed to write to the
delivery destinations -- and/or does not have a $HOME.

You will see the failed delivery attempts and falling through to the
next recipe / default mailbox in the procmail logs, once they are
writable...


-- 
char *t="\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}

Reply via email to