>-----Original Message----- >From: Nelly Yusupova [mailto:[EMAIL PROTECTED] >Sent: Friday, August 20, 2004 3:58 PM >To: Spamassassin >Subject: Redirect mail to a script after it has been scanned for spam > > >Hello, > >We run Sendmail, configured with procmail and Spamassassin. >My goal for >that server is to be able to send emails to >[EMAIL PROTECTED], scan >them for spam and redirect them to a php script that will insert those >emails into a database. Right now, I'm setting up the >environment under >staged.cybergrrl.com and therefore using >[EMAIL PROTECTED] as >the domain name for the emails. > >To achieve the redirect, I added these two lines to sendmail.cf file: >R$+ < @ staged.cybergrrl.com. > $#village $:$1 >Mvillage, P=/www/mail_process.php, F=lsSDFn, S=10, R=20, M=62480, >A=vdeliv $u > >The lines above do cause the mail coming from >@staged.cybergrrl.com to go to >the php script but they don't get scanned for spam (I know >this because the >headers don't have spamassassin info in them). The name of >the server is >xena.cgim.com. When I send an email to [EMAIL PROTECTED], >spamassassin >processes the mail. But when I send an email to >[EMAIL PROTECTED], >it gets inserted into a database but not scanned for spam. > >Does anyone know how to forward the incoming email to a script >with this set >up, AFTER it has been scanned by SpamAssassin? > >Thanks in advance, > >Nelly Yusupova. >
I'll give this a shot. Sendmail isn't letting the email go anywhere but to the script. You would need to use something like procmail first. Don't use a Sendmail rule, use a procmail rule. Then after is passes spamassassin, check to see if it is spam, then forward to script. Al thru procmail. HTH, --Chris
