Monday, April 25, 2011

How To Get Around The New York Times Paywall

The New York Times will now allow you to see a limited number of articles (20?) before "enforcing" a paywall, showing you a preview of each article and pointing you toward a subscription page. But, this paywall is about as leaky as a BP blowout preventer. Search for the title of the article on Google News, click the first link, and, voila! Paywall removed. Apparently, the NYTimes wants to have its cake and eat it too. They want to keep all the revenue generated by ads and search traffic, and add a paid subscription revenue stream. I pay $5/year for ad-free access to The Wunderground. I don't see why I should be paying almost $200/year for a subscription that doesn't even get rid of the ads, especially when I can find comparable content elsewhere...

Tuesday, April 5, 2011

Rewriting the Envelope "From" Address

I use AuthSMTP for mail delivery when sending automated emails via my web server. Recently, I noticed that they were failing:

Real domain name required for sender address (in reply to MAIL FROM command)
The web server was using www-data@localhost as the envelope "from" address and AuthSMTP didn't like such a bogus domain.

While reading/searching the postfix documentation, I discovered that postfix can rewrite such local/bogus email addresses automagically. See the section on Generic mapping for outgoing SMTP mail.

But postfix died after I customized the example and tried to restart postfix. The example forgot to mention that the mapping needs to be encoded in a database format in order for postfix to read it. After you create a file named generic in /etc/postfix, you need to run:

sudo postmap hash:generic
from the /etc/postfix directory. This will create a Berkeley DB file with the same information as your plain-text file.