Grayson County/Fries Hydroelectric Dam

Over the Thanksgiving holiday while visiting with family, I found myself in Grayson County and did a little exploring. Ended up in Fries (pronounces “freeze”) and had the chance to check out an early 1900s hydroelectric dam. Very interesting to see a town that was built out purely because of industry. Had time allowed for it, could have spent many more days exploring the area. Scroll down or click the link for some photos.

Fries was named after North Carolina cotton mill owner Colonel Francis Henry Fries. Jim ‘Pipe’ Carico (of Stephens Creek, Virginia, the nearest incorporated town) contacted Fries in 1900 and proposed Bartlett Falls on New River as a site for a hydroelectric dam that could power a cotton mill.

Fries purchased the surrounding rural farmland then hired a local labor force to build a dam, a cotton mill and a full-service company owned town. By 1901, the New River Train was extended to the mill site and Fries petitioned the Virginia State Legislature to incorporate the new town of Carico, VA in honor of Jim ‘Pipe’ Carico. For reasons that are not well documented, the town name was instead legislatively changed to Fries, Virginia and officially incorporated in 1902.

More on the area and history from Wikipedia here.

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!