Re: [SLUG] Postfix+procmail+spamassassin

From: Doug Koobs (dkoobs@dkoobs.com)
Date: Thu May 22 2003 - 15:20:58 EDT


Thanks for the tips! I've got it working now. Here is the entry in
procmaillog for a non-spam message:

procmail: [4939] Thu May 22 15:12:36 2003
procmail: No match on "^Subject.*\[!!THIS IS SPAM!!\]"
procmail: Assigning
"PATH=/home/dkoobs/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"
procmail: Bypassed locking "/var/spool/mail/dkoobs.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/dkoobs"
procmail: Opening "/var/spool/mail/dkoobs"
procmail: Acquiring kernel-lock
procmail: Notified comsat: "dkoobs@179134:/var/spool/mail/dkoobs"
 From Doug.Koobs@reptron.com Thu May 22 15:12:36 2003
  Subject: Test
   Folder: /var/spool/mail/dkoobs 1072

And here is the entry for a spam:

procmail: [4990] Thu May 22 15:14:37 2003
procmail: Match on "^Subject.*\[!!THIS IS SPAM!!\]"
procmail: Locking "/var/spool/mail/spam.lock"
procmail: Error while writing to
"/var/spool/mail/_-NB.dGSz-.mail.dkoobs.com"
procmail: Lock failure on "/var/spool/mail/spam.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/spam"
procmail: Opening "/var/spool/mail/spam"
procmail: Acquiring kernel-lock
procmail: Notified comsat: "dkoobs@0:/var/spool/mail/spam"
 From Doug.Koobs@reptron.com Thu May 22 15:14:37 2003
  Subject: [!!THIS IS SPAM!!] Home Based Business for Grownups
   Folder: /var/spool/mail/spam 5398

I have some questions about these entries on the spam message.

Why is it trying to write to a file _-NB.dGSz-.mail.dkoobs.com?
Why did the lock fail?
What does the "notified comsat" mean, and why does it notify dkoobs@0?
Should I worry about any of these entries?

Thanks Again!!!

Doug

SpamFree wrote:
> On Wednesday May 21 2003 07:42 pm, you wrote:
>
>>OK, thanks for the tips. I've made some progress using the link you
>>posted... Right now, my setup is like this:
>>
>>postfix>spamc>spamd>sendmail
>>
>>(Note: the sendmail above is just a part of postfix, not the sendmail smtp
>>server)
>>
>>Actually, postfix sends the mail to a script, that calls spamc, which sends
>>it to spamd. The output is then piped into sendmail to send it on to the
>>original recipient. Here is the script, named postfixfilter:
>>
>>#!/bin/bash
>>/usr/bin/spamc | /usr/sbin/sendmail -i "$@"
>>exit $?
>> However, there is nothing in this setup that cannchange the recipient if
>>spamassassin labels a message as spam. That's what I need procmail for.
>>
>>I tried to change the script to:
>>/usr/bin/spamc | /usr/sbin/procmail
>>
>>and I set up /etc/procmailrc:
>>
>>LOGFILE=/var/log/prcomaillog
>>VERBOSE=1
>>
>>:0
>>
>>* ^Subject.*\[!!THIS IS SPAM!!\]
>>! oma@dkoobs.com
>>
>>Spamassassin is set to change the subject of spam to [!!THIS IS SPAM!!]
>>So, I though this would capture the spam, send it to oma@dkoobs.com.
>>Anything else would just be delivered normally. Well, that was my plan. In
>>reality, wehn I sent mail, wether spam or not, it just went into
>>postfixfilter's mailbox /var/spool/mail/postfixfilter)
>>How do I get this to go to the original recipient?
>>
>>Disclaimer: I apologize for the length and incoherent nature of this
>>message... I claim the same shelter as another SLUGer... Too many Sam Adams
>>(Light for me:::)!!!
>>
>>Doug
>
>
> In the procmailrc above, your logfile is not spelled correctly. Double check
> it for correctness, though this has nothing to do with your problem.
>
>
> Put the Spamassassin script back to the way it was in the how-to, meaning to
> remove the pipe to procmail and instead pipe it to sendmail. Then in your
> /etc/postfix/main.cf change the mailbox command to mailbox_command =
> /usr/bin/procmail. Then execute postfix reload. That should get it. Your
> message flow should then be Postfix -> Spamassassin -> Postfix -> Procmail ->
> user's mailbox.
>
> If it still doesn't work send a snippet, for a delivered message, from your
> /var/log/maillog and a relevant snippet from you /var/log/procmaillog.
>
>



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:12:12 EDT