We are running a (webbased) application that is being used by many companies. This application generates large volumes of e-mail, almost all of them have a PDF attachment. These are e-mails the users want and need. We are now sending out around 40k mails per month I believe.
At first we were sending these e-mails from the webserver (Ubuntu 20.0.4 LTS) itself through EXIM/sendmail. This worked fine until after two years of usage the server got on Spamhaus blacklist. I tried to get it unlisted but without any success. The server had rDNS, DKIM, SPF and DMARC correctly configured.
Then I tried sendgrid.com. This did work, but still around 3-5% of e-mails ended up in spam. For this particular application this is not acceptable. After some googling I found out that most services (including Amazon SES) cope with these issues. So I went back to hosting a new e-mail server with Exim and a fresh IP address. Also correctly configured rDNS, DKIM, SPF and DMARC for this new IP. Everything went smooth for two days. After that Spamhaus blocked the new server as well. I have double checked but haven't seen any suspicious activity/emails coming from the application.
I feel that Spamhaus recognizes the e-mail contents and therefore blocks this e-mail. Is that possible? It hasn't been a problem for 2 years, but once it got on Spamhaus now every server that sends it gets blacklisted. Will it be solved by changing the e-mail contents? Maybe change the attachment by adding a link to the text? How can I find out what the problem exactly is? I'm just not sure where to go from here.