Free JSON API to instantly check the spam score of your email messages
spamcheck.postmarkapp.com
spamcheck.postmarkapp.com
We decided to offer it as a free API to make the world of email just a bit better. We also built a simple single-page scoring tool for anyone to use even if they're not API savvy.
Ideas and feedback are welcome!
Update: would be nice to see a legend with the whole scale ratings possible.
> Postmark's spam API is a mostly RESTfull interface to the Spam filter
> tool SpamAssassin.
...
> This is free to use and may be updated, removed or changed at any time.
If there's nothing particularly proprietary about the setup, it'd be great to open source it and release it as a public Amazon EC2 AMI. That way, others can play around and tweak it and it would remove the dependency on a third-party service of uncertain longevity.1) I don't know your app, but ran SA in the past. You can configure the hell out of it. How is this test setup representable for the (that's the thing you want to archive, I guess) spam filter configuration of the final recipient?
2) Aren't you basically offering a way to ~somewhat easily~ avoid being flagged as spam, even for people with dark glasses and the tendency to sell potent drugs over the internet? I somehow think that you're offering a nice test setup to people that want to 'tune' their unsolicited emails first?
No offense intended, I guess I'm just too negative here? Would love to get feedback on those things nevertheless.
But the bad guys have always been one step ahead of the rest. Let's use the same knowledge and tools, and fight on equal grounds.
1) This test is representative of our system. I realize that other systems can be set up different with different settings. given that users of the Postmark app send email through us, they might be interested to see what we might consider as spam.
2) The thing is that there are a lot of tests that spamd does that they can't defeat, even if they're aware of them. security by obscurity isn't really how spamd works anyway :)
and no, you're not at all negative. by all means, please feedback at us :)
1) Agreed. So it's ~accurate~ really only for recipients that would use your service/the same configuration/classification, right? For everyone else this is an approximation. With a nice api and some UI love, but still.
2) Agreed, a lot of things are unbeatable. But you yourself market this as 'most often the _content_ leads to classification as spam' solution. Everyone can change the content, good guy and bad guy.
I'm not saying that the idea sucks and quite frankly someone involved into a business that sends unsolicited mail should know the deal already, but I still think that you're offering yet another testcase.
Security by obscurity is not the problem, the thing is: Can I create a client for your API that randomly appends/prepends/inserts meaningful text into my crap content and evaluate your opinion on my crap x times per second? You commented elsewhere that you're not keeping my content, so - how are you going to notice this abuse?
Okay, _NOW_ I'm too negative. Still - rate limit that stuff. :)
I bet siri can already do this.
xargs -I % curl -X POST "http://sa-api.postmarkapp.com/filter \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-v \
-d '{"email":"%", "options":"long"}' \
<message
It seems contents of my email message file are processed one line at a time, instead of the entire message passed in place of %I'm using GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
EDIT: added indentation to fix display
EDIT: Sorry if that came off harsh.
msg=$(cat message)
curl -X POST "http://sa-api.postmarkapp.com/filter" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-v \
-d '{"email":"'"$msg"'", "options":"long"}'
But sa-api.postmarkapp.com returns "error"... :-(I'm going to go through the doc again to make sure there's nothing else out of place :/
msg=$(cat message)
curl -X POST "http://spamcheck.postmarkapp.com/filter" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-v \
-d '{"email":"'"$msg"'", "options":"long"}'
* About to connect() to spamcheck.postmarkapp.com port 80 (#0)
* Trying 184.73.163.218... connected
* Connected to spamcheck.postmarkapp.com (184.73.163.218) port 80 (#0)
> POST /filter HTTP/1.1
> User-Agent: curl/7.21.7 (x86_64-pc-linux-gnu) libcurl/7.21.7 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 libssh2/1.2.8 librtmp/2.3
> Host: spamcheck.postmarkapp.com
> Accept: application/json
> Content-Type: application/json
> Content-Length: 5229
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 500 Internal Server Error
< X-Powered-By: Express
< Content-Type: application/json
< Connection: keep-alive
< Transfer-Encoding: chunked
<
* Connection #0 to host spamcheck.postmarkapp.com left intact
* Closing connection #0
{"error":{}}
Wonder if you've got any pointers on how to do this at the shell...edit: would you want to see the same results, or have it re-run every time the link is loaded? because you could technically just copy paste the report into pastebin…
Enjoying the api, I may work on a little tool using it similar to the feature request. thanks for sharing this with us.
I'm currently working on it to support W3C validation, link and image checkers and email previews.
Also, I've tried a few emails: 1 of them ranked a 1.0, 2 of them a 0.4, but all three times the little white dot was in the same position (at about 2:50, if it were the face of a clock). Not sure if thats a bug or not.
Thanks for that update
AWL (auto-white-list) is the most obvious rule, but many actual Spam Assassin installs include plugins that rely on all kinds of 3rd party service.
Is the IP you are checking against the same as IP used to send your transactional emails?
because while I can't see what people are testing, given that it's friday afternoon, I'm betting there's a lot of "asdfasdf" going on :)
Starting with the type of stats you mentions is great... rates at which the API is being called throughout the day overlapped with rates at which that volume is spam.
I could envision a nice looking bar chart (green) for every hour showing the standard volume bell curve ramping up at 6 am and back down around 4pm and then overlayed on that is another set of bars (red) that show how much of that mail was spam, and how much was (orange) ham or something like that.
Would just give a nice pizzaz to the service and by extension postmark I imagine.
I suppose if you throw what I'm saying into a pot and boil it down, I want you guys to become like Akismet. Every WordPress user knows what it is, everyone uses it and when you find yourself in a non-wordpress environment you reach for the Akismet APIs to help you out anyway.
I figure you guys can popularize postmark via a similar route.
Cool idea, but what do the scores mean?
apt-get install spamassassin
cat email.txt|spamc -R