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.
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
mail-aliases:
mail-forward:
mailbox-quota:
limit: No quota
use: ?
username: admin
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/.
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:
/usr/lib/dovecot/deliver
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:
/usr/lib/dovecot/deliver
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)