Robert R Schneck's Cygwin page

Cygwin provides a Linux-like environment on computers running Windows. It is quite pleasant; one can almost feel that one is using Linux with a very Windows-like window manager. Plus, you can run Windows executables, even from the bash command line.

I used to maintain the sSMTP package for Cygwin. sSMTP is an extremely simple sendmail replacement, which forwards messages to a mailhub (e.g. your ISP's outgoing mail server), and does nothing else.

The upstream source for sSMTP is here.

Offline Mail and News Reading with Cygwin

I suggest the following packages for offline mail reading and composing:

the MUA (mail user agent); you'll use it to compose mail
the mail retrieval utility; it fetches your mail from a POP or IMAP server
the MDA (mail delivery agent); fetchmail will call it to put mail in your mailbox (/var/spool/username)
the MTA (mail transport agent); it will send your outgoing mail to an SMTP server

I also use the following scripts:

simply adds outgoing mail to a queue (the directory /var/spool/out.going/)
sends all the messages in the queue using ssmtp
optionally called by outmail to strip the Message-ID: header from the outgoing mail; I prefer the SMTP server to use its own

Fetching Mail

To download your mail you'll use fetchmail. You'll need a .fetchmailrc file in your home directory. Here's mine (almost):

  with proto AUTO
  user 'schneck' there is 'schneck' here 
    password "not_my_real_password"
    mda '/usr/bin/procmail -f %F -d %T'

You should find this easy to customize. Replace with your own incoming mail server; replace schneck and schneck with your username on the mailserver and the Cywin machine, respectively; replace not_my_real_password with your real password on the mailserver; and potentially remove the ssl line. You might replace AUTO with IMAP, POP2, POP3 or some other protocol; see the fetchmail man page for more.

Now to fetch the mail just call


That's it! One potential improvement is to use something like

fetchmail --limit 50000; fetchmail

This will pull in small messages first, which can be nice on slow connections; you can respond to the small messages while all the messages with attachments are still downloading.

Sending Mail

Run ssmtp-config to set up the configuration file for ssmtp; the options should be well-explained. Then configure pine to queue outgoing mail, using my script above, by setting


Now when you send a message with pine it will be stored in /var/spool/out.going/. Just run the script outmail periodically to send out those messages using ssmtp. That's it!


This section is under construction. I use the newsreader slrn, which comes with an offline newsfeed tool slrnpull. Currently this is not an officially maintained Cygwin package, but Gerrit P Hasse has put up some downloads here. You'll also need the S-Lang package and the UUDeview package from the same page. (Also, the openssl and libiconv official Cygwin packages.)

Here's a sample /var/spool/news/slrnpull/slrnpull.conf. The 0 means all available articles are retrieved; the 14 means the number of days before articles expire; and every other line is a newsgroup to retrieve.

default 0 14

The following lines should be in .slrnrc in your home directory:

set server_object "spool"
set post_object "slrnpull"
set spool_inn_root "/var/spool/news/slrnpull"
set spool_root "/var/spool/news/slrnpull/news"
set spool_nov_root "/var/spool/news/slrnpull/news"

Now just run slrnpull periodically, to retrieve and post articles. You should also run slrnpull --expire even more periodically.

Personally, I use the following little script, which I call netflux; I run it as soon as I connect, and right before I disconnect, and often many times in between.

outmail &
(fetchmail --limit 50000; fetchmail) &
slrnpull &

Last updated 2005-12-05.

Robert R Schneck / <>