Emails with wrong sender from time to time

Elleni

Active Member
Jul 6, 2020
150
6
38
51
I configured sender for example when backups are done and that all works fine. /etc/postfix/main.cf also looks good:

Code:
myhostname=hostname.domain.tld
mydomain = domain.tld
myorigin = $mydomain
fallback_transport = relay
smtp_tls_security_level = may
smtputf8_enable = no

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 = ip.of.relay.host
mynetworks = 127.0.0.0/8
inet_interfaces = loopback-only
recipient_delimiter = +

compatibility_level = 2

Mailnotifications for backups are received as expected.

from time to time I see mails rejected and I am wondering where these could come from. Looks somehow like cronmails? How can those be corrected so they are not sent to destination <root@domain.tld> but to some existing emailaddress? It seems to me that those could be mails sent from cronjob errors? If so - how should I modify which config to define another emailaddress as destination. Furthermore those mails must also be sent through the relay host (which seems to be the case). And also the from address should be modified because the mailrelay only accepts sending mails from everything@domain.tld and not from everything@domain.wan for example.

Code:
From: postmaster@HOSTNAME.DOMAIN.wan
To: root@domain.tld
Date: Sun, 26 Nov 2023 12:20:13 +0100
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
    boundary="9B095B5ADSN=_01DA1BEF2035746100000015GRPZSRV081.domai"
X-DSNContext: 7ce717b1 - 1196 - 00000002 - 00000000
Message-ID: <RGryWtIIZ0000000b@HOSTNAME.domain.wan>
Subject: Delivery Status Notification (Failure)

This is a MIME-formatted message.
Portions of this message may be unreadable without a MIME-capable mail program.

--9B095B5ADSN=_01DA1BEF2035746100000015GRPZSRV081.domai
Content-Type: text/plain; charset=unicode-1-1-utf-7

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

       root@domain.tld

--9B095B5ADSN=_01DA1BEF2035746100000015GRPZSRV081.domai
Content-Type: message/delivery-status

Reporting-MTA: dns;HOSTNAME.domain.wan
Received-From-MTA: dns;hostname.domain.tld
Arrival-Date: Sun, 26 Nov 2023 12:20:13 +0100

Original-Recipient: rfc822;root@domain.tld
Final-Recipient: rfc822;root@domain.tld
Action: failed
Status: 5.4.1
Diagnostic-Code: smtp;550 5.4.1 Recipient address rejected: Access denied. [DB5PEPF00014B8B.eurprd02.prod.outlook.com 2023-11-26T11:20:13.422Z 08DBED57C688F080]

--9B095B5ADSN=_01DA1BEF2035746100000015GRPZSRV081.domai
Content-Type: message/rfc822

Received: from hostname.domain.tld ([ip.ad.re.ss]) by HOSTNAME.domain.wan with Microsoft SMTPSVC(10.0.17763.1697);
     Sun, 26 Nov 2023 12:20:13 +0100
Received: by hostname.domain.tld (Postfix, from userid 0)
    id 1A1C060345CA; Sun, 26 Nov 2023 12:20:13 +0100 (CET)
From: Proxmox VE <root@domain.tld>
To: root@domain.tld
Date: Sun, 26 Nov 2023 12:20:13 +0100
Subject: Replication Job: 108-0 failed
Content-Type: text/plain;
    charset="UTF-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20231126112013.1A1C060345CA@grpzlsrv002.domain.tld>
Return-Path: root@domain.tld
X-OriginalArrivalTime: 26 Nov 2023 11:20:13.0162 (UTC) FILETIME=[86350CA0:01DA205A]


What other relevant config file could be involved, so I can check and add in this thread to fix this issue? Thanks in advance for your help.
 
Last edited:
Hello, could you post the output of pveversion -v? And also the contents of /etc/pve/notifications.cfg, if it exists?
 
pveversion -v:
Code:
proxmox-ve: 7.4-1 (running kernel: 5.15.126-1-pve)
pve-manager: 7.4-17 (running version: 7.4-17/513c62be)
pve-kernel-5.15: 7.4-7
pve-kernel-5.15.126-1-pve: 5.15.126-1
pve-kernel-5.15.116-1-pve: 5.15.116-1
pve-kernel-5.15.102-1-pve: 5.15.102-1
ceph-fuse: 15.2.17-pve1
corosync: 3.1.7-pve1
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx4
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve2
libproxmox-acme-perl: 1.4.4
libproxmox-backup-qemu0: 1.3.1-1
libproxmox-rs-perl: 0.2.1
libpve-access-control: 7.4.1
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.4-2
libpve-guest-common-perl: 4.2-4
libpve-http-server-perl: 4.2-3
libpve-rs-perl: 0.7.7
libpve-storage-perl: 7.4-3
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.2-2
lxcfs: 5.0.3-pve1
novnc-pve: 1.4.0-1
proxmox-backup-client: 2.4.3-1
proxmox-backup-file-restore: 2.4.3-1
proxmox-kernel-helper: 7.4-1
proxmox-mail-forward: 0.1.1-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.7.3
pve-cluster: 7.3-3
pve-container: 4.4-6
pve-docs: 7.4-2
pve-edk2-firmware: 3.20230228-4~bpo11+1
pve-firewall: 4.3-5
pve-firmware: 3.6-6
pve-ha-manager: 3.6.1
pve-i18n: 2.12-1
pve-qemu-kvm: 7.2.0-8
pve-xtermjs: 4.16.0-2
qemu-server: 7.4-4
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.8.0~bpo11+3
vncterm: 1.7-1
zfsutils-linux: 2.1.11-pve1

notifications.cfg does not exist.
 

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!