As mentioned here
https://forums.koozali.org/index.php/topic,54914.0.html, some email providers lately have been blocking emails from my server, because of problems with reverse dns for my ip address.
So I decided to subscribe to mailersend.com, and set up my own server to use this, using smtp-auth-proxy. And this works ... mostly.
mailersend.com won't allow me to deliver DMARC reports to other mail providers, because mailersend.com blocks email with *.xml.gz attachments.
Also, it seems a bit foolish to use mailersend.com for emails to e.g. google.com, as Google happily accepts emails directly from my server. So I've experimented a bit with the contents of /var/qmail/control/smtproutes.
My idea is to use something like this:
csjdanmark.dk:localhost:26
jubii.dk:localhost:26
mail.dk:localhost:26
pc.dk:localhost:26
privat.dk:localhost:26
stofanet.dk:localhost:26
webspeed.dk:localhost:26
yahoo.dk:localhost:26
youmail.dk:localhost:26
:localhost
Hoping that this would make qmail use mailersend.com for outgoing emails to a few, specific domains. And for all other domains just send the emails directly.
But apparently this leads to some sort of mail loop, where qmail continuously tries to send the emails in the queue.
Any suggestions?
Answering my own question - all it required was to delete the last line in /var/qmail/control/smtproutes. With this contents, emails to a few, specific domains are forwarded to the external smtp-server, everything else is sent directly to the receiver.
csjdanmark.dk:localhost:26
jubii.dk:localhost:26
mail.dk:localhost:26
pc.dk:localhost:26
privat.dk:localhost:26
stofanet.dk:localhost:26
webspeed.dk:localhost:26
yahoo.dk:localhost:26
youmail.dk:localhost:26