User or mail can get their dovecot quotas with directadmin suid mode

Version 1.55


Not likely a feature for most people (at the moment), but if you set: echo 1 > /root/.suid_directadmin and set permission: ./directadmin p it will set DA to be: -rwsr-xr-x 1 root diradmin This is used for per-User calls.. at the moment, just two options (existing: ./directadmin --DocumentRoot) but now it also adds: ./directadmin which can be called as root, mail or a User. If called as a User, it will ensure that belongs to the UID caller (not likely a common usage, but is an option since suid was needed anyway for 'mail') If root or mail, it will work for any email that exists the system. If the email is valid, dovecot quotas work, then it will output something like: 18237:102400 which would be in KB, so the above example, the account is using about 20Meg of 100Meg. You *MUST* check the exit code of the directadmin call. If it's not 0, then ignore this directadmin result. If the account in question has unlimited dovecot quotas, then the output will be: 0:0 This feature uses the doveadm quota call to get the info, as dovecot is going to be what will accept/reject the email anyway. ---- The purpose of this feature is to allow exim the ability to block an inbound email at smtp-time via ACL, rather than accepting the message, and having it bounce after the dovecot lmtp delivery rejects it. The ACL in question does not yet exist. If it will exist, it wouldn't be for a while after this version of DirectAdmin have been released.

Interested to try DirectAdmin? Get a 30-day Free Trial!