How to integrate spamassassin in a web app? - SpamAssassin

This is a discussion on How to integrate spamassassin in a web app? - SpamAssassin ; Hi, i'm developing a simple web application, which has a newsletter. I'd like to integrate the possibility to do an automatically check of the mail that will be sent, which can be showed to the user before he send it. ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: How to integrate spamassassin in a web app?

  1. How to integrate spamassassin in a web app?


    Hi, i'm developing a simple web application, which has a newsletter. I'd like
    to integrate the possibility to do an automatically check of the mail that
    will be sent, which can be showed to the user before he send it. I know that
    there are sites which do this. So i'd like to know how can this can be done
    by an own application. I've searched on google, but i haven't find anything

    Is there anyone who have done this or has some hint about how to do this?
    Thanks
    --
    View this message in context: http://www.nabble.com/How-to-integra...p19542249.html
    Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


  2. Re: How to integrate spamassassin in a web app?

    xdmx wrote:
    > Hi, i'm developing a simple web application, which has a newsletter. I'd like
    > to integrate the possibility to do an automatically check of the mail that
    > will be sent, which can be showed to the user before he send it. I know that
    > there are sites which do this. So i'd like to know how can this can be done
    > by an own application. I've searched on google, but i haven't find anything
    >
    > Is there anyone who have done this or has some hint about how to do this?
    > Thanks
    >


    First off, please don't post your question 3 times. This isn't a chat room.

    Second, I hate to say it, but if you have to ask, likely you aren't able
    to do it.

    You really can't feed 'text' to spamassassin. There's way too many other
    variables. Mail server used, if that server is in an RBL, etc.
    But if you can figure out how, take the output of the newsletter, feed
    it to spamassassin, put the output to the user. How you do that depends
    on way too many factors - ie what web server you're running, what flavor
    of *nix is running, etc.


  3. Re: How to integrate spamassassin in a web app?

    Evan Platt wrote:
    > First off, please don't post your question 3 times. This isn't a chat room.


    The reason is this:

    > > View this message in context: http://www.nabble.com/How-to-integra...p19542141.html
    > > Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


    Nabble! Bad Nabble! Let me be yet another voice complaining about
    how terrible Nabble is for mailing lists. AFAIK Nabble allows the
    user to modify sent messages. Every time they modify the message it
    sends the message again using the same Message-Id: as before. Grr...
    Nabble is very annoying to me.

    > xdmx wrote:
    > >Hi, i'm developing a simple web application, which has a
    > >newsletter. I'd like to integrate the possibility to do an
    > >automatically check of the mail that will be sent, which can be
    > >showed to the user before he send it. I know that there are sites
    > >which do this. So i'd like to know how can this can be done by an
    > >own application. I've searched on google, but i haven't find
    > >anything
    > >
    > >
    > >Is there anyone who have done this or has some hint about how to do this?


    You are thinking too hard. Simply do it. Put a mail header on the
    text of the message and feed it to SpamAssassin in the normal way.
    Give SA the test mode flag (-t) and show the result to the user.

    As far as how to do that it is dependent upon your web development
    language. If you are using PHP or Perl or Ruby or Shell or Other then
    all will do this differently. If you are developing the application
    then you will need to write that part. In shell I would do it like
    this:

    {
    echo "Message-ID: "
    echo "Date: $(date -R)"
    echo "To: someone@example.com"
    echo "From: My Newsletter "
    echo "Subject: My Newsletter Subject"
    echo ""
    cat newsletter.txt
    } | spamassassin --test-mode

    That is almost pseudo-code. You should be able to translate that into
    whatever language you are using and then also fix up whatever doesn't
    work in my untested and off the top of my head example.

    Bob


  4. Re: How to integrate spamassassin in a web app?


    Hi, yep, i'm sorry about the 3 posts, wasn't because an edit, but because the
    nabble site which went timeout
    btw, i tried your solution and it works, thanks

    --
    View this message in context: http://www.nabble.com/How-to-integra...p19552374.html
    Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


  5. Re: How to integrate spamassassin in a web app?

    Bob Proulx wrote:
    > Nabble! Bad Nabble! Let me be yet another voice complaining about
    > how terrible Nabble is for mailing lists. AFAIK Nabble allows the
    > user to modify sent messages. Every time they modify the message it
    > sends the message again using the same Message-Id: as before. Grr...
    > Nabble is very annoying to me.
    >

    Nabble is to e-mail as Google groups is to Usenet.

    And yes, I killfile all posts from Google Groups. Pretty close to doing
    it for Nabble too.


  6. Re: How to integrate spamassassin in a web app?

    xdmx wrote:
    > Hi, yep, i'm sorry about the 3 posts, wasn't because an edit, but because the
    > nabble site which went timeout
    >

    All the more reason to not use a web interface to a e-mail group.
    > btw, i tried your solution and it works, thanks
    >

    Who's solution? Who are you replying to?


  7. Re: How to integrate spamassassin in a web app?

    Evan Platt wrote:
    > Bob Proulx wrote:
    >> Nabble! Bad Nabble! Let me be yet another voice complaining about
    >> how terrible Nabble is for mailing lists. AFAIK Nabble allows the
    >> user to modify sent messages. Every time they modify the message it
    >> sends the message again using the same Message-Id: as before. Grr...
    >> Nabble is very annoying to me.
    >>

    > Nabble is to e-mail as Google groups is to Usenet.
    >
    > And yes, I killfile all posts from Google Groups. Pretty close to doing
    > it for Nabble too.


    and in these days of SPF and DKIM, posting from nabble will cause more
    and more problems. unless of course they get the private key of every
    site ;-p


+ Reply to Thread