Number of email deliveries in all stats

Version 1.37.0


Since the bandwidth.tally already knows how many emails a User has delivered (both incoming and outgoing), we've now added this number to the user.usage file, and it shows up in all stats levels. New user.usage values: email_deliveries=821 email_deliveries_incoming=819 email_deliveries_outgoing=2 Note that email_deliveries can be higher than the number of the incoming and outgoing, as any bandwidth.tally rows that do not specify incoming or outgoing are assumed to be "email", but we don't know which direction the email was going (mainly only applies to old files that don't log this info) A new row called "Email Deliveries" will show the number in the usage column, and for User Level stats, the "Maximum Usage" column will show either unlimited, or the number, based on the contents of the /etc/virtual/limit file. The Reseller/Admin levels won't show the value of the /etc/virtual/limit file because it's a per User limit, and at Reseller/Admin stats levels, it's counting the sum of all Users, so the number would be confusing. Note the limit file's value for unlimited is 0. During the tally, a check is also done on the daily count of email_deliveries_outgoing for the previous day's stats. If the limit is exceeded, a warning is added to all logs (system.log, errortaskq.log, security.log). If the limit is 0 (unlimited), then DA will throw the warning at 1000 email sends (outgoing). Note that the "Deliveries" count is for both inbound and outbound emails, but the /etc/virtual/limit file is only for an outbound cap. That means the above check won't be entirely accurate, hence it's just a background log. Added code into: scripts/ echo "0=type=timestamp&time=`date +%s`" >> $USERS/$U_NAME/bandwidth.tally before the /etc/virtual/usage/user.bytes is dumped into the bandwidth.tally so that the emails don't end up on the day before they were sent. Else, the number of deliveries for "yesterday" will always be 0, and 2 days ago would be the actual total... and the above limit check would be looking at 0 all the time, which would be pointless. More info on the limit file: If you have an older exim.conf and, you may need to update these files to get properly working stats: *** If you update your exim.conf and are running dovecot, don't forget to repatch! Same goes for SpamAssassin, if the exim.conf is updated, re-enable SpamAssassin in the exim.conf Added a notification to all Admin's of a User's mass emailings. The User will also be notified of his limit being hit. This will be done if the value: notify_on_mass_emailing=1 is set (default to 1, internally, so doesn't exist in your directadmin.conf, but is set to 1) If you wish to disable this notification, set: notify_on_mass_emailing=0 in the directadmin.conf. As well, a new option will be enabled by default to include the User in the notice: notify_user_on_mass_emailing=1 Setting this value to 0 will prevent your Users from getting the notice. Note that if notify_on_mass_emailing=0 is set, then notify_user_on_mass_emailing=1 will not have any effect (Nobody will get anything)

Try DirectAdmin with a 30-day money back guarantee!