Plugin: SMTP Limiter

i tried everything, safemod is/was turned off.

i ended up rebuilding custombuild and the error disappeared
 
This response simply explains the error message. Turning off safe mode can compromise the security level on your server.

You should discuss this issue with the author of the plugin.

There's a program running under the user who's UID is 100, but the file /etc/virtual/limit is owned by the user who's UID is 501. This is not compatible with safe mode and the way you've implemented PHP.

Jeff
 
Sorry, guys.
It seems bundled exim.pl was still incompatible with actual DirectAdmin's exim.conf.
Please download latest version (0.943) if someone still need it.
Hope, i finally fixed that issue.
 
Last edited:
I install this plugin. In the directadmin, admin section, I see message count of all users on the server. But message count not clears up every day - message only counting and writing it into the "today messages". On the "yesterday messages" - always 0.

And the size of the messages not counting at all.

Set everything on instruction, checked twice.

Please help, thanks.
 
Make sure you have following line in your crontab:
0 0 * * * root /usr/local/directadmin/plugins/SMTP_Limiter/scripts/reset_limits.sh
 
Make sure you have following line in your crontab:
0 0 * * * root /usr/local/directadmin/plugins/SMTP_Limiter/scripts/reset_limits.sh

Thanks!:)
I'm run this script, messages count for today - 0, and for yesterday - 0... I hope, at 12pm all work fine.

PS Count of the size not working at all... but this function not seriously needed.
 
Hello!
I have little problem with smtp limiter.

It block sending mail from mail function in php, but i can send mail from webmail (squirremail and roundcube). How block sending mail from webmails?
 
Make sure you have "set acl_c0 = ..." line under
accept hosts = +relay_hosts
and under every accept statement where "authenticated = *" is used.
 
Hi ClayRabbit,

I just tested out and found the followings:

1. When SMTP is disabled for a user, php mail is also disabled at the same time but not just SMTP, which is not expected, as this blocks the customer from using webmail or php mail function in their scripts.

2. The "message count" only counts mail sent to a different domain than the sender. Mails sent to another user of the same domain as the sender is not counted.

3. Is the original mail count and daily mail limit function (/etc/virtual/usage/) disabled by the SMTP limiter?

4. How to change the default setting value for new users from "On" to "Off"?

Moreover, is it possible to make the plugin to disable "SMTP" and "ALL MAIL" as separate options? "ALL MAIL" would mean everything including SMTP, php mail, etc.

Thanks!

Anthony ;)
 
I have been busy to try to make this work with the newest exim version but I keep getting problems with some combinations.

The I moved back to the original exim.pl and exim.conf and changed a few lines in exim.pl. I want to limit all my servers in sending mail and only allow a few users to send more (or less).

So the /etc/virtual/limit file is for all users
And the /etc/_virtual/limit_DAaccount is the exception. Be aware to change owner of that file to mail.mail.

This is very simple and it works for me now.

This is how I did that (in check_limits function):
my $name="";
my $email_limit = 0;
$name = getpwuid($uid);

if (open (LIMIT, "/etc/virtual/limit_$name"))
{
$email_limit = int(<LIMIT>);
close(LIMIT);
}

if ($email_limit <= 0)
{
open (LIMIT, "/etc/virtual/limit");
$email_limit = int(<LIMIT>);
close(LIMIT);
}
 
nieuwhier,

I also try to figure how to implement using latest exim but still no success.

1) Do you still used/install the plugin?
2) Do you edit the exim.conf in the 1st post?
 
Is my response still applicable? Yes. I've not released SpamBlocker3 as stable, and DirectAdmin won't use it until it's marked as stable, because I continue to update it.

Jeff
 
I'm interested in use this plugin too, but right now it seems not to work or at least not for me.
Is there any other way to limit smtp in a per user basis mode?.

Regards
 
hello,
i had to do updates and newly build all new.


then smtp-limiter were giving these errors ...


Warning: file_get_contents(): SAFE MODE Restriction in effect. The script whose uid is 100 is not allowed to access /etc/virtual/limit owned by uid 501 in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 133 Warning: file_get_contents(/etc/virtual/limit): failed to open stream: Inappropriate ioctl for device in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 133


Warning: file(): SAFE MODE Restriction in effect. The script whose uid is 100 is not allowed to access /etc/passwd owned by uid 0 in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 145 Warning: file(/etc/passwd): failed to open stream: Inappropriate ioctl for device in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 145 Warning: Invalid argument supplied for foreach() in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 148 Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 100 is not allowed to access /etc/virtual/.smtp_usage owned by uid 501 in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 157 Warning: opendir(/etc/virtual/.smtp_usage): failed to open dir: Inappropriate ioctl for device in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 157 Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 100 is not allowed to access /etc/virtual/.smtp_deny owned by uid 8 in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 158 Warning: opendir(/etc/virtual/.smtp_deny): failed to open dir: Inappropriate ioctl for device in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 158 Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 100 is not allowed to access /etc/virtual/.smtp_limit owned by uid 501 in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 159 Warning: opendir(/etc/virtual/.smtp_limit): failed to open dir: Inappropriate ioctl for device in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 159


can somebody help me to solve this?

regards,
mark

Hi Mark,


I have same problem how can i fix this have you any idea?

Warning: file(): SAFE MODE Restriction in effect. The script whose uid is 105 is not allowed to access /etc/passwd owned by uid 0 in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 146 Warning: file(/etc/passwd): failed to open stream: Inappropriate ioctl for device in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 146 Warning: Invalid argument supplied for foreach() in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 149 Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 105 is not allowed to access /etc/virtual/.smtp_usage owned by uid 0 in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 158 Warning: opendir(/etc/virtual/.smtp_usage): failed to open dir: Inappropriate ioctl for device in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 158 Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 105 is not allowed to access /etc/virtual/.smtp_deny owned by uid 8 in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 159 Warning: opendir(/etc/virtual/.smtp_deny): failed to open dir: Inappropriate ioctl for device in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 159 Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 105 is not allowed to access /etc/virtual/.smtp_limit owned by uid 1002 in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 160 Warning: opendir(/etc/virtual/.smtp_limit): failed to open dir: Inappropriate ioctl for device in /usr/local/directadmin/plugins/SMTP_Limiter/admin/index.html on line 160
 
Back
Top