Emails sent counted as double

Yoshua

Verified User
Joined
Apr 9, 2007
Messages
127
Location
Spain
[BUG] Emails sent counted as double

Hello

Today I discovered that emails sent by users count as double for the limit of daily emails, I created a new account for testing and I have sent only 3 emails from roundcude webmail, in e-mail usage show 3 emails sent but in account daily limit appear as sent 6:

e-mail_usage.png

email_sent.png

Then I made another test sending emails from Thunderbird another 3, this time on e-mail usage shows two sent for every email sent and daily account limit again shows the last three deliveries as twice sent:

e-mail_usage_2.png

email_sent_2.png

For 6 emails sent in total, 3 from roundcube and 3 from Thunderbird, the daily limit showing 12 emails sent.

DirectAdmin Version: 1.47.0
Exim version: 4.85
Exim.pl version: 19-alpha2
Exim config: 4.3.0 with SpamBlocker, BlockCracking and Easy Spam Figther

Thank.
 
Last edited:
Hello,

If it should be considered as a bug, the thread is now moved to a proper sub-forum.

Sorry, I was not sure if it was a bug or just a temporary problem on one of my servers, I have not yet tested in other servers with the same configuration to verify if it was mine or directadmin problem, so I put it here (email subforum) first to see if some other user could verify that the same problem was happening. Thanks for move it to the correct forum, today I will try to check this problem on another server.


Thanks Alex.


A Greeting.
 
Sorry, I was not sure if it was a bug or just a temporary problem on one of my servers, I have not yet tested in other servers with the same configuration to verify if it was mine or directadmin problem, so I put it here (email subforum) first to see if some other user could verify that the same problem was happening. Thanks for move it to the correct forum, today I will try to check this problem on another server.


Thanks Alex.


A Greeting.

Hi,

I can confirm the same problem in a different server with the same versions.

Thanks
 
I've tested with:

Exim: 4.85
exim.pl VERSION=19-alpha2
exim.conf 4.3.3, beta-1DirectAdmin v.1.47.0
BlockCracking: no
Easy Spam Fighter yes
SpamAssassin: 3.4.0



All sent emails were counted once, i.e. correct.

How many recipients do you have in each email?
 
I've tested with:

Exim: 4.85
exim.pl VERSION=19-alpha2
exim.conf 4.3.3, beta-1DirectAdmin v.1.47.0
BlockCracking: no
Easy Spam Fighter yes
SpamAssassin: 3.4.0



All sent emails were counted once, i.e. correct.

How many recipients do you have in each email?

Hello, one recipient in all cases sent with plain text (no html), my settings are the same as yours (latest releases from custombuild 2), except Blockcraking I also have enabled.

Thank Alex.


EDIT: I tested on another server that is not updated to the latest versions and same thing happens, emails sent from roundcube but appears as one in usage email but in the daily limit shown double and if I send an email from mail client (Thunderbird) in email usage shows two entries, one with and one without the ID, also count as double in the daily limit.

Exim version 4.85 #3 built 25-Mar-2015
SpamAssassin Server version 3.4.0
ClamAV 0.98.6/20346
Exim.pl VERSION=19-alpha2
Installed version of exim.conf: 4.3.2
Installed version of BlockCracking: 1.1
Installed version of Easy Spam Fighter: 1.6
dovecot 2.2.16
Installed version of dovecot.conf: 0.1
Centos 6.6
DA 1.47.0

EDIT 2: Now I tested on another server with an older configuration and in this case no problem happens, every email sent, either from Roundcube or from Thunderbird, only displayed in email usage as one and the daily limit correct number is displayed of emails sent, in this case the configuration is as follows:

Exim version 4.84 #3 built 10-Oct-2014
SpamAssassin Server version 3.4.0
ClamAV 0.98.5/20346
Exim.pl VERSION=17
Exim.conf: 4.2.3
dovecot 2.2.15
Centos 6.6
DA 1.46.3

EDIT 3: More testing in this last server, I upgraded one to one service and tested at each update if the error occurred, for now is not happening:

Dovecot to the latest version.
Exim to the latest version.
Exim.pl tested with version 18 and 19-alpha2.

Tonight I will make other updates that now I can not do, new exim.conf, Exim ESF, Exim BC and DirectAdmin.

Seeing this, I doubt the problem is the new exim.conf, ESF or BC, I suspect that the problem appears when I upgrade to the latest version of DirectAdmin.
 
Last edited:
Seeing this, I doubt the problem is the new exim.conf, ESF or BC, I suspect that the problem appears when I upgrade to the latest version of DirectAdmin.
I doubt that it is the Directadmin version.

I've got exim.pl alpha 2 and no problems. But I also have exim.conf version 4.3.0 alpha-3, which is an older exim.conf then you have.
I also run exim 4.85, dovecot 2.2.16 and DA 1.47.0 so that's all the same.
 
Hello,Thanks for the reports.Luckily, I was able to duplicate this issue, although it did take a decent amount of time to track it down.I'm not 100% sure what exim is up to, but the exim.pl "check_limits" function was being called twice, thus the double logging.This is triggered from the "lookuphost", so my guess is that other areas of exim will call this function, quite possibly ESF or BC (eg: SPF query could use the lookuphost, although not literally called)I did test disabling ESF, and it was still double, but that is beside the point.. exim should be able to call it if it wants to.In any case, I was able to sort out that the 1st call is the one we were not expecting, and luckly it has a "tell", in that it does not include any message_id variable.Knowing this, I've created version 20 of the exim.pl, which allows any message already in the queue, that is trying to do a lookup.. and which does not have a message ID to go ahead.This should still be safe, as any actual email will have a message_id, so those will still be scrutinized normally.Also, the newer SB versions check the limits in the ACL now, and not only in the lookuphost, so even if the "blank message_id" logic is incorrect, they'll not be able to exceed the limit, as the code used to check the limit in the ACL is different.Anyway, I've added the file here if you'd like to try it out, eg:
Code:
wget -O /etc/exim.pl //files1.directadmin.com/services/exim.pl.20
Please report back if it does work, does not work, or you notice it causes other issues.Once we're happy it's good, then I'll change it in the versions.txt for the 4.x SB versions.John
 
Last edited:
Here I can also confirm that the new exim.pl solved the problem.

For now I do not see that this new exim.pl cause any other problems.

Very Thank.
 
Back
Top