I have the following errors when trying to send emails to gmail addresses via my terminal:
sudo tail /var/log/mail.log
Jul 19 13:19:44 ubuntu-4gb-fsn1-1 postfix/cleanup[5780]: B4B8C5F4A3: message-id=<20230719131944.B4B8C5F4A3@ubuntu-4gb-fsn1-1>
Jul 19 13:19:44 ubuntu-4gb-fsn1-1 postfix/qmgr[4961]: B4B8C5F4A3: from=<[email protected]>, size=269, nrcpt=2 (queue active)
Jul 19 13:19:45 ubuntu-4gb-fsn1-1 postfix/smtp[5782]: B4B8C5F4A3: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1a]:25, delay=0.36, delays=0.02/0.02/0.13/0.19, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1a] said: 550-5.7.1 [2a01:4f8:c012:4b7::1] Our system has detected that this message does 550-5.7.1 not meet IPv6 sending guidelines regarding PTR records and 550-5.7.1 authentication. Please review 550-5.7.1 https://support.google.com/mail/?p=IPv6AuthError for more information 550 5.7.1 . x6-20020adfffc6000000b003141bf7bf82si2173949wrs.938 - gsmtp (in reply to end of DATA command))
Jul 19 13:19:45 ubuntu-4gb-fsn1-1 postfix/smtp[5783]: B4B8C5F4A3: to=<[email protected]>, orig_to=<[email protected]>, relay=mx-eu.mail.am0.yahoodns.net[188.125.72.74]:25, delay=0.58, delays=0.02/0.03/0.26/0.27, dsn=2.0.0, status=sent (250 ok dirdel)
Jul 19 13:19:45 ubuntu-4gb-fsn1-1 postfix/cleanup[5780]: 4C4165F4A6: message-id=<20230719131945.4C4165F4A6@ubuntu-4gb-fsn1-1>
Jul 19 13:19:45 ubuntu-4gb-fsn1-1 postfix/bounce[5784]: B4B8C5F4A3: sender non-delivery notification: 4C4165F4A6
Jul 19 13:19:45 ubuntu-4gb-fsn1-1 postfix/qmgr[4961]: 4C4165F4A6: from=<>, size=3040, nrcpt=1 (queue active)
Jul 19 13:19:45 ubuntu-4gb-fsn1-1 postfix/qmgr[4961]: B4B8C5F4A3: removed
Jul 19 13:19:45 ubuntu-4gb-fsn1-1 postfix/smtp[5782]: 4C4165F4A6: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[64.233.184.26]:25, delay=0.52, delays=0/0/0.11/0.41, dsn=5.7.26, status=bounced (host gmail-smtp-in.l.google.com[64.233.184.26] said: 550-5.7.26 This mail is unauthenticated, which poses a security risk to the 550-5.7.26 sender and Gmail users, and has been blocked. The sender must 550-5.7.26 authenticate with at least one of SPF or DKIM. For this message, 550-5.7.26 DKIM checks did not pass and SPF check for [] did not pass with ip: 550-5.7.26 [128.140.116.155]. The sender should visit 550-5.7.26 https://support.google.com/mail/answer/81126#authentication for 550 5.7.26 instructions on setting up authentication. n18-20020a5d6612000000b003142602c3e3si2110526wru.914 - gsmtp (in reply to end of DATA command))
Jul 19 13:19:45 ubuntu-4gb-fsn1-1 postfix/qmgr[4961]: 4C4165F4A6: removed
I have set my PTR record on ipv6 to:
mail.xxx.net
I have also added both SPF and DKIM to my DNS records. I have set up my website using ipv6 and ipv4 for the mail server.
What else have I missed or misconfigured?
Note I have set my Postfix to forward incoming emails to my yahoo and googlemail accounts. This works ok.
The error above happens only when I try to send emails (gmail to my domain) via my terminal:
echo "test email" | sendmail -F "LXX" -f "[email protected]" [email protected]
No error when send emails from my domain to gmail via my terminal:
echo "test email" | sendmail -F "LXX" -f "[email protected]" [email protected]
Why? Any ideas?