warning message for user account space not send

Mangas23

Verified User
Joined
Aug 31, 2006
Messages
104
Hello, I've problem:
When a user reach his account space limit (1000Mo for example) no message send to him. Package for user have disk space limit but no bandwitch limit
Someone can help me ?
 
Hello,

Check results for:

Code:
grep sentwarning /usr/local/directadmin/data/users/<USERNAME>/user.conf

Replace <USERNAME> with real username, who did not recieve the warning message.
 
Hello,
no result when I do command.
And when I check file I don't see it.
 
Code:
stat /usr/local/directadmin/data/users/<USERNAME>/user.conf

Replace <USERNAME> with real username and post here full code as you use it in shell and its results.
 
result:

stat /usr/local/directadmin/data/users/testme/user.conf

File: `/usr/local/directadmin/data/users/testme/user.conf'
Size: 684 Blocks: 8 IO Block: 4096 fichier régulier
Device: 902h/2306d Inode: 13107714 Links: 1
Access: (0600/-rw-------) Uid: ( 101/diradmin) Gid: ( 101/diradmin)
Access: 2011-04-05 03:36:19.000000000 -0400
Modify: 2011-04-05 03:11:26.000000000 -0400
Change: 2011-04-05 03:11:26.000000000 -0400
 
Thus file exists.

And when I check file I don't see it.

Probably I missreaded this. You don't see what: the file or the variable?

Is there in directadmin panel a ticket with warnings about the user overusage?

When a user reach his account space limit (1000Mo for example) no message send to him

Does admin receive such messages? Or nobody gets it?

If you send a message via directadmin mail system, does it arrive into user's mailbox? Is that mailbox hosted on the same server with directadmin?
 
I don't see variable, sorry ;)
Nobody get warning message, admin and user.
Mailbox are on same server, and when I send message with reseller panel to this user, it's working with and without "only mail" selected.
 
Does directadmin create a ticket for the fact of overusage? If not, so none mail would be sent. If it does create a ticket, and none message is sent, you should start with analyzing directadmin and exim logs.

The variable should appear automatically on the fact of overusage, if I'm not mistaken about how it gets into the user.conf. Anyway, it would be

Code:
sentwarning=yes

if warning was sent. If you don't get it, so I can suppose either no overusage is detected, or no tally is running.
 
Last edited:
I see no ticket, so I don't receive mail. But why ticket not created, I don't know and see nothing in log.
Can I launch manual command to verify quota and send ticket to user if needed?
 
Did user actually exceed the quota?

For disk quota:

Code:
echo "action=quotatally&value=all" >> /usr/local/directadmin/data/task.queue

For bandwidth:

Code:
echo "action=bandwidthtally&value=all" >> /usr/local/directadmin/data/task.queue

These commands would update disk and bandwidth usage, I'm not sure, would it send any warnings.
 
I test it and no change, quota updated but no warning :(
I check directadmin errorlog:

2011:04:05-04:12:53: removing old lock: /var/log/proftpd/87.98.251.121.bytes.lock (age: 3747 seconds)
2011:04:05-04:12:53: Can't open /var/log/proftpd/87.98.251.121.bytes.copy for writing
2011:04:05-04:12:53: File ./data/users/testme/user.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:13:00: Socket write error: fd is connected to a pipe or socket whose reading end is closed. When this happens the writing process will also receive a SIG_PIPE signal. (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)
2011:04:05-04:18:14: Socket write error: fd is connected to a pipe or socket whose reading end is closed. When this happens the writing process will also receive a SIG_PIPE signal. (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)
2011:04:05-04:20:18: Socket write error: Unknown error
2011:04:05-04:38:37: Socket write error: Unknown error
2011:04:05-04:43:27: File ./data/users/admin/user.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:43:27: File ./data/users/admin/reseller.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:43:27: ConfigFile::writeFile(./data/users/admin/reseller.allocation) : Timestamp from when it was read is different, overwriting anyway
2011:04:05-04:43:27: File ./data/admin/admin.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:43:27: ConfigFile::writeFile(./data/admin/admin.allocation) : Timestamp from when it was read is different, overwriting anyway
2011:04:05-04:49:57: Socket write error: Unknown error
2011:04:05-04:51:55: Socket write error: Unknown error
2011:04:05-04:52:11: Socket write error: Unknown error
2011:04:05-04:52:30: File ./data/users/admin/user.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:52:30: File ./data/users/admin/reseller.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:52:30: ConfigFile::writeFile(./data/users/admin/reseller.allocation) : Timestamp from when it was read is different, overwriting anyway
2011:04:05-04:52:30: File ./data/admin/admin.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:52:30: ConfigFile::writeFile(./data/admin/admin.allocation) : Timestamp from when it was read is different, overwriting anyway
2011:04:05-04:52:34: File ./data/users/admin/user.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:52:34: File ./data/users/admin/reseller.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:52:34: ConfigFile::writeFile(./data/users/admin/reseller.allocation) : Timestamp from when it was read is different, overwriting anyway
2011:04:05-04:52:34: File ./data/admin/admin.usage has been written to after this process read it. Not going to overwrite it.
2011:04:05-04:52:34: ConfigFile::writeFile(./data/admin/admin.allocation) : Timestamp from when it was read is different, overwriting anyway
2011:04:05-04:53:51: Socket write error: Unknown error
2011:04:05-04:54:02: Socket write error: Unknown error
2011:04:05-04:58:53: Socket write error: Unknown error
2011:04:05-05:00:08: Socket write error: Unknown error

But I don't think that is the problem.
 
OK, you might need to repeat the steps with command, I've posted above. But don't wait until they will be done with cron, do it in debug mode:

Code:
# echo "action=quotatally&value=all" >> /usr/local/directadmin/data/task.queue
# echo "action=bandwidthtally&value=all" >> /usr/local/directadmin/data/task.queue
# /usr/local/directadmin/dataskq d800
 
I make it and no change.
I alway see this error in directadmin/error.log:

2011:04:05-05:13:05: Socket write error: Unknown error
2011:04:05-05:14:31: Socket write error: Unknown error
2011:04:05-05:14:53: Socket write error: Unknown error
2011:04:05-05:15:06: Socket write error: Unknown error
2011:04:05-05:15:24: Socket write error: Unknown error
2011:04:05-05:16:34: Socket write error: Unknown error
2011:04:05-05:16:44: Socket write error: Unknown error
2011:04:05-05:16:54: Socket write error: Unknown error
2011:04:05-05:17:06: Socket write error: Unknown error
 
Tally User testme Begin: mask 20
/home/testme/Maildir is 106496 : realtotal: 106496
/home/testme/imap is 69632 : realtotal: 176128
/home/testme/.spamassassin/spam is 0 : total: 0 realtotal: 176128
/home/testme/.spamassassin/user_spam is 0 : total: 0 realtotal: 176128
/var/spool/virtual/test.fr is 0 : total: 0 realtotal: 176128
Majordomo usage for /etc/virtual/test.fr/majordomo : 0
databases for testme
Counting found totals for testme
total bw is 0.000000 from (null) (long long: 0)
bw in meg: 0.000000
meg converted to a string: 0.0000
spaceused: 11534336.000000 (just quota)
spaceused: 11534336.000000 (add dbtotal 0)
spaceused: 11534336.000000 (add emltotal 0) (fyi: realemltotal: 176128)
spaceused: 11534336.000000 (add apachetotal 0)
spaceused: 11534336.000000 (add anonftptotal 0)
spaceused, in meg: 11.000000
meg to temp: 11.0
user.usage quota: 11.0 actual: 11.000000 (should match)
user.uagae email_quota: 176128 actual: 176128 (should match)
Tally User testme Complete

For test I limit this account at 10Meg space limit.
But all look like good.
 
What color (green, yellow, red) is disk quota and usage in users list for the account?

Try setting sentwarning to no to see if the email get's sent. And repeat actions.

sentwarning=no
 
red 11meg / limit 10meg

And I put sentwarning=no in /usr/local/directadmin/data/users/<USERNAME>/user.conf ?
 
same problem :(
user are overbw and overquota but no message send.
in /usr/local/directadmin/data/users/testme/user.conf sentwarning not changing to yes.
And just the same error Socket write error: Unknown error in directadmin log

I don't understand.
 
That might be related. I'm not sure, what can cause a socket error of that kind, and do not have a ready answer or a solution. You might want to search these forums to find some information about the error. Some time ago, I've taken part in similar discussion. But I don't remember, if we managed to find a good and working solution.
 
Back
Top