Mails bigger than 5 MB wont get passed to spamd
Mails bigger than 5 MB wont get passed to spamd
Hello there,
Whenever I receive a message bigger than 5 MB it wont get passed to spamd. This can be confirmed by looking at SA logs which do not state a connection from hmail. In addition to that in hmail's logs the typical "Sending message to SpamAssassin" record is also missing. I adjusted the "Maximum message size to scan" but this did not help. It also seems that no DKIM check has happened but only the following checks:
"DEBUG" 3784 "2020-05-03 02:23:58.172" "Spam test: SpamTestDNSBlackLists, Score: 0"
"DEBUG" 3784 "2020-05-03 02:23:58.181" "Spam test: SpamTestHeloHost, Score: 0"
"DEBUG" 3784 "2020-05-03 02:23:58.181" "Spam test: SpamTestMXRecords, Score: 0"
"DEBUG" 3784 "2020-05-03 02:23:58.184" "Spam test: SpamTestSPF, Score: 0"
"DEBUG" 3784 "2020-05-03 02:23:58.185" "Total spam score: 0"
Whenever I receive a message bigger than 5 MB it wont get passed to spamd. This can be confirmed by looking at SA logs which do not state a connection from hmail. In addition to that in hmail's logs the typical "Sending message to SpamAssassin" record is also missing. I adjusted the "Maximum message size to scan" but this did not help. It also seems that no DKIM check has happened but only the following checks:
"DEBUG" 3784 "2020-05-03 02:23:58.172" "Spam test: SpamTestDNSBlackLists, Score: 0"
"DEBUG" 3784 "2020-05-03 02:23:58.181" "Spam test: SpamTestHeloHost, Score: 0"
"DEBUG" 3784 "2020-05-03 02:23:58.181" "Spam test: SpamTestMXRecords, Score: 0"
"DEBUG" 3784 "2020-05-03 02:23:58.184" "Spam test: SpamTestSPF, Score: 0"
"DEBUG" 3784 "2020-05-03 02:23:58.185" "Total spam score: 0"
Re: Mails bigger than 5 MB wont get passed to spamd
hMailAdmin -> Settings -> Anti-Spam [General] : Maximum message size to scan (KB) = ?
SørenR.
Algorithm (noun.)
Word used by programmers when they do not want to explain what they did.
Algorithm (noun.)
Word used by programmers when they do not want to explain what they did.
Re: Mails bigger than 5 MB wont get passed to spamd
I have set it to 10MB which are 10.240 KB for the setting. So the mails in question which are about 5 to 6 MB should get scanned as all the others get which are <5 but they aren’t.
- jimimaseye
- Moderator
- Posts: 8849
- Joined: 2011-09-08 17:48
Re: Mails bigger than 5 MB wont get passed to spamd
There is also a maximum size in spamassassin (500kb I think). Review spamassassin documentation for more information and how to increase.
[Entered by mobile. Excuse my spelling.]
[Entered by mobile. Excuse my spelling.]
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: Mails bigger than 5 MB wont get passed to spamd
I already created an according spamc.conf. Do you think there might be an issue with that?
- jimimaseye
- Moderator
- Posts: 8849
- Joined: 2011-09-08 17:48
Re: Mails bigger than 5 MB wont get passed to spamd
I will leave it to you to research and seek help with spamassassin configurations.
For hms: run this and post the results: https://www.hmailserver.com/forum/viewt ... 20&t=30914
For hms: run this and post the results: https://www.hmailserver.com/forum/viewt ... 20&t=30914
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: Mails bigger than 5 MB wont get passed to spamd
spamc is only used for spam learning i think... hmailserver uses a internal client, i doubt this will read values from spamc.conf
Not sure what maxIterations is, hardcoded limit?
Not sure what maxIterations is, hardcoded limit?
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
Re: Mails bigger than 5 MB wont get passed to spamd
Reading 20000 byte chunks for a maximum of 100000 times... 1.9 GB of data ?RvdH wrote: ↑2020-05-10 14:36spamc is only used for spam learning i think... hmailserver uses a internal client, i doubt this will read values from spamc.conf
Not sure what maxIterations is, hardcoded limit?
Code: Select all
const int maxIterations = 100000;
for (int i = 0; i < maxIterations; i++)
{
std::shared_ptr<ByteBuffer> pBuf = oFile.ReadChunk(20000);
if (pBuf->GetSize() == 0)
break;
BYTE *pSendBuffer = (BYTE*) pBuf->GetBuffer();
size_t iSendBufferSize = pBuf->GetSize();
EnqueueWrite(pBuf);
}
SørenR.
Algorithm (noun.)
Word used by programmers when they do not want to explain what they did.
Algorithm (noun.)
Word used by programmers when they do not want to explain what they did.
Re: Mails bigger than 5 MB wont get passed to spamd
Looks a bit exuberant, isn't? 
Anyway, this is controlled/overruled by Maximum message size to scan (KB) in hmailserver settings, so if that value is reasonable it will never reach this 1.9GB

Anyway, this is controlled/overruled by Maximum message size to scan (KB) in hmailserver settings, so if that value is reasonable it will never reach this 1.9GB
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
Re: Mails bigger than 5 MB wont get passed to spamd
in fact, there is a setting for spamc
i have no idea where to place a spamc.conf in a JAM SA installation (and if it ever works). root probably??
but this should be irrelevant. OP means, mail never gets queued to SA, according to logs.
Code: Select all
-s *max_size*, --max-size=*max_size*
Set the maximum message size which will be sent to spamd -- any
bigger than this threshold and the message will be returned
unprocessed (default: 500 KB). If spamc gets handed a message bigger
than this, it won't be passed to spamd. The maximum message size is
256 MB.
The size is specified in bytes, as a positive integer greater than
0. For example, -s 500000.
but this should be irrelevant. OP means, mail never gets queued to SA, according to logs.
Katip
--
HMS 5.7.0 x64, MariaDB 10.4.10 x64, SA 3.4.2, ClamAV 0.101.2 + SaneS
--
HMS 5.7.0 x64, MariaDB 10.4.10 x64, SA 3.4.2, ClamAV 0.101.2 + SaneS
Re: Mails bigger than 5 MB wont get passed to spamd
Duh....only hMailServer doesn't use it clamc, but has a build in clientkatip wrote: ↑2020-05-10 22:57in fact, there is a setting for spamc
i have no idea where to place a spamc.conf in a JAM SA installation (and if it ever works). root probably??Code: Select all
-s *max_size*, --max-size=*max_size* Set the maximum message size which will be sent to spamd -- any bigger than this threshold and the message will be returned unprocessed (default: 500 KB). If spamc gets handed a message bigger than this, it won't be passed to spamd. The maximum message size is 256 MB. The size is specified in bytes, as a positive integer greater than 0. For example, -s 500000.
but this should be irrelevant. OP means, mail never gets queued to SA, according to logs.


CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup