Hi,
I'm using PVE 7.1-12. The host is under NAT, so I think I need to use a relay for email notifications. Unfortunately I'm not familiar with Postfix.
In order to configure my email notifications I have tried different combinations of every configuration I have found in the forum and abroad, with no success. So here I am asking for help.
These are the client configuration instructions of my email provider:
Outgoing mail server: SMTP: mail.mymailprovider.net, port 465 (TLS) or port 587 (STARTTLS).
Login or user name: only user without domain
Note: Don’t enable secure passwords or secure authentication.
This is my current configuration:
root@mypvehost:/# cat /etc/postfix/main.cf
root@mypvehost:/# cat /etc/postfix/sasl_passwd
Now I do
root@mypvehost:/# postmap hash:/etc/postfix/sasl_passwd
root@mypvehost:/# systemctl restart postfix[/CODE]
I test it
root@mypvehost:/# echo "test" | mail -s "tset" bea@mymailprovider.net
while checking the logs
root@mypvehost:~# tail -f /var/log/mail.info
Please help!
Thank you.
I'm using PVE 7.1-12. The host is under NAT, so I think I need to use a relay for email notifications. Unfortunately I'm not familiar with Postfix.
In order to configure my email notifications I have tried different combinations of every configuration I have found in the forum and abroad, with no success. So here I am asking for help.
These are the client configuration instructions of my email provider:
Outgoing mail server: SMTP: mail.mymailprovider.net, port 465 (TLS) or port 587 (STARTTLS).
Login or user name: only user without domain
Note: Don’t enable secure passwords or secure authentication.
This is my current configuration:
root@mypvehost:/# cat /etc/postfix/main.cf
Code:
myhostname=mypvehost.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
relayhost = mail.mymailprovider.net:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
root@mypvehost:/# cat /etc/postfix/sasl_passwd
Code:
[mail.mymailprovider.net]:587 bea:mypassword
Now I do
root@mypvehost:/# postmap hash:/etc/postfix/sasl_passwd
root@mypvehost:/# systemctl restart postfix[/CODE]
I test it
root@mypvehost:/# echo "test" | mail -s "tset" bea@mymailprovider.net
while checking the logs
root@mypvehost:~# tail -f /var/log/mail.info
Code:
Apr 14 15:54:29 mypvehost postfix/pickup[2100236]: 6C6442636B: uid=0 from=<root>
Apr 14 15:54:29 mypvehost postfix/cleanup[2102033]: 6C6442636B: message-id=<20220414135429.6C6442636B@mypvehost.local>
Apr 14 15:54:29 mypvehost postfix/qmgr[2100237]: 6C6442636B: from=<root@mypvehost.local>, size=377, nrcpt=1 (queue active)
Apr 14 15:54:59 mypvehost postfix/smtp[2100242]: connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out
Apr 14 15:54:59 mypvehost postfix/smtp[2100242]: 6C6442636B: to=<bea@mymailprovider.net>, relay=none, delay=30, delays=0.01/0/30/0, dsn=4.4.1, status=deferred (connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out)
Apr 14 15:57:51 mypvehost postfix/qmgr[2100237]: DD89B25128: from=<root@mypvehost.local>, size=399, nrcpt=1 (queue active)
Apr 14 15:57:51 mypvehost postfix/qmgr[2100237]: AAA80261C7: from=<root@mypvehost.local>, size=399, nrcpt=1 (queue active)
Apr 14 15:58:22 mypvehost postfix/smtp[2105667]: connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out
Apr 14 15:58:22 mypvehost postfix/smtp[2105667]: AAA80261C7: to=<bea@mymailprovider.net>, relay=none, delay=487, delays=457/0.03/30/0, dsn=4.4.1, status=deferred (connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out)
Apr 14 15:58:22 mypvehost postfix/smtp[2105666]: connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out
Apr 14 15:58:22 mypvehost postfix/smtp[2105666]: DD89B25128: to=<bea@mymailprovider.net>, relay=none, delay=5371, delays=5341/0.02/30/0, dsn=4.4.1, status=deferred (connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out)
Apr 14 16:02:51 mypvehost postfix/qmgr[2100237]: C337F25621: from=<root@mypvehost.local>, size=399, nrcpt=1 (queue active)
Apr 14 16:02:51 mypvehost postfix/qmgr[2100237]: 6C6442636B: from=<root@mypvehost.local>, size=377, nrcpt=1 (queue active)
Apr 14 16:02:51 mypvehost postfix/qmgr[2100237]: F1DD625427: from=<root@mypvehost.local>, size=399, nrcpt=1 (queue active)
Apr 14 16:03:21 mypvehost postfix/smtp[2111253]: connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out
Apr 14 16:03:21 mypvehost postfix/smtp[2111253]: 6C6442636B: to=<bea@mymailprovider.net>, relay=none, delay=532, delays=502/0.03/30/0, dsn=4.4.1, status=deferred (connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out)
Apr 14 16:03:21 mypvehost postfix/smtp[2111254]: connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out
Apr 14 16:03:21 mypvehost postfix/smtp[2111254]: F1DD625427: to=<bea@mymailprovider.net>, relay=none, delay=4816, delays=4785/0.04/30/0, dsn=4.4.1, status=deferred (connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out)
Apr 14 16:03:21 mypvehost postfix/smtp[2111252]: connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out
Apr 14 16:03:21 mypvehost postfix/smtp[2111252]: C337F25621: to=<bea@mymailprovider.net>, relay=none, delay=4351, delays=4321/0.02/30/0, dsn=4.4.1, status=deferred (connect to mx1.mymailprovider.net[198.152.153.129]:587: Connection timed out)
Please help!
Thank you.