I am running Xcode Server Bots on my local iMac but the email notifications are not being sent.
I have followed many tutorials and have postfix setup and working. I can successfully send emails using the command
sudo echo "Test sending email from Postfix" | mail -s "Test Postfix" xxxxxx@me.com
and my email is received.
Under Xcode > Preferences > Server & Bots > Mail I have left everything blank as per all the tutorials.
For my Bot, under Triggers I have a Periodic Email Report with Schedule set to After each integration and set my from, reply-to and To fields and have every Notify On ticked.
I monitor the smtp and smtp process using the command
sudo log stream --predicate '(process == "smtpd") || (process == "smtp")' --info
and when I send an email using the above test, I get a log line showing.
However when my Xcode Bot completes, I get absolutely nothing. The Bot logs show
Feb 2 13:47:16 [596] <Info>: Executing trigger 'Periodic Email Report'
Feb 2 13:47:16 [596] <Info>: Executing trigger 'New Issue Email'
So the email report is not triggering any kind of smtp. Is it even using postfix? Can I log something else to see whether it is hitting postfix at all?
EDIT ------
I have found some sendmail logs that seem to show Xcode doesn't have the right permission to use postdrop:
kernel Sandbox: sendmail(48548) deny(1) forbidden-exec-sugid
sendmail fatal: execvp /usr/sbin/postdrop: Operation not permitted
sendmail warning: command "/usr/sbin/postdrop -r" exited with status 1
sendmail fatal: xcode@<redacted>.com(450): unable to execute /usr/sbin/postdrop -r: Undefined error: 0
My postdrop permissions seem to be correct compared to what I can find online:
-rwxr-xr-x 1 root wheel 570448 1 Jan 2020 postalias
-rwxr-xr-x 1 root wheel 466416 1 Jan 2020 postcat
-rwxr-xr-x 1 root wheel 823488 1 Jan 2020 postconf
-rwxr-sr-x 1 root _postdrop 588624 1 Jan 2020 postdrop
-rwxr-xr-x 1 root wheel 431904 1 Jan 2020 postfix
-rwxr-xr-x 1 root wheel 432032 1 Jan 2020 postkick
-rwxr-xr-x 1 root wheel 449424 1 Jan 2020 postlock
-rwxr-xr-x 1 root wheel 431872 1 Jan 2020 postlog
-rwxr-xr-x 1 root wheel 569632 1 Jan 2020 postmap
-rwxr-xr-x 1 root wheel 465872 1 Jan 2020 postmulti
-rwxr-sr-x 1 root _postdrop 588448 1 Jan 2020 postqueue
-rwxr-xr-x 1 root wheel 466784 1 Jan 2020 postsuper
I have the _postdrop user in my /etc/group file as:
_postdrop:*:28:
Or am I reading this wrong? Does sendmail user need permission to use postdrop?
EDIT 2 -------
It seems this might be an issue with Big Sur making the root partition read only. sudo postfix set-permissions can't do it's thing.
So I guess the question now is, how to install/use a different method for Xcode Server to send emails?



