Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Spamassassin character scan limit?

Discussion in 'E-mail Discussions' started by jayharland, Mar 18, 2016.

  1. jayharland

    jayharland Active Member

    Apr 18, 2014
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    Hey everyone,

    When creating account level filters via cpanel, I'm trying to allow emails that are calendar invites but would otherwise be blocked.

    So I have a regex that checks Any Header or the Body for:


    The filter uses a negative look ahead because I only want a match if Content-Type: text/calendar doesn't exist.

    Anyway, this works as long as the "Content-Type: text/calendar" is towards the top of the email. But with something like a calendar invite forward with a bunch of HTML in the email, it fails. Even though in separate regex testing environment it sees that there is still a "Content-Type: text/calendar" further down.

    I read somewhere before that spamassassin has a character limit, where it won't scan past 5000 or 7000 characters or something? If that's true, I haven't been able to find where to adjust that setting, though I have looked.

    I can confirm that when I remove some of the text and make the message smaller, it works as expected.

    Thanks for any help!
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    This is configurable with the following option under the "Apache SpamAssassin Options" tab in "WHM >> Service Configuration >> Exim Configuration Manager >> Basic Editor":

    "Apache SpamAssassin™: message size threshold to scan"

    Per it's description:

    I suggest trying to keep this as close to the default value as possible, as scanning large messages can lead to increased CPU or memory usage.

    Thank you.

Share This Page