Prevent > 1000 email threshold warning for 1 user

Richard G

Verified User
Joined
Jul 6, 2008
Messages
14,193
Location
Maastricht
We got a user which always sends more then 1000 mails, but less then 2000 normally or at least less then 2500 in any case.

So every couple of days we get a mail from DA like this:
A new message or response with subject:

Warning: 1863 emails have been sent yesterday by ********
etcetera.

Is there a possibility to change this notice somewhere for 1 user? I know it's possible to limit the amount of mails, but is it also possible to change this warning for 1 user?
 
Are you referring to these files?
Code:
ls -al /etc/virtual/limit*
If so, then create a file at
Code:
/etc/virtual/limit_USERNAME
Jeff
 
He means the warning email it sends, every time the limit it reached, he wants to turn off the notifications for a certain user(s)
 
@Peter: Almost correct.
he wants to turn off the notifications for a certain user(s)
Not quite. I want to raise them, so I only get a notification for a certain user if his mails exceeds 2500 mails a day.
If that is not possible, I might like a way to turn off the notifications for 1 user.

@Jeff:
If I put a limit in /etc/virtual/limit_USERNAME for lets say 2500. Will this also affect notifications set at 1000 by DA?
 
If I put a limit in /etc/virtual/limit_USERNAME for lets say 2500. Will this also affect notifications set at 1000 by DA?
I would assume limit_user is looked for first in exim.pl, so, no, I wouldn't think so. I have some users set with 1k+ and my default limit is 250.
 
Last edited:
I have some users set with 1k+ and my default limit is 250.
So did you disable the notifications completely? Or do you get a notification every time a user sends out more then 250 emails?
 
I hope so. If it's not possible it might be a nice feature request, because I don't think it's wise to turn of notification completely.
 
Hello,

1) Ensure you've all got exim.pl version 13, which has the most recent code:
Code:
wget -O /etc/exim.pl http://files.directadmin.com/services/exim.pl
/etc/init.d/exim restart
2) If you override the /etc/virtual/limit file with a per-DA-User limit, eg:
Code:
echo 2000 > /etc/virtual/limit_[B]fred[/B]
this should also set the notification to 2000. Make sure you're also using the latest version of DA.

3) The fact that it says "emails have been sent yesterday by..) would lead me to believe that something (likely the exim.pl) is not up to date.
The newest versions have notifications within 1 minute of the limit being reached.

4) If the limit (either /etc/virtual/limit_username and /etc/virtual/limit) cannot be read, or the used file has a limit of 0, then DA will set the notification to 1000.
Any other value, will be the new notification limit. limit_username will trump the global /etc/virtual/limit.

5) For anyone who wants, there is also a per-email limit, which can even be set on a per-email basis within DA's interface:
http://www.directadmin.com/features.php?id=1373

It just needs to be turned on in the directadmin.conf:
Code:
user_can_set_email_limit=1
The global default for per-email limits can be set with:
Code:
echo 50 > /etc/virtual/user_limit
with the "user_limit" text exactly as shown (no text swap).
The actual email limit for a specific account, if you override it for an email user, will be stored in /etc/virtual/domain.com/limit/user.

John
 
Thank you very much. Just have some questions about one thing.

The fact that it says "emails have been sent yesterday by..) would lead me to believe that something (likely the exim.pl) is not up to date.
The newest versions have notifications within 1 minute of the limit being reached.
Are you sure that it should read "newest versions" (which are more then 1 version) or should this read "the latest version"?
Because as it is written now, in that case something must be not working as designed, because I already have exim.pl version 12 and exim 4.80.1 on that system with the newest DA. Everything I got is running the newest version.
I know there is a version 13 of exim.pl but since you say "versions" and not "version" I would expect this to work on version 12 too.
Ofcourse this is without having set any limits yet.

And at this point, it looks like only a nightly cronjob is doing a total count and sending the notification that xxxx mails are send, causing the "yesterday" in the notification.
 
Last edited:
Check for:
Code:
ls -la /etc/virtual/mail_task.queue
which is created by version 12+ (which should work ok)
Version 13 will better prevent the duplicate counting of email retries.


If the mail_task.queue file exist, then the dataskq isn't processing it.
Looking at the versions system, this should have happened in 1.38.0.

Also confirm:
Code:
cd /usr/local/directadmin
./directadmin c | grep mailtaskqueue
John
 
Well... version 12 did not create the mail_task.queue neither did version 13 which I installed last night:
Code:
#ls -la /etc/virtual/mail_task.queue
ls: cannot access /etc/virtual/mail_task.queue: No such file or directory
Neither is it present on any of our other servers, which also were running version 12 and now version 13.

Code:
/usr/local/directadmin]# ./directadmin c | grep mailtaskqueue
mailtaskqueue=/etc/virtual/mail_task.queue
So this looks good, but the mail_task.queue is not created.

All servers are up2date and running Centos 6 64bit.
 
Hello,

Sorry for the confusion, yes, the mail_task.queue is only created if something happens.
Also, the newer DA binaries will read it and delete it within 1 minute.
My previous email was just a check to see if a mail_task.queue was sitting there and not being processed.
If you've got the most recent version of DA, then you're probably fine.

John
 
Tried it.
Unfortunately, also emails from webshops etc. are counted. If the limit is past, then the customer will get error notices, which won't point to a kind of block, so he thinks something is wrong (error he got was: unroutable adres).
He send about 1400 messages, but including his webshop and confirmation emails and such, there were over 6000.

Next to that, I thought that the leftover emails would get into the mail queue for the next day, which isn't the case.
So it's a real email limit.
So I disabled it again and problems were solved. Maybe I will set a limit of 15000 for that user, he should be fine.
 
Back
Top