Content from 2014-03

I like reading LWN like a newspaper on my Kindle but find it painful to click through the calibre GUI every time a new issue appears. I also find it useful to be able to download and make ebooks out of the historical issues. Unfortunately there was no really good way to do this, so I have made a couple of hacks to facilitate these two things. Have a look here, if you're interested.

Just put your credentials in the username and password files, or delete these files altogether, if you only want to download the free version. Put 0 in the issue file for the most recent issue (paid version) or 1 or above for any of the later issues (free version). Then add to your cron:

30 7 * * 4 /home/your_account/calibre-hacks/recipes/download-and-send.sh calibre-hacks/recipes/lwn your_account@free.kindle.com

to have a LWN issue delivered to you every Thursday morning.

Install the ssmtp MTA:

sudo apt-get install ssmtp

Then configure it:

]==> cat /etc/ssmtp/ssmtp.conf
mailhub=your.smtp.net:587
AuthUser=your_login
AuthPass=your_password
UseTLS=YES
UseSTARTTLS=YES

Map users:

]==>  cat /etc/ssmtp/revaliases
local_username:username@domain.net:your.smtp.net:587

Make sure it's safe:

chown root:mail /etc/ssmtp/ssmtp.conf
chmod 640 /etc/ssmtp/ssmtp.conf
usermod -a -G mail local_username

Log out and log in again.