"Undelivered Mail Returned to Sender" for admin@domain.tld on each cron run

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.2.3 (stable)
I have access to my server: Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance? : no

Description of my issue

Every time a cronjob runs on my yunohost server, an email with the cronjob output is sent to admin@mydomain.tld. This email in turn sends an “Undelivered Mail Returned to Sender” message to root@mydomain.tld, making the root@ inbox feel quite spammy.
How do I make it stop?

I’ve grepped the entire /etc directory for admin@ and didn’t find anything useful. I’d be thankful for any tips on where to find the place that configures the CRON email address

I have the same issue. Since the admin user was removed during a Yunohost upgrade, I receive a mail “Undelivered Mail Returned to Sender” each time a mail is sent by Yunohost.

The error is:

<admin@mydomain.tld> (expanded from ): user unknown

I didn’t find were is admin@mydomain.tld in my server.

sudo grep -r admin /etc/cron*

For example, the undelivered mail is:

From: Cron Daemon root@ynh.mydomain.tld
To: root@ynh.mydomain.tld
Subject: Cron root@ynh test -x /usr/sbin/anacron ( cd / && run-parts --report /etc/cron.daily )

It doesn’t contain the admin email.

It seems to be an issue in the email configuration.

I just realized I have a admin user:

sudo yunohost user info admin
Warning: E-mail turned off for user admin
fullname: Admin
loginShell: /bin/bash
mail: admin_legacy
  limit: No quota
  use: ?
username: admin

Any updates on that? I have the same issue.

Uhm, just as a first hint:

# Eintrag 1: cn=admins,ou=groups,dc=yunohost,dc=org
dn: cn=admins,ou=groups,dc=yunohost,dc=org
cn: admins
gidnumber: 4001
mail: root@link-goe.de
mail: webmaster@link-goe.de
mail: admins@link-goe.de
mail: postmaster@link-goe.de
mail: abuse@link-goe.de
mail: admin@link-goe.de
member: uid=my_admin_user,ou=users,dc=yunohost,dc=org
memberuid: my_admin_user
objectclass: top
objectclass: posixGroup
objectclass: groupOfNamesYnh
objectclass: mailGroup
permission: cn=phpldapadmin.main,ou=permission,dc=yunohost,dc=org
permission: cn=gitea.admin,ou=permission,dc=yunohost,dc=org

I do not know postfix+ldap in such depths, yet, that I could say what this means. But I’d guess that any group_member of the admins group should get those emails without an error. Look at https://your.do.main/yunohost/admin/?#/groups to find the group of administrators.

I remember that I put an forward on the administrator user I put into that group to get the emails into another mailbox.

If this doesn’t help one would need to search further. On the command line you could use sendmail -bv root; sendmail -bv admin@do.main and look for the resulting routing information from postfix in any of your postboxes or maybe in /var/mail/root/.

My main user is a member of the admins group.

The result is

This is the mail system at host my.domain.

Enclosed is the mail delivery report that you requested.

                   The mail system

<admin@my.domain> (expanded from <root>): delivery via dovecot:
    delivers to command: /usr/lib/dovecot/deliver

<kuba@my.domain> (expanded from <root>): delivery via dovecot:
    delivers to command: /usr/lib/dovecot/deliver

Reporting-MTA: dns; my.domain
X-Postfix-Queue-ID: D457140253
X-Postfix-Sender: rfc822; root@my.domain
Arrival-Date: Fri,  3 Nov 2023 13:06:02 +0100 (CET)

Final-Recipient: rfc822; admin@my.domain
Original-Recipient: rfc822;root@my.domain
Action: deliverable
Status: 2.0.0
Diagnostic-Code: X-Postfix; delivery via dovecot: delivers to command:

Final-Recipient: rfc822; kuba@my.domain
Original-Recipient: rfc822;root@my.domain
Action: deliverable
Status: 2.0.0
Diagnostic-Code: X-Postfix; delivery via dovecot: delivers to command:

Return-Path: <root@my.domain>
Received: by my.domain (Postfix, from userid 0)
	id D457140253; Fri,  3 Nov 2023 13:06:02 +0100 (CET)
From: root@my.domain
Subject: probe
To: root@my.domain
Message-Id: <20231103120602.D457140253@my.domain>
Date: Fri,  3 Nov 2023 13:06:02 +0100 (CET)

Does it look ok?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.