homebrew-graph

Stumbled on this utility to manage looking at dependencies. Really helps to visualize homebrew structure and can be done at top level:

Or one formula and below:

Great way of checking the connections before cleaning things up. Particularly helpful when checking across php versions, which I still keep relevant and available. Also helped resolve a deprecation issue I had with “ilmbase” which is now subsumed in openexr. All still keeps me on my toes.

Working well

Mailhog working brilliantly and caught transcript of problems with CRON for phpservermon – library error. Going back, had email that identified problems with brew upgrade that was automatically run. Conflict between shivammathur and other taps for PHP 8.0 – resulted in bad library load. Uninstall php and run upgrade again – all good. Most things linking together well now and redundancies are robust.

Still a crash…

Had to reflect on crontab. Still not sure I have everything in place. But maybe

Added sudo crontab to see if I can run a postfix restart after a system crash. I hate manually restarting postfix after a crash. Maybe this will work? @reboot in a sudo crontab could work, right?

Mail system resolved under Homebrew

Did some work on mail related interfaces and now have competent holding bin for system related mail relative to crontab, wordpress, and phpservermon. Mailhog and update of various elements was the answer to have easy solution for mail capturing without dealing with external SMTP servers and configuration.

Mailhog sits as a launch-able site to review mail generated by these systems. Keeps it in a nice holding location for easy review.

$ brew install mailhog

Installation via brew was easy, although configuration of Postfix was critical:

/etc/postfix/main.cf

#Gmail SMTP
#relayhost=smtp.gmail.com:587
#Enable SASL authentication in the Postfix SMTP client.
#smtp_sasl_auth_enable=yes
#smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
#smtp_sasl_security_options=noanonymous
#smtp_sasl_mechanism_filter=plain

#Enable Transport Layer Security (TLS), i.e. SSL.
#smtp_use_tls=yes
#smtp_tls_security_level=encrypt
#tls_random_source=dev:/dev/urandom
#smtputf8_enable = no
 compatibility_level = 2
 
#MailHog
 myhostname = localhost
 relayhost = [127.0.0.1]:1025

Key is to comment out everything gmail related (never worked anyway for some reason) and add the mailhog configuration as suggested through install documentation. Keep compatibility_level=2 for proper logging and operation. Worked well and stable. Mailhog has to be started in Brew:

$ brew services start mailhog

By the way, figured out that my use of apachectl was screwing up brew services, so no longer using “sudo apachectl -k restart” – that pushes web services to the SU level and causes a conflict with Brew. By using sudo apachectl to stop and “brew services start http” everything was fixed. Additionally, added the following to crontab:

#restart commands
 @reboot brew services restart httpd

Now, when there is a crash (still happening occasionally), restart and login causes httpd to automatically restart. Much more functional. If I can set it to do this without logging in, I’ll get it running automatically at runtime and without login.