SpamBlocker2.1 available now

Got it fixed! Now all sites can receive email. This is what I did...

I followed instructions given by smtalk, it did not work because I am running dovecot. So I got the hint from this thread:

http://www.directadmin.com/forum/showthread.php?t=11539

because I had the same error: "failed to create directories for /var/spool/virtual/domain.tld: Permission denied"

So I re-patch my exim.conf following the instructions given here:

http://help.directadmin.com/item.php?id=51

As soon as I re-patched exim.conf and restart exim, bingo, I got the emails flushing in :)

Now I need to try SpamBlocker2 to see how much spam it can block - hopefully not blocking any legitimate email.
 
Just follow the above link for the instructions. Here is the link again:

http://help.directadmin.com/item.php?id=51

If you run dovecot, then re-patch your exim.conf; if not, then ignore that part. Restart exim and the SpamBlocker2 will do the work for you.

To test it live, put a site domain hosted on your server (has to be one of your own sites) in the blacklist_domains file in /etc/virtual and make sure the same domain is not in the whitelist_domains and then try to send to another email address of yours (this one better not hosted on the same server) from this test email address/domain. If you receive a "Mail delivery failed..." message at your tested blocked email address, that means it works in blocking that email - to unblock it, just remove your test domain from the blacklist_domains file or add it back to whitelist_domains file.

As Jeff suggests in the exim.conf file, you need to edit anywhere it says example.com to customize it to your case so that legitimate senders can go and send request to put their email/domain in your whitelist files. Jeff's sample page use email to receive this request. I modified it and use a php contact form to receive the unblock request. See here:

http://www.selfwebhosting.ws/emailblocked.php

Hope you get yours working!
 
Last edited:
Looking at what smtalk suggests above, I think I screwed up at chmod 755 exim.pl - somehow I thought it could be set for 751 - would this make the difference?
Probably not; I just checked on two of my servers and it's:
Code:
-rw-r--r--  1 root root 6501 Apr 25 22:53 /etc/exim.pl
Jeff
 
I modified it and use a php contact form to receive the unblock request. See here:

http://www.selfwebhosting.ws/emailblocked.php
Nice page, Aubrey. The reason I didn't use a form is that I want to get the email headers from the address being blocked, so I can whitelist by server rather than by email address. Saves having to block more than once if the emails being blocked are all from (for example) one company.

Jeff
 
Exactly what wget line are you using, kanary? Remember what I wrote in my other reply to your other post? If you're getting those resolution errors you may not have DNS set up correctly on your server.

Jeff
 
Probably not; I just checked on two of my servers and it's:
Code:
-rw-r--r--  1 root root 6501 Apr 25 22:53 /etc/exim.pl
Jeff

You are right, Jeff! It was not the permission setting for exim.pl - it was the settings for /var/spool and other folders. Eventually I corrected all permission settings according to the following commands that smtalk told me:

Code:
cd /usr/local/directadmin/scripts
./set_permissions.sh all

So everything is working fine now. And after this I got the SpamBlocker2 installed and is working. I tested it live by intentionally block one of my own email and it worked.

There is one problem remaining... it is the fact that I still have to reboot the server daily. The server hangs on heavy load. I thought SpamBlocker2 can reduce the load by blocking spam straight. It does not seem to help much or I have not set up something right.

What should I do to reduce to the need to have to reboot the server on daily basis?
 
How do you know the problem is email?

usually when a server hangs it's because it's run out of both memory and swap memory.

Check the output of your top command regularly to see if you can catch it happening.

Or run a copy of the first x lines of top to your email address every five minutes, and look at the last email you get before the server hangs.

Jeff
 
Back
Top