I fix things

A few years back my 5-year-old son Mac came to my office and asked if he could work with me. I asked him if he knew what kind of work I did, and he stated, “you fix things.” I was surprised by his answer because often I don’t know exactly what it is I do. I know I practice family medicine, and I know I build software applications. Intermittently, I fix cars/engines, wire homes, unclog drains, maintain bicycles….and most importantly care for my wife and family. But Mac’s answer was inciteful. I fix things. Hopefully, this job description continues to be true. I like it.

Posted in Uncategorized | Leave a comment

ddwrt DNS resolution error due to question mark

Just an FYI to anyone who mistakenly puts a question mark (i.e. ?) at the end of one of their hostnames in the static leases section of their DHCP server tab. It will hose all DNS lookups (i.e. no internet) on the network served by the ddwrt router. I know this should be obvious to any web developer, but I did this and it took me 30 mins to resolve the issue. Hope this helps someone else.

Posted in Linux, networking, Uncategorized | Leave a comment

Proxmox postfix relayhost authentication error

I’ve grown to really appreciate the community version of the proxmox vitalization server, but because I’m too poor to afford the subscription version I tend to upgrade the entire server on a semi-annual basis. I do this by moving all the containers, or KVM images, to another proxmox server, then upgrade the now bare proxmox server using the updated proxmox install iso .  I then reconfigure the server to my specific needs using a bash script. One of the tasks in this script is to set up postfix’s relayhost config to allow my promox server to email via google’s smtp servers when something is wrong. It is usually pretty straight forward, but with proxmox version 4.0 (based on Debian Jessie) I got this error in /var/log/mail.log:

SASL authentication failed; cannot authenticate to server smtp.gmail.com no mechanism available

Since I had used the exact same setup/configs as my prior servers I knew something was up. A quick search of google produced the answer. I needed to run:

aptitude install libsasl2-modules

And then everything worked. Thank you HowToForge for the answer.

For those who are interested, here’s the relevant portion of my install script

#Add email forwarding
aptitude install -y libsasl2-modules #this fixed a SASL authentication failed; cannot authenticate to server smtp.gmail.com no mechanism available error
sed -i 's|relayhost =|relayhost = [smtp.gmail.com]:587|g' /etc/postfix/main.cf
sed -i 's|mynetworks =|mynetworks =, 10.X.X.X/24|g' /etc/postfix/main.cf
sed -i 's|inet_interfaces = loopback-only|inet_interfaces = all|g' /etc/postfix/main.cf
echo "smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_sasl_security_options =
mydomain= $DOMAIN
myhostname= $HOSTNAME.$DOMAIN
myorigin=$HOSTNAME.$DOMAIN" >> /etc/postfix/main.cf
#add password db for email google authentication
echo "[smtp.gmail.com]:587 me@gmail.com:"$GOOGLE_PW > /etc/postfix/sasl_passwd
chmod 400 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
#register aliases and restart postfix
echo "root:me@medengineers.com" >>/etc/aliases
/etc/init.d/postfix restart



Posted in Uncategorized | Leave a comment