Hi there.
yunohost:
repo: testing
version: 11.1.0.2
yunohost-admin:
repo: testing
version: 11.1.0.2
moulinette:
repo: stable
version: 11.0.9
ssowat:
repo: stable
version: 11.0.9
Updated yesterday, got issue when some bash script sends mail to root@mydomain.tld
. Received this mail :
This is the mail system at host mydomain.tld.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<[admin@mydomain.tld](mailto:admin@mydomain.tld)> (expanded from <[root@mydomain.tld](mailto:root@mydomain.tld)>): user unknown
Reporting-MTA: dns; mydomain.tld
X-Postfix-Queue-ID: 942443862215
X-Postfix-Sender: rfc822; [root@mydomain.tld](mailto:root@mydomain.tld)
Arrival-Date: Fri, 4 Nov 2022 23:35:28 +0100 (CET)
Final-Recipient: rfc822; [admin@mydomain.tld](mailto:admin@mydomain.tld)
Original-Recipient: rfc822;[root@mydomain.tld](mailto:root@mydomain.tld)
Action: failed
Status: 5.1.1
Diagnostic-Code: x-unix; user unknown
[Original mail content]
Let’s check /var/log/mail.log
:
Nov 5 00:08:35 mydomain postfix/pickup[2942463]: E9C8B386237F: uid=0 from=<root@mydomain.tld>
Nov 5 00:08:35 mydomain postsrsd[2961828]: srs_forward: <root@mydomain.tld> not rewritten: Domain excluded by policy
Nov 5 00:08:35 mydomain postfix/cleanup[2961824]: E9C8B386237F: message-id=<20221104230835.E9C8B386237F@mydomain.tld>
Nov 5 00:08:35 mydomain postfix/qmgr[2896068]: E9C8B386237F: from=<root@mydomain.tld>, size=529, nrcpt=3 (queue active)
Nov 5 00:08:36 mydomain postfix/pipe[2961830]: E9C8B386237F: to=<admin@mydomain.tld>, orig_to=<root@mydomain.tld>, relay=dovecot, delay=0.17, delays=0.12/0.01/0/0.04, dsn=5.1.1, status=bounced (user unknown)
Nov 5 00:08:36 mydomain dovecot: lda(someuserinadminsgroup@mydomain.tld)<2961835><fm7kAHSbZWOrMS0AUZszow>: sieve: msgid=<20221104230835.E9C8B386237F@mydomain.tld>: stored mail into mailbox 'INBOX'
Nov 5 00:08:36 mydomain postfix/pipe[2961833]: E9C8B386237F: to=<someuserinadminsgroup@mydomain.tld>, orig_to=<root@mydomain.tld>, relay=dovecot, delay=0.17, delays=0.12/0.02/0/0.03, dsn=2.0.0, status=sent (delivered via dovecot service)
Seems the system can’t find admin@mydomain.tld
Let’s have a look at the listed users :
root@mydomain:/home# yunohost user list
users:
admin:
fullname: Admin
mail: admin_legacy
mailbox-quota: 0
username: admin
someuserinadminsgroup:
fullname: xxx yyy
mail: someuserinadminsgroup@mydomain.tld
mailbox-quota: 0
username: someuserinadminsgroup
[some regular users]
Is it normal to get admin_legacy
mail instead of admin@mydomain.tld
like the other users ?
Nota bene : the user someuserinadminsgroup@mydomain.tld
which is in the group admins
receives the two mails : the original one and the error one.
Here are the users in the admin
& admins
groups :
root@mydomain:~# getent group admin && getent group admins
admin:*:17762:someuserinadminsgroup
admins:*:4001:someuserinadminsgroup,admin