Help needed with Exim ACL

Richard G

Verified User
Joined
Jul 6, 2008
Messages
14,022
Location
Maastricht
I want to block certain botpc's who are always trying to bruteforce.

Now I found this on the internet:
Code:
# vi /etc/exim.conf

acl_smtp_helo = acl_smtp_helo
acl_smtp_helo:

#BEGIN ACL_SMTP_HELO_BLOCK
drop
   condition = ${if eq {$sender_helo_name}{ylmf-pc} {yes}{no}}
   log_message = HELO/EHLO - ylmf-pc blocked
   message = I Nailed You at HELO
accept
#END ACL_SMTP_HELO_BLOCK

Maybe this worked in the past, but if I do this, Exim gives an error that the acl_smtp_helo statement is made twice.
If I remove the upper one, Exim gives an error that the = is missing.

So I have 2 questions:
1.) What is the correct way so this ylmf-pc get's blocked and Exim does not give any errors.
2.) Is there another way (kindlike) so I can enter more of those often occuring computernames if necessary?
 
I just found the solution via google in Spamblocker 4 for exim. :)

Well.... this also gives an error (edit 25).
Starting exim: 2014-11-25 04:10:01 Exim configuration error in line 211 of /etc/exim.conf:
main option "acl_check_helo" unknown

However... maybe it's better to use spamblocker 4 instead of my current exim.conf. Can I replace them without any problems? Or do I have to keep some things in mind?
 
Last edited:
I'm using SB 4 (now 4.3 alpha2) since years (about a month for the latest alpha release) in production without issue, it does work pretty well, i would highly suggest you to switch to SB 4.2 or 4.3 with the new features easy spam fighter and blockcracking (just for 4.3)

Regards
 
Yes that's why I was asking. I was really thinking about going to use SB 4.x. I want to test it on one of the minor servers first.

However, I should be able to put edit 25 in my SB 2.x and use that on one of the main until then. But I get that "main option "acl_check_helo" unknown" notice and I don't understand why it's doing that. I had exim.pl 17 and now even 18, makes no difference.
 
Check also in my file Edit#13; you need to have the code referencing the acl for it to work.

But I'm now recommending DirectAdmin's version for anyone not usingl Dovecot for delivery.

Andrea, does the directAdmin 4.3 file work with Dovecot delivery (to make Sieve work) with settings in CustomBuild, or does it need manual changes?

Thanks.

Jeff
 
Thank you Jeff.
However I had Edit 13 in there, well.... I had this line present:
Code:
acl_smtp_helo = acl_check_helo
That should be enough for only the helo check, or am I mistaken?

With this line present and edit #25 completely present, it's still geving the error I stated "main option "acl_check_helo" unknown".
 
That should be enough; check your spellings and make sure you're Edit#13 section isn't inside any other ACL or conditional.

My only other suggesion would be to compare it line-by-line with the version you're currently using, orlllllllllll to switch entirely.

Jeff
 
I couldn't do anything wrong because I copied and pasted from your spamblocker 4 conf. :)

But your comment pointed me to the solution.
I had pasted everything below where edit #13 was made.

After reading the "inside any other ACL" I looked a bit further and found a "begin acl". Now I put edit 25 below that line and its working as designed now.
As soon as I have a bit more time (I'm a bit busy these days), I will check what I have to do, change things and will convert all 3 servers to spamblocker 4 entirely.

Thank you very much for the help!
 
Probably a good idea to wait until DirectAdmin takes 4.3.3 out of beta and makes it a full working part of CustomBuild.

:)

Jeff
 
Is it fully implemented? In other words do all the other CustomBuild exim.conf settings work in it? I thought they didn't.

Jeff
 
Ok i'm a bit confused here, what i mean by "it is already in CB" is the fact that if you select 4.3 as exim conf version in CB options.conf file, you can install CB 4.3 and install it with any issue (and actually any edit needed aswell).

Richard, i would suggest you to write to John with suggested edits and adds for SB 4.3, i already did aswell. So, everyone will have those addonds as default just updating exim.conf from CB with no need to edit the file once installed:)

Regards
 
I'm sorry. Which suggested edits and adds are you talking about which I have to write to John? Do you mean the 2 for the helo settings, edit #13 and #25?

what i mean by "it is already in CB" is the fact that if you select 4.3 as exim conf version in CB options.conf file
This goes only for CB 2.0. Lots of us are still running CB 1.2 (I'm also on some servers) and thus have to replace the file manually.
 
Sorry Richard, i may have confued another thread where there was suggestion for modification in exim.conf file and i thot was one of your replies :)

I thot that SB4 was already present in CB 1.2 aswell, also, why you're using still that version? Is a needed solution for use, for exmaple, still php 5.2?

Regards
 
In CB 1.2 the old 2.x exim.conf is still installed by default. I was running php 5.3 by the way.

The biggest reason I'm using that version is because although CB 2.0 might be working fine, it's still not officially declared "stable". I was just waiting for either a stable declaration or that I did not see any difficult questions anymore in the support thread.
Next to that it's some work because when I have to convert I have to remove the old mod_ruid2 adjustments so they can be done by CB 2.0 from options.conf.

At this point I've got one new server running on CB 2.0 and it looks fine to me. So I just updated all servers to php 5.4 first.
I'm thinking about setting the other 2 servers to CB 2.0 during Christmas Holidays.
 
Well, if can be useful to you, i do use CB 2 about since it was out and i've never had issue (except with nginx but it was a test on a test box).

Regarding the mod_ruid2, well, it is just to change httpd.conf file and custom virtual_host files, am i wrong? Unless you had additional customizations, you may just rmeove the custom virtual_host files

Regards
 
Yes I have to reverse the httpd.conf and remove httpd-directories.conf and httpd-vhosts.conf from the custom/ap2/conf/extra directorie as far as I know.
Then change to CB 2.0 and install mod_ruid2 again. Might take about 10-15 minutes to doublecheck also.
But I would like to do it at night time so nothing gets disturbed.

When I want to change I presume I can just set custombuild to 2.0 in options.conf and run "./build update" and after that ./build modruid2 and I'm ready, correct?
 
I would suggest to NOT change options.conf that way but to install fresh CB (as suggested in CB guide) but redownload it and customize the options.conf

The files to restore would be in /usr/local/directadmin/data/templates/custom/virtual_host*

Regards
 
Like this you mean?
Code:
cd /usr/local/directadmin
wget http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
./build
 
with that you will not save current custombuild nor remove it

Code:
cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild

Be sure to have latest DirectAdmin version installed aswell.

Regards
 
Back
Top