OSX / Using Google Apps as a SMTP server

Scenario: You’re working from a home ISP connection or traveling, but would like to have your Mac send emails for jobs that have completed or other misc. notices without having to reconfigure each time. Since many ISPs block outbound SMTP servers on standard ports, forcing you to use their servers, this can be a headache.

I decided to use Google’s App/SMTP server to get around this as it uses a non-standard SMTP port and requires authentication. There are tons of guides on how to do this online, but none of them seemed to work for my setup. So, without further ado, here’s how to setup your mac, leveraging Google servers as a relay via Postfix:

First edit /etc/postfix/main.cf:

$ sudo vi /etc/postfix/main.cf

Add this to the end of the file:

myhostname = _HOSTNAME_
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
smtp_sasl_mechanism_filter = plain

Also, edit this line and adjust it to your preference, default is 1MB. I changed mine to 100MB since I send large logfiles:

message_size_limit = 100000000

Edit/create /etc/postfix/sasl_passwd. You’ll need to login to your Google account and create an app password. Spaces from this password are not required in this file:

$ sudo vi/etc/postfix/sasl_passwd

The format of the file should look like this:

[smtp.gmail.com]:587 user@domain:app_password

Modify the permissions of the password file to protect the contents:

$ sudo chmod 600 /etc/postfix/sasl_passwd

Next, hash the password. This will create a sasl_passwd.db file:

$ sudo postmap /etc/postfix/sasl_passwd

Restart the postfix services for the change to take effect:

$ sudo launchctl stop org.postfix.master
$ sudo launchctl start org.postfix.master

And finally, run a test:

$ date | mail -s "test 1 again” you@yourdomain.com

Check the queue for errors. Should report “Mail queue is empty” if everything went well.

$ date && postqueue -p

If you received the message, then you’re all set. Your OS can now send mail from anywhere in the world without having to worry about reconfiguring for local SMTP servers due to blocked ports.

Happy mailing!

Good ping, poor speed

I miss my home wifi. The hotel we’re in has horrible internet. And I’m gonna end up spending a fortune trying to constantly tether.. It’s gotten to the point where I walk the halls looking for wireless access points and repeaters, and start resetting them just to save the front desk time. Hopefully the appartments we’ll be in next week will be better.

Airfoil FTW

airfoil-mac@2x.png

Not sure how I missed out on this, but I Just discovered Airfoil for OSX and the companion iOS app Airfoil Speakers. This is a pretty fantastic app duo, allowing me to stream music from my Mac to an old unused iPhone which is connected to the stereo in my office without a physical connection. The audio quality is very nice, with only a second or so delay from the time that I change tracks, pause, etc.

Screen Shot 2015-11-11 at 3.11.09 PM.png

justa.fyi (seriously)

No, the title of this post isn’t rhetorical, I snagged the domain name justa.fyi from namecheap tonight and have it redirecting to my blog now. Such a cool domain, shocked that it wasn’t already taken. Not sure what I’ll end up doing with it, but for now it will point here.

Had another domain in the works as well, but due to regulations from the country that holds that TLD, I need to be a citizen or have a local mailing address to register it. a12s be on the lookout for a ping in the near future.

Where "SCRAM" comes from

The control room harkens back to a more analog era, when instruments on the wall looked like not much more than a piece of spiral graph paper behind glass and there was a noticeable lack of computer screens. There’s also the all-important SCRAM button, for emergency shut-down of the reactor. A museum sign explains the history of the acronym, which comes from an earlier plant, Chicago Pile-1, and a rather rudimentary-sounding emergency system.
The Chicago plant is notable for being the first to reach a state in which its nuclear-fission chain reaction was self-sustaining. Despite that achievement, however, emergency precautions at the time weren’t very high-tech, at least by today’s standards. Those precautions included workers suspending a thin rod of cadmium from a rope so that it dangled above a hole in the reactor. They used cadmium because it can slow down or stop a nuclear reaction by absorbing neutrons, hopefully stemming a disaster. But there was no automatic mechanism to make the cadmium fall into the hole. Instead, a museum sign explains, a “sturdy young male physicist stood by the rope, holding an axe.” (You can’t make this stuff up.) If something went wrong, he’d “swing his axe and cut the rope, plunging the rod into its hole and shutting down the reaction instantly.” That earned him the name “Safety Control Rod Axe Man,” now SCRAM for short.

Add this to the list of jobs I never want to have! Tour the World’s First Nuclear Power Plant via The Smithsonian Magazine. 

Barcode history is probably more interesting than you thought

It had been calculated that only ten digits were needed; the barcode had to be readable from any direction and at speed; there must be fewer than one in 20,000 undetected errors.

Based largely on morse code, and originally intended to streamline the checkout process at a supermarket, the barcode has a pretty interesting history. Iterate, iterate, iterate; and eventually success ensues, as does widespread adoption of new and useful technologies.

Read more about it here, via the Smithsonian Magazine.

Astronaut

My office Friday and Saturday was the Richmond Speedway, where I hung out with Dawn and a couple other NASA folks who were manning a booth demonstrating the Resource Prospector. This is a rover in development that will scour the Moon for water beneath the surface, take core samples, and examine the specimin to determine what’s in it, and if it can be used by man, should we try to colonize the moon.

All in all, it was really great to see how interested the kids were in driving the rover, the questions they asked, and the questions their parents had. Just goes to show that science isn’t boring in the right context, and that kids really do enjoy learning – even if they claim the opposite.

Then this guy walked by:

  

Norway will say goodbye to FM radio in 2017

Looks like Norway will become the first country in the world to completely phase out FM radio over the next two years, in favor of digital audio broadcasting. The cost savings is pretty significant, according to a press release issued: “The cost of transmitting national radio channels through the FM- network is eight times higher than with the DAB-network”.

The DAB model is really interesting, surprisingly (to me) as of this writing, 43 countries use this as a communications medium.

Digital audio isn’t a new technology, I’m pretty familiar with its use in two way communications, specifically trunked radio systems going digital for encryption purposes. This usually results in many more transmission sites, poor/choppy audio and a myriad of complaints from those using the system if it isn’t done right. But that’s here in the states where there’s a limited number of frequency ranges available for use, with the higher frequencies unable to reach long distances without repeaters all over the place.

I’m really interested in how the spectrum is going to be handled in Norway, if they’ll be using low frequency terrestrial transmitters, or multiple higher frequency sites. I’m sure some of the information is out there…my inner-geek has been awoken, need to learn more about this.