DKIM verification fails when email body length crosses 988 chars without any line break

28 Views Asked by At

I'm using a perl script to send an email using Mime Lite.


$msg->attach(
        Type     =>'TEXT',
        Encoding =>'8bit',
        charset  => 'US-ASCII',
        Data     => 'EmailStartsHereLoremIpsumissimplydummytextoftheprintingandtypesettingindustryLoremIpsumhasbeentheindustrysstandarddummytexteversincethe1500swhenanunknownprintertookagalleyoftypeandscrambledittomakeatypespecimenbookIthassurvivednotonlyfivecenturiesbutalsotheleapintoelectronictypesettingremainingessentiallyunchangedItwaspopularisedinthe1960swiththereleaseofLetrasetsheetscontainingLoremIpsumpassagesandmorerecentlywithdesktoppublishingsoftwarelikeAldusPageMakerincludingversionsofLoremIpsumLoremIpsumissimplydummytextoftheprintingandtypesettingindustryLoremIpsumhasbeentheindustrysstandarddummytexteversincethe1500swhenanunknownprintertookagalleyoftypeandscrambledittomakeatypespecimenbookIthassurvivednotonlyfivecenturiesbutalsotheleapintoelectronictypesettingremainingessentiallyunchangedItwaspopularisedinthe1960swiththereleaseofLetrasetsheetscontainingLoremIpsumpassagesandmorerecentlywithdesktoppublishingsoftwarelikeAldusPageMakerincludingversionsofLoremIpsumAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEmailEndsHere',
    );

The DKIM verification fails saying that the body content has been modified. When I checked hexadecimal data of the string being received I noticed 0A0D being added to the body. This error occurs with 7bit and 8bit encoding. I don't have control over what the email body content will be so this needs to be addressed at the STMP server end (i,e I cannot change the encoding type).

How to address this error?

0

There are 0 best solutions below