Explore Jenkins server and to configure the email notification.
Noticed Postfix is shipped with MacOS system, but it is not started by default.
$ sudo postfix start
Get a message saying failed to start postfix. Weird, not making much sense. Googling… And following fixed the issue:
$ postconf compatibility_level=2
Then tweaked a bit in /etc/postfix/main.cf, started postfix service, try sending an email
$ echo ‘test’ | sendmail -v email@example.com
Weird again, nothing happened. So how to debug postfix under MacOS? Googling…
$ log stream –predicate ‘(process == “smtpd”) || (process == “smtp”)’ –info
This does output the error, it said
smtp: C1FF2EA4C03: firstname.lastname@example.org, relay=none, delay=30, delays=0.03/0.02/30/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)
All right. Thank you again, GFW.
$ dig mx google.com
Dig failed. Okay, my DNS server isn’t working for google.com
Added some DNS records to my network configuration.
Damn I am so far from my Jenkins experiment.