Email delivery errors with Google Workspace

user124878

New Member
Nov 6, 2024
5
0
1
Hi,

I set up my Proxmox VE environment including Proxmox backup about 4 weeks ago now. Ever since I have gotten email delivery errors. Some mail goes through, some does not.

It's been configured to send email using the google SMTP server with TLS on port 465. This is the error I get:
alt1.aspmx.l.google.com[2404:6800:4008:c13::1b]:25: Permission denied

I have no idea why it's trying port 25. Nowhere have I set or can find anything suggesting it would use port 25. I picked TLS and port 465. The same issue presents itself on Proxmox Backup. Identical SMTP settings, same error.

Is this a known bug? Any idea what's causing it?
 
Do you use the Notification system of Proxmox already? If yes please post your config:

Code:
cat /etc/pve/notifications.cfg

Hi,

Yes I do. It was all configured using the UI.

/etc/pve/notifications.cfg (with private information replaced by user1 and user2):
Code:
matcher: default-matcher
    comment Route all notifications to mail to gmail.com
    mode all
    target gmail

sendmail: mail-to-root
    comment Send mails to root@pam's email address
    disable true
    mailto-user root@pam

smtp: gmail
    comment Send mail
    from-address user1@gmail.com
    mailto-user user2@gmail.com
    mode tls
    port 465
    server smtp.gmail.com
    username user1@gmail.com
 
I guess no one has any idea what causes this? Still happening. Can't find port 25 anywhere in the configuration.
 
Thanks, your config looks ok. It should work.

I have to admit that I don't quite understand the situation yet. Because you write in the first post that you have configured “Send mail” and getting this error message:

alt1.aspmx.l.google.com[2404:6800:4008:c13::1b]:25: Permission denied

Then you write that you are using the notification system after all. Where are you getting this error message about port 25 and the permission?

In order to use the notification system and not sendmail, it must be selected, or mailto is no set.
Code:
notification-mode: <auto | legacy-sendmail | notification-system> (default = auto)

For example: Here I have selected the notification system directly.
Screenshot_20241215_211852.png

If set to auto (default setting), an email will be sent if mailto is set, and the notification system will be used if not.
 
alt1.aspmx.l.google.com[2404:6800:4008:c13::1b]:25
This looks like the mail transfer agent is trying to use IPv6. Is IPv6 configured on your NW?
Did you configure something in mail to use IPv6? Maybe post output for cat /etc/postfix/main.cf (redact info if necessary).
 
Thanks, your config looks ok. It should work.

I have to admit that I don't quite understand the situation yet. Because you write in the first post that you have configured “Send mail” and getting this error message:



Then you write that you are using the notification system after all. Where are you getting this error message about port 25 and the permission?

In order to use the notification system and not sendmail, it must be selected, or mailto is no set.
Code:
notification-mode: <auto | legacy-sendmail | notification-system> (default = auto)

For example: Here I have selected the notification system directly.
View attachment 79177

If set to auto (default setting), an email will be sent if mailto is set, and the notification system will be used if not.

That was set to auto, but my notification config is set so sendmail is disabled and SMTP enabled in the UI. I have now changed notification mode to notification system. That may fix it. I'll report back.
 
This looks like the mail transfer agent is trying to use IPv6. Is IPv6 configured on your NW?
Did you configure something in mail to use IPv6? Maybe post output for cat /etc/postfix/main.cf (redact info if necessary).

I didn't config anything in email to use IPv6 but my network is configured for IPv6 and it's working.

Nothing weird in the postfix main.cf

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

myhostname=prox1.local

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost =
mynetworks = 127.0.0.0/8
inet_interfaces = loopback-only
recipient_delimiter = +

compatibility_level = 2
 
You don't have anything configured in postfix, this is to be expected as you didn't setup the notifications from there.
But possibly adding :
Code:
nano /etc/postfix/main.cf

# Only use IPv4
inet_protocols = ipv4

# Then restart the postfix service with
/etc/init.d/postfix restart
to that postfix file will force it to use IPv4 for the gmail notifications.

This is the way to do it when using the postfix setup - but I'm not sure what effect it will have on your setup.

It is a known ISP/Gmail problem or limitation that IPv6 is not always possible.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!