Stealth E-Mail to the Rescue
My selection of the Gentoo Linux distribution for the project was dictated by the very convenient Portage package management. Portage completely frees the user from hunting down required packages. In operation, it resembles Perl CPAN or Debian apt-get. For installation of Gentoo itself, refer to the gentoo.org Web site. The installation of the OS is mostly manual, and it can be a rather lengthy process (some installations even can take days, because you compile everything yourself), but this investment will pay itself back during server management and application configuration.
You also need to get the DNS and SMTP services from No-IP.com, mentioned above. The No-IP.com Web site provides documentation for all services they provide.
The instructions that follow are Gentoo-specific, but it should be fairly easy to adapt this project to a different distribution. You simply need to make sure that the applications you install have the capabilities (like SASL) used for this solution.
We begin installation with the core component, Postfix. Standard Gentoo installation comes with a simple MTA ssmtp that needs to be removed before Postfix installation. Also, Postfix needs to be installed (compiled) with SASL support. This is needed for authenticated mail delivery to the No-IP.com relay host (Alternate-Port SMTP service).
The SASL option is turned on with the sasl keyword added to the Gentoo USE configuration variable. In /etc/make.conf, add:
Install SASL libraries:
# emerge dev-libs/cyrus-sasl
Now remove and add MTAs:
# emerge -C ssmtp # emerge postfix
Add init rc script startup:
# rc-update add postfix default
Postfix configuration is relatively simple—two configuration files in /etc/postfix need attention: main.cf and master.cf.
Change the information describing your gateway host by editing the main.cf file for Postfix. Here, the hostname of your gateway is mygateway, and the domain name is foobar.net. The relay host that you will send all your mail to is relayhost.no-ip.com, receiving SMTP on port 1234. Both will be provided by No-IP.com as part of the Alternate-Port SMTP service:
myhostname = mygateway mydomain = foobar.net myorigin = $mydomain mydestination = $myhostname, localhost.$mydomain $mydomain #home_mailbox = .maildir/ relayhost = relayhost.no-ip.com:1234 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/saslpass smtp_sasl_security_options =
Add an extra port (4321) beside 25 to the Postfix master.cf file. This will be used to receive SMTP from the Mail Reflector No-IP.com service and also your Treo 650:
4321 inet n - n - - smtpd
Create an SASL password file /etc/postfix/saslpass for host relayhost.no-ip.com and user foobar.net@noip-smtp using password ????—all provided by No-IP.com:
/etc/postfix/saslpass: relayhost.no-ip.com foobar.net@noip-smtp:????
Next, generate a dbm map:
# cd /etc/postfix # postmap saslpass
As a final touch, you need to enable e-mail relaying from your Treo 650. We use Sprint here, and you will have to find out what Sprint switch IP range will be connecting to your server. The Postfix main.cf parameter mynetworks will have to include the network address of the switch. I use 188.8.131.52/8 beside my home network and a local loop network. It is always best to narrow the range of addresses as much as possible, for security reasons:
mynetworks = 192.168.1.0/24 127.0.0.0/8 184.108.40.206/8
You need to install two packages: spamassassin and procmail. The steps (for Gentoo) are as follows.
# emerge procmail
# emerge spamassassin
Update the init rc scripts to start the SpamAssassin server (this is probably done for you if you use a different package manager):
# rc-update add spamd default
Adjust your Postfix configuration to deliver all mail using Procmail. Add this to /etc/postfix/main.cf:
mailbox_command = /usr/bin/procmail
Create the main Procmail configuration file /etc/procmailrc, and add this recipe to make e-mail pass through SpamAssassin:
DEFAULT=/var/spool/mail/$LOGNAME :0fw: spamassassin.lock * < 256000 | /usr/bin/spamc
Start the spamd server:
# /etc/init.d/spamd start
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Sony Settles in Linux Battle
- Libarchive Security Flaw Discovered
- Profiles and RC Files
- Maru OS Brings Debian to Your Phone
- The Giant Zero, Part 0.x
- Snappy Moves to New Platforms
- Astronomy for KDE
- Git 2.9 Released
- Understanding Ceph and Its Place in the Market
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide