Postfix under Mac OS

Posted onLeave a commentCategories未分类

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 xxx@gmail.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: to=boborabit@gmail.com, 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.

Et voila.

Damn I am so far from my Jenkins experiment.

发表评论

电子邮件地址不会被公开。 必填项已用*标注