32 package updates are available, of which 15 are security updates
I have Virtualmin running with Roundcube webmail, and incoming/outgoing mail is working fine. The problem is with forwarding.
I set up mail forwarding in Virtualmin so that emails sent to [user@mydomain.com] should be forwarded to my personal Gmail account [mygmail@gmail.com].
Yes, the ‘Deliver to this user normally’ option was unchecked. I’ve now enabled it, and emails are displaying in the Roundcube interface. However, the forwarding issue is still not resolved.
I have lots of forwards and aliases that seem to work fine. Gmail has gotten pickier about the mail it accepts, so the suggestion to check the logs is your best bet.
Sep 12 01:10:29 vps postfix/smtp[132556]: 0C9FF18149DD: to=<mygmail@gmail.com>, orig_to=<example@domain.com>, relay=gmail-smtp-in.l.google.com[2404:6800:4003:c1a::1b]:25, delay=32, delays=30/0.02/1.4/0.73, dsn=5.7.26, status=bounced (host gmail-smtp-in.l.google.com[2404:6800:4003:c1a::1b] said: 550-5.7.26 Your email has been blocked because the sender is unauthenticated. 550-5.7.26 Gmail requires all senders to authenticate with either SPF or DKIM. 550-5.7.26 550-5.7.26 Authentication results: 550-5.7.26 DKIM = did not pass 550-5.7.26 SPF [secure.net] with ip: [2a02:4780:12:d664::1] = did not pass 550-5.7.26 550-5.7.26 For instructions on setting up authentication, go to 550 5.7.26 https://support.google.com/mail/answer/81126#authentication d9443c01a7336-25ce28b4312si8305075ad.567 - gsmtp (in reply to end of DATA command))
So YOU need to set up either,or both, SPF or DKIM on your server. Forwarding is working as it should. Google is rejecting the mail because your server isn’t set up with what they require for incoming mail.
Seeing as you use Cloudflare for your nameservers, you also have to add those records there.
Having them in Virtualmin means nothing if you’re not hosting your own DNS.
You need to fix the SPF record, add the ip of the server to the record.
By the output your using a IPv6 number, plus add the ipv4 number.
add ip6: ip4:. That then allow those 2 ips to send emails for your domain.
The suggest DNS setting should show the numbers to copy.
Whilst I agree with all the advice about having SPF, DMARC etc. properly configured, it should be noted that if you are forwarding mail to Gmail, the forwarding will break SPF, DMARC etc.. The solution is to use ARC, ‘Authenticated Receive Chain’, however Virtualmin does not offer that function.
Hopefully, the devs will add support for ARC, as has been done already by Gmail, Microsoft Exchange, Fastmail and others.
Not sure how, gmail is the server checking the dmarc, dkim and spf. Its the sending server not recieving server that need to have correct records.
Unless your using gmail to send on behalf of your domain.