GoDaddy VPS and SpamAssassin Blocking
This post is re-printed from an old blog, but I found it handy and apparently so did search engines so here it is again:
This last week I ran into a grave problem with my hosting company GoDaddy [ed: I no longer host with them, this was one reason]. My website(s) run on a Virtual Dedicated Server maintained by GoDaddy. Recently, my e-mails couldn’t get through the server, they were being refused as spam. In fact, whenever I tried to send anything out it attached [SPAM] to the front of my subject and it was refused.
After contacting GoDaddy and having them fix a wayward email server, it still occurred, so I poked around some more. After turning it off I determined it was my SpamAssassin program that was catching my e-mails! But why would it do this?
I access the internet using Comcast. Well, it turns out that there are websites out there that list certain IP addresses as ‘black listed’ or have a policy about where they originate or whether they are trustworthy. Turns out my publicly assigned IP address was on two of them! One just simply said there was nothing to fear, this was just a policy listing and that if I used SMTP Authorization on my server it shouldn’t be a problem. There was clue number one. The second was just a plain block saying that this IP address had been used to send spam or other things in April of 2008.
So my first move was to go into my SpamAssassin configuration file and make all the scores of the blacklist checks equal to zero.
Something like from the bottom of this page. However I altered /etc/mail/spamassassin/local.cf, by looking at the dnsbl file to show the following:
score __RCVD_IN_SORBS 0.0
score RCVD_IN_SORBS_HTTP 0.0
score RCVD_IN_SORBS_SOCKS 0.0
score RCVD_IN_SORBS_MISC 0.0
score RCVD_IN_SORBS_SMTP 0.0
score RCVD_IN_SORBS_WEB 0.0
score RCVD_IN_SORBS_BLOCK 0.0
score RCVD_IN_SORBS_ZOMBIE 0.0
score RCVD_IN_SORBS_DUL 0.0
score __RCVD_IN_ZEN 0.0
score RCVD_IN_SBL 0.0
score RCVD_IN_XBL 0.0
score RCVD_IN_PBL 0.0
However, there was something about this solution that bothered me. What if I wanted to use those blacklisters, just not on me? Well, I discovered another solution that the GoDaddy server supported, as inspired by what the blacklisting site told me: SMTP AUTH.
So I commented out all of those score sets from my local.cf file and went in search of how I can include a way to let SpamAssassin know that my e-mail is legit. If I authenticated using SMTP (which I do) shouldn’t I be able to include that in the header? Well you can!
In order to do so you need to edit /etc/postfix/main.conf and have it include the line:
smtpd_sasl_authenticated_header = yes
Hopefully near the other places with the prefix smtpd_sasl_*. I discovered I had to ‘yank’ (yy) the line and paste (p) [for the vim text editor] it into the line below and then edit it to maintain that weird blue marker at the end. That’s probably a good idea.
As soon as I did that my SpamAssassin blockage problems were over!
I hope I have helped you in your quest for SpamAssassin mastering