A few months ago I set up an email server on my vultr cloudserver. I use postfix, dovecot and OpenDKIM. To test it I set up a new user and it worked fine, never got into spam. Actually I set up a sendmail script for root to send a mail to my gmail address every time someone logs into ssh. It still works fine, never goes to spam.
A few days ago however, I set up a few new users on my server to make new email accounts.
useradd -m -G mail myuser
The emails sent by these users always end up in gmail spam folders. I tested them on a few spam analyser sites and a few of them reported an rDNS conflict which I solved by setting up a correct rDNS, but it didn't help.
dkim, spf and dmarc both pass:
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@mydomain.hu header.s=mail header.b=KE06NMOv;
spf=pass (google.com: domain of myuser@mydomain.hu designates ip.ip.ip.ip as permitted sender) smtp.mailfrom=myuser@mydomain.hu;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mydomain.hu
Gmail says that my emails are "similar to recently reported spam emails", however I tried every combination of subjects and texts.
I use thunderbird to connect to these email accounts, but regardless the way of sending they all end up in spam folders.
I've found a solution to my question:
Somehow all newly created users of my mailserver had this "shadowbanned" status, so I had to manually report every one of my spammed emails as "not spam" on the receiving side. This solved the problem for these users, and I can send them to any gmail address without being marked as spam.
It looks like gmail automatically blacklisted my mail users regardless the headers, the lack of public blacklisting, or the content of the mails.