Stealth E-Mail to the Rescue
Establish an IMAP folder hierarchy and Procmail configuration file to file mail in those folders. If you have multiple users, you have to do this for each user. The following configuration uses ~/.m for the folder root directory. The per-user Procmail configuration file is located in ~/.prcmailrc. I use the following .procmailrc file template that implements the essential functionality of separating spam from mail and filing mailing lists. For details, refer to procmailrc(5):
PATH=/bin:/usr/bin:/usr/sbin MAILDIR=$HOME/.m DEFAULT=$MAILDIR/Mbox LOGFILE=$HOME/.procmail.log VERBOSE=yes # File gentoo-user mailing list into ~/.m/lst/gentoo :O: * (^To.*|^Cc.*)firstname.lastname@example.org lst/gentoo # File jobserve mail into ~/.m/lst/jobserve :O: * ^From.*jobserve.com lst/jobserve # File SPAM into ~/.m/Spam with some exceptions: :O: * ^X-Spam-Level:.*\* * !^From.*netflix * !^From.*vail * !^From.*ebay member * !^From.*cnet Spam # File SPAM that escaped spamassassin: :O * ^From.*eversave.com Spam :O: * ^From.*sears.com Spam
Now that the mail processing facilities are in place, you can start Postfix and let the mail start flowing in; I can almost guarantee that the first folder with mail will be your ~/.m/Spam:
# /etc/init.d/postfix start
The IMAP configuration includes a stunnel SSL front end and the uw-imap back end. The installation for uw-imap is a bit nonstandard, because the default Gentoo configuration does not allow you to build uw-imap with clear-text authentication over an unencrypted channel. The only default uw-imap configuration that works is the one with SSL support. This is not what we need as a server behind stunnel. Gentoo lets you remedy this with a special USE setting to disable SSL and enable clear-text passwords.
The installation command for Gentoo is:
# USE="-ssl clearpasswd" emerge uw-imap
Next, the stunnel configuration file stunnel.conf needs to include an IMAP section. Edit /etc/stunnel/stunnel.conf:
pid = /var/run/stunnel/stunnel.pid socket = l:TCP_NODELAY=1 socket = r:TCP_NODELAY=1 cert = /etc/ssl/certs/foobar.net.pem [imaps] accept = 993 exec = /usr/sbin/imapd execargs = imapd
You can generate a self-signed SSL certificate for foobar.net.pem with the following commands:
# cd /etc/ssl/certs # openssl req -new -x509 -nodes -out cacert.pem -keyout cakey.pem -days 5000 Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:CO Locality Name (eg, city) :Highlands Ranch Organization Name (eg, company) [Internet Widgits Pty Ltd]: Organizational Unit Name (eg, section) :home Common Name (eg, YOUR name) :foobar.net Email Address :email@example.com # cat cakey.pem cacert.pem > foobar.net.pem
With Gentoo, you must now configure the init rc scripts to start stunnel:
# rc-update add stunnel default
As I mentioned, there are two good IMAP clients available for PalmOS. One is the standard application included with the Treo, VersaMail. The other is a commercial application, SnapperMail. My choice was the latter, even in spite of its relatively high cost (approximately $60 US).
Both applications allow for subscribing to a hierarchy of IMAP folders on the server and handling e-mail attachments. SnapperMail is definitely better tested and has a number of features that justify its additional cost.
To install PalmOS applications and generally manage my Treo 650 using Linux, I use pilot-link software. On Gentoo, install it with:
# emerge pilot-link
I use pilot-link to back up and restore my Treo to a directory on Linux as well as to install applications like SnapperMail.
I use Bluetooth and PPP to connect my Treo to a Linux notebook. You also can use a USB connection. The connection channel for pilot-link tools is conveniently defined with a PILOTPORT environment variable. Use the following for a USB cable:
# export PILOTPORT=/dev/tts/USB1
or for Bluetooth, use:
# export PILOTPORT=net:any
I create a directory named treo in my home directory, and run this command to back up my Treo before installing any software:
# pilot-xfer -b treo
I use the following command to synchronize (incrementally) the Treo with this backup directory:
# pilot-xfer -s treo
To restore a backup, use the following:
# pilot-xfer -r treo
Download SME231.zip from www.snappermail.com to install the SnapperMail application. Unzip the file and run this command:
# pilot-xfer -i SnapperMail-ent.prc
The configuration of the Treo 650 with the Sprint network is best done by ordering the Sprint PCS Vision Professional Pack and letting Sprint support walk you through the setup.
SnapperMail also comes with a good 60-page PDF manual, and its setup is really quite intuitive.
Peter Ziobrzynski is an Independent Consultant based in Toronto, Canada, providing UNIX and Linux consulting services to clients in San Francisco, California, and recently in Denver, Colorado. Peter holds a Master's degree in Engineering from Cracow University of Technology, Poland. He immigrated to Canada in the early 1980s and has been using UNIX since then for work and pleasure. His recent focus is on Linux, and he holds Red Hat RHCE.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- New Products
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Nice article, thanks for the
2 hours 40 min ago
- I once had a better way I
8 hours 26 min ago
- Not only you I too assumed
8 hours 44 min ago
- another very interesting
10 hours 37 min ago
- Reply to comment | Linux Journal
12 hours 30 min ago
- Reply to comment | Linux Journal
19 hours 24 min ago
- Reply to comment | Linux Journal
19 hours 40 min ago
- Favorite (and easily brute-forced) pw's
21 hours 32 min ago
- Have you tried Boxen? It's a
1 day 3 hours ago
- seo services in india
1 day 7 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?