Hi,
On Sat, Feb 22, 2025 at 08:00:48PM +0700, Ian Hobson via BitFolk Users wrote:
It only has to forward mail for about 5 domains.
Aside from what others have said about your SPF record, forwarding
emails into large mailbox providers is not going to work reliably ever,
so just give up trying to do that.
The problem is that when you do a basic forward, for the connection to
the next email provider (gmail in this case), you are pretending to be
the original sender.
For example, if I send an email to ian(a)ianhobson.com from
andy(a)bitfolk.com, your VPS 85.119.82.117 will connect to gmail and try
to send an email from andy(a)bitfolk.com to hobson42(a)gmail.com. gmail will
do an SPF check against the envelop sender domain (
bitfolk.com) and see
that 85.119.82.117 isn't there, so this ia an SPF fail.
If you are *lucky*, DKIM will still work, and we do DKIM sign our
emails, so DMARC will pass and gmail will accept that mail anyway since
DKIM worked even though SPF didn't. But this is not reliable, and
doesn't help you for those who don't DKIM sign.
Forwarding email is a year 2000s idea that SPF killed.
The only way you will get this to somewhat reliably work is if you do
Sender Rewriting Scheme (SRS) so that your Postfix rewrites the envelope
sender so that it's in the
ianhobson.com domain, causing the SPF to be
checked against your record. You'll also then want to do DKIM because
you'll break the original DKIM signature if any.
I've never done it with Postfix but:
https://github.com/roehling/postsrsd
There's probably other solutions.
google is rejecting everything, and I don't
understand why.
Welcome to email in the 21st century. Even after you get everything
right, this will still happen sometimes, and the people who don't get
your emails will blame you, not gmail.
Thanks,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting