Page 1 of 1

Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-07 19:38
by steelworm
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"

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-07 20:49
by SorenR
hMailAdmin -> Settings -> Anti-Spam [General] : Maximum message size to scan (KB) = ?

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-08 00:31
by steelworm
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.

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-08 01:15
by jimimaseye
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.]

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-08 09:07
by steelworm
I already created an according spamc.conf. Do you think there might be an issue with that?

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-08 09:52
by jimimaseye
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

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-10 14:36
by RvdH
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?

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-10 14:51
by SorenR
RvdH wrote:
2020-05-10 14:36
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?
Reading 20000 byte chunks for a maximum of 100000 times... 1.9 GB of data ?

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);
      }

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-10 15:30
by RvdH
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

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-10 22:57
by katip
in fact, there is a setting for spamc

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.
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.

Re: Mails bigger than 5 MB wont get passed to spamd

Posted: 2020-05-11 13:54
by RvdH
katip wrote:
2020-05-10 22:57
in fact, there is a setting for spamc

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.
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.
Duh....only hMailServer doesn't use it clamc, but has a build in client :lol: :wink: