Per-Email send limit (SKINS)

Version 1.42

Feature
Finished

Relates to: http://directadmin.com/features.php?id=1246 http://www.directadmin.com/features.php?id=1372 Users can set a per-email send limit via the interface. Requires exim.pl version 10. By default (for now) this option is disabled: user_can_set_email_limit=0 To enable it, set: user_can_set_email_limit=1 Note that regardless of the limit set, all email account sends are still limited by the DA-User limit, one of: /etc/virtual/limit /etc/virtual/limit_username For example, the DA user has a limit of 50 in: /etc/virtual/limit_username. so 10 email accounts, each with a per-email limit of 10 can still only send 50 emails total among all of them, not 100. example: /etc/virtual/limit_fred This also only applies to smtp sends. If emails are sent via command line, the per-email limit will not be used, but the per-DA limit will be used. If user_can_set_email_limit=1 is set, then on the "E-Mail Accounts" page, you'll see a new column called: Sent which will show the number of emails sent today. If a limit is set for that User, the limit is then displayed, eg: 2 / 5 if no per-email limit is set, but a global per-email is set in (exact name... perhaps email_limit would have been less confusing, too late now): /etc/virtual/user_limit then that limit will be shown, eg: 2 / 50 If no limit is set... and no user_limit is set, then no limit will be shown, eg: 2 This is because it's not "unlimited" since the cap of /etc/virtual/limit /etc/virtual/limit_username will still apply, so saying it's "unlimited" would be confusing.. and the limit in these per-DA User limit files are the total for all Users, so saying that the email-limit is the DA-User limit is not usually true, and would be confusing. If /etc/virtual/user_limit is missing, then DA will fallback to use /etc/virtual/limit instead. Feature will save send/limit into the usage.cache, if that feature is enabled. Related option (default): max_per_email_send_limit=-1 The -1 implies that the max value that can be set by a User reverts to the global default in: /etc/virtual/user_limit If you set max_per_email_send_limit=0, this overrides the global default and allows unlimited messages to be sent (not recommended) Any number for max_per_email_send_limit above 0 will be the number of sends allowed. Remember that local deliveries do not count in the send count. Only remote deliveries are counted, since only they use any bandwidth. ------------------------------------ SKINS user/email/pop.html New "create email" link: <a href="HTM_EMAIL_POP_CREATE?DOMAIN=|DOMAIN|&DEFAULT_POP_QUOTA=|DEFAULT_POP_QUOTA|&USER_CAN_SET_SEND_LIMIT=|USER_CAN_SET_SEND_LIMIT|&GLOBAL_PER_EMAIL_LIMIT=|GLOBAL_PER_EMAIL_LIMIT|">Create mail account</a><br> user/email/pop_create.html new form item: |*if USER_CAN_SET_SEND_LIMIT="yes"| <tr><td class=list>Send Limit</td><td class=list><input type=text name=limit size=16 value=""> Zero is unlimited. Blank will default to |GLOBAL_PER_EMAIL_LIMIT|</td></tr> |*endif| user/email/pop_modify.html new form item: |?SEND_LIMIT_VALUE=| |*if SEND_LIMIT!="no"||?SEND_LIMIT_VALUE=`SEND_LIMIT`||*endif| |*if USER_CAN_SET_SEND_LIMIT="yes"| <tr><td class=list>Send Limit</td><td class=list><input type=text name=limit size=16 value="|SEND_LIMIT_VALUE|"> Zero is unlimited. Blank will default to |GLOBAL_PER_EMAIL_LIMIT|</td></tr> |*endif|

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