da-popb4smtp recording negative bytes for large dovecot logging

Version 1.44

Bugfix
Finished

If a User is connected for a long time, or simply downloads a very large amount of bandwidth in a given session, the da-popb4smtp may record a negative number if the byte are too large for the given number type. Sample log entry: Aug 17 01:56:02 box dovecot[3026]: imap(user@domain.com): Disconnected: Disconnected in IDLE in=759446 out=2347246624 Which would end up logging the following in the log: /etc/virtual/domain.com/dovecot.bytes -2146724203=type=imap&inbound=759446&outbound=2147483647&email=user@domain.com&log_time=1376718962 note the negative sign. The value on the left was an "unsigned long", which wasn't large enough to hold inbound+outbound, thus flipped negative. Solution: unsigned long long so it can hold a larger value.

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