Plugin: SMTP Limiter

i dont know whats wrong. i follow all the step and still not able to make it work.

- it the message counting real-time?
- does it support counting squirrelmail email?
- is there any logs showing it work?

lastly, can someone look into my configuration?
 
how to do it ?

Replace your exim.pl with exim.pl included in archive (inside 'scripts' folder). After installation (2) it's location will be /usr/local/directadmin/plugins/SMTP_Limiter/scripts/exim.pl
 
Installed this nice plugin in most recent DA version on centos 5.1 with exim 4.6 and dovecot 1.0.10.

Works as a charm....

Good work!

EDIT: Tested it on another server with the spamblocker 2.0 exim.conf. Email are refused there with the unknown user error.
 
Last edited:
done

For those who want to install this nice plugin:

my centos system:
DirectAdmin 1.31.4
Exim 4.60
vm-Pop3d 1.1.7f-DA-2

after following the installation instructions I can not receive any email, then I have add some functions from the directadmin's exim.pl to the plugin's exim.pl, and it work like a charm! attachment is my current exim.pl.

hope it helps
 

Attachments

Last edited:
I have a problem with permissions. When i try to do something with plugin, i get errors like this:

Warning: fopen(/etc/virtual/.smtp_limit/username): failed to open stream: Permission denied

or the same about /etc/virtual/limit file.

When i change permissions on .smtp_* dirs and limit file to 777 - everything is ok and working. But it`s not good idea to stay with such permissions.

What right permissions is?
All in /etc/virtual owned by mail:mail

System: FreeBSD 5.4-STABLE
 
Last edited:
SMTP_Limiter plugin updated

SMTP_Limiter plugin updated. current version: 0.94, 16.07.2008

Change log:
-----------------
[+] Copy of "User have reached his daily email limit" message now will be sent
to user email (obtained from /usr/local/directadmin/data/users/*/user.conf).
[+] Sender address of "" message now set to "<>" (like mail delivery error
messages).
[!] New functions (save_virtual_user, log_email, log_bandwidth) from actual
DirectAdmin's exim.pl added to bundled exim.pl for compatibility with
DirectAdmin's exim.conf.
 
paniclog

2008-09-01 09:42:41 failed to expand condition "${perl{save_virtual_user}}" for virtual_user router: Undefined subroutine &main::uid_exempt called at /etc/exim.pl line 306, <DOMAINOWNERS> line 102.

??:confused:
 
Code:
2008-09-03 12:42:30 failed to expand condition "${perl{save_virtual_user}}" for virtual_user router: Undefined subroutine &main::uid_exempt called at /etc/exim.pl line 306, <DOMAINOWNERS> line 1.

Super! Any idea ?
 
Make sure that you're using latest version of exim, exim.conf and exim.pl, from DirectAdmin download site (or exim.conf from my site).

Jeff
 
Unfortunately, In the lots of trials it's all the same, would you mind to send me ready files?
Or do you know someone who have ready files of exim.conf and exim.pl 4.67
 
All exim.conf files need to be modified if you're going to use SpamBlocker.

The exim.conf files and exim.pl files can be found here.

Or if you're using (or want to use) the SpamBlocker Version 3 beta, then you can find the exim.conf you need here but you should probably still use the exim.pl file from the DirectAdmin site, as linked above.

DirectAdmin staff offers instructions on updating to the latest non-beta exim.conf and exim.pl files here.

If these don't work for you then you probably need someone to help you with your system.

Jeff
 
I am not sure if I understand this correct;

I am using the SpamBlocker Version 3 beta and want to start using this plugin.

I do understand the exim.con changes; but what exim.pl shoudl I use, the one that I got from the spamblocker version 3(great job jeff) or the one that is mentioned here ?
 
Thanks :D.

The exim.pl file on the DirectAdmin site is known to be the latest version; I copy mine from there whenever I'm notified of a change or that mine doesn't work. I post it strictlly as a convenience; it doesn't change that often. I've never added to exim.pl; if I ever must, I'll ask John to add the code to his version.

Jeff
 
Hmm I tried the exim.pl from the SMTP_limiter directory first.
Then I got an error when receiving mail about unknown function uid_exempt... And indeed it is not in exim.pl

Ok then I use the exim.pl from DirectAdmin;
then I get an error about function find_user and indeed it is not in that exim.pl...

Of course I can mix them but what I read here is that it works with you all without adjustments is that right ?
 
attachment is my current exim.pl.
I used this one and that works.

So for everyone; When you use the DA exim.pl you miss some functions and when you use the exim.pl included in the plugin you also miss some functions.

Itmanvn had them nicely combined and that works.
I am testing it with Exim 4.60 and Spamblocker 3 and clamav.
 
Please pass it on to John in Support so there's one master file. When John has published it please let me know so I can publish it.

Thanks.

Jeff
 
Hi All,

I have this plugin running on several servers now and it looks fine.
However yesterday and today I received some tickets from customer complaining that the reached there limit which is not possible.

When I look into the exim logfile I see messages refused to send because of limit reached. The account name that is mentioned is NOT the account of that customer ?!

I raised the limit to skip this error for now, is there anyone that has this problem also ?

regards,
Michel.
 
Awesome but, problem when receiving mail:

2008-12-02 19:27:14 failed to expand condition "${perl{save_virtual_user}}" for virtual_user router: Undefined subroutine &main::uid_exempt called at /etc/exim.pl line 307, <DOMAINOWNERS> line 128.

2008-12-02 19:27:14 H=web63605.mail.re1.yahoo.com [69.147.97.75] F=<[email protected]> rejected RCPT <[email protected]>:
2008-12-02 19:27:14 1L7Z1m-0002x6-Eo <= [email protected] U=krdorin P=local S=688 T="Top TBDev account details" from <[email protected]> for [email protected]
2008-12-02 19:27:14 H=web63605.mail.re1.yahoo.com [69.147.97.75] incomplete transaction (QUIT) from <[email protected]>


2008-12-02 19:27:16 1L7Z1m-0002x6-Eo => [email protected] F=<[email protected]> R=lookuphost T=remote_smtp S=713 H=c.mx.mail.yahoo.com [216.39.53.3] C="250 ok dirdel"
2008-12-02 19:27:16 1L7Z1m-0002x6-Eo Completed
2008-12-02 19:28:00 H=(hzgah.jazztel.es) [87.223.239.217] F=<[email protected]> rejected RCPT <[email protected]>:
2008-12-02 19:28:00 H=(hzgah.jazztel.es) [87.223.239.217] incomplete transaction (connection lost) from <[email protected]>
2008-12-02 19:28:00 unexpected disconnection while reading SMTP command from (hzgah.jazztel.es) [87.223.239.217]
2008-12-02 19:28:09 failed to expand condition "${perl{save_virtual_user}}" for virtual_user router: Undefined subroutine &main::uid_exempt called at /etc/exim.pl line 307, <DOMAINOWNERS> line 127.

2008-12-02 19:28:09 failed to expand condition "${perl{save_virtual_user}}" for virtual_user router: Undefined subroutine &main::uid_exempt called at /etc/exim.pl line 307, <DOMAINOWNERS> line 254.

2008-12-02 19:28:09 H=dero.heartsotrue.net [66.240.238.113] F=<[email protected]> rejected RCPT <[email protected]>: Unrouteable address
2008-12-02 19:28:09 H=dero.heartsotrue.net [66.240.238.113] incomplete transaction (connection lost) from <[email protected]>
2008-12-02 19:28:09 unexpected disconnection while reading SMTP command from dero.heartsotrue.net [66.240.238.113]

2008-12-02 19:28:17 failed to expand condition "${perl{save_virtual_user}}" for virtual_user router: Undefined subroutine &main::uid_exempt called at /etc/exim.pl line 307, <DOMAINOWNERS> line 128.

2008-12-02 19:28:17 H=web63604.mail.re1.yahoo.com [69.147.97.74] F=<[email protected]> rejected RCPT <[email protected]>:
2008-12-02 19:28:17 H=web63604.mail.re1.yahoo.com [69.147.97.74] incomplete transaction (QUIT) from <[email protected]>



Hmmm ... help ?!?
 
Back
Top