1

I have a ticket system in PHP. People report tickets over email. A mail parser connects to the mailbox using IMAP, downloads the email and parses it to create a ticket which can be viewed/updated over the web interface.

Now I want my application to check if the downloaded mail is a spam before it creates a ticket out of the mail. So I thought of integrating spamassassin. The docs say, it can be implemented as a proxy. I am not sure how to do this.

Basically what I want is a way to pass the email as a string to the spamassassin perl script which validates the mail?

Has anybody done something similar before. Can you suggest some other related good tools?

Edit: I am using Google apps mail-server. So its not an option to integrate SpamAssassin at the MTA or MDA stage.

Varun
  • 4,054
  • 6
  • 31
  • 54
  • I think that the most common usage is to have spamassasin inspect the messages *just* before they reach the mailbox, so that the messages in mailbox already have a header added by SA saying ham/spam. This way, you don't need to integrate SA with your script, just check the header. – Piskvor left the building Apr 22 '11 at 14:15

1 Answers1

1

Can you install spamassassin in your webserver? because spamassassin supports pipes. you can make a syscall from php to use spamassassin from command line and parse the answer. Or you can use this http://ppadron.blog.br/2010/05/04/php-api-to-spamassassin-spamd-protocol/ Or you can use a reliable antispam service for your domain.

edux
  • 11
  • 1