Welcome to Terry Collins's
HOW-TO on presorting your email


Or "A Guide to Efficency With Email"


I finally become exasperated with people who complain that they get too many emails. What I have discovered is that they collect all their email in the one mail box and try to give equal attention to each and every piece of email.

This is not exactly the wisest way. When I go to my snailbox, the only examination the junk receives is to be separated out prior to it being dumped into my paper recycling bin. Then the real mail is sorted by addressee.

The good news is that most email software allows you to do this automatically. The result is that you can read the mail that you need to, when you want to and you can find it when you want to. This is the only way I can combine my interest in linux, genealology, GIS and a few other areas without being overwhelmed by the daily influx.

What I am including below is a how-to for each linux mail reader on pre-sorting your mail. contributions are welcome.


General Instructions

  1. Think about the groups you want your mail sorted into.
  2. Think of something unique in each email group (The subject line, sender, CC).
  3. Create your inbox folders
  4. Create your mail sorting rules.

The Mail Readers

  1. elm
  2. exmh
  3. mutt
  4. netscape
  5. pine
  6. procmail
  7. xfmail
  8. Acknowledgements

Back To WOA Linux Resources Page
Back to WOA Front Page

Elm


No instructions at present.


Back to Table Of Contents

exmh


Can be obtained from http://www.beedub.com/exmh/

How to filter is at http://www.beedub.com/exmh/guide.html#FILTERING MAIL

Some Feedback on the information at this site from David Fisher

It worked, but with gotchas.

I use EXMH and so I tried following the instructions at the EXMH site, which 
failed to work when I tried a line like

subject [slug]          +      ?       "SLUG"

in .maildelivery.

Not to be deterred, I tried the alternative set of instructions which say:

subject [slug]          |       ?       "/usr/local/lib/mh/rcvstore +SLUG"

but, of course, as the packages were installed from binary packages (.debs), 
the line should REALLY be:

subject [slug]          |       ?       "/usr/lib/mh/rcvstore +SLUG"

S'pose this would apply to any distro such as RH using pre-rolled packages.

Likewise, the .forward line to invoke slocal is shown as

|       /usr/local/mh/lib/slocal -user yourname

should be

|       /usr/lib/mh/slocal -user yourname

Note the lack of local and the typo juxtaposing mh and lib.

Thought all this might be useful to you.  You can add me to your database of 
contacts for EXMH users if you like.


Back to Table Of Contents

mutt


Can be obtained from http://www.mutt.org

No filtering is available - use procmail.


Back to Table Of Contents

netscape

  1. From the Mail & Newsgroups Box
  2. Select Edit
  3. Select Message Filters
  4. Select New
  5. Give the Filter a Name (this is what you will see in the list)
  6. Enter the selection criteria (all means and and any means or)
  7. Select the pre-sort box you want mail moved to.
  8. Fill in something in the bottom (I don't know where this turns up)
  9. Hit OK
  10. Adjust as necessary
  11. Warning - there is a 16,384 character limit on ~/.netscape/mailrule

Back to Table Of Contents

pine


This was contributed.

> Although not strictly 'pre-sorting' you can from the message index
> press '$' and sort by various options like arrival date, from, to,
> subject.
> 
> In addition, if you go into (S) Setup, (C) config and scroll down to
> Advanced settings you could press X to check the "enable aggregate
> command set" option.
> 
> Once the aggregate command set is enabled you can use ';' to select a
> bunch of messages then 'a' to apply some function to the selection
> (like save to a folder, delete etc). Alternatively, you can tag
> messages manually using the ':' button and then use 'a' to apply a
> command to the manually tagged messages.
Otherwise, it seems procmail is the way.
Back to Table Of Contents

procmail


From man procmail

"procmail - autonomous mail processor. Procmail should be invoked automatically over the .forward file mechanism as soon as mail arrives". This is the mail sorter you use when your mailer (pine, ?) does not allow you to pre-sort/filter mail.

How to use procmail to set up filtering. This comment was made {:-)

"man procmail, man procmailrc, man procmailex, man procmailsc. This works for *any* mail client, and is generally more powerful than any filtering provided by mail clients. It's also more difficult to write filtering rules, but the man pages are pretty good with plenty of examples."

Now for the practical example provided.

>   Here's my .procmailrc:
> 
> ---------
> 
> # maintain a cache of msg ids and discard duplicates
> :0 Wh: msgid.lock
> | formail -D 8192 .msgid.cache
> 
> # any message with the subject "send pgp key" is redirected to my
> # autoresponder
> :0 W
> * ^Subject:.*(send|get)[ -]+pgp[ -]+key
> | $HOME/bin/sendpgpkey.pl
> 
> # this section rewrites broken pgp headers so that mutt knows that it's a
> # pgp encrypted/signed message
> #
> # this doesn't work for attachments, but at least it catches some
> # incorrectly formatted messages
> :0
> * !^Content-Type: message/
> * !^Content-Type: multipart/
> * !^Content-Type: application/pgp
> {
>     :0 fBw
>     * ^-----BEGIN PGP MESSAGE-----
>     * ^-----END PGP MESSAGE-----
>     | formail \
>         -i "Content-Type: application/pgp; format=text; x-action=encrypt"
> 
>     :0 fBw
>     * ^-----BEGIN PGP SIGNED MESSAGE-----
>     * ^-----BEGIN PGP SIGNATURE-----
>     * ^-----END PGP SIGNATURE-----
>     | formail \
>         -i "Content-Type: application/pgp; format=text; x-action=sign"
> }
> 
> # Now sort the mail into different folders.
 > 
> # Anything from root on swamprat is probably worth looking at immediately
> :0:
> * ^From:.*root@swamprat.vastsystems.com.au
> Mail/urgent
> 
> # Sydney Linux Users Group list
> :0:
> * ^Sender: owner-slug@newtreno.spectrum.com.au
> Mail/slug
> 
> # gcc/cross-gcc/binutils/newlib mailing lists.  All are hosted on either
> # cygnus.com or gnu.org machines
> :0:
> * ^Sender:.*-owner@.*cygnus.com
> Mail/gnu
>
> # bugtraq is another high traffic list
> :0:
> * ^Sender:.*bugtraq@securityfocus.com
> Mail/bugtraq
> 
> # everything else gets dumped into the inbox
> :0:
> Mail/inbox
> 
> ---------
James Wilkinson provided a procmail bit to remove add adds that are commonly attached to free mailing lists.
I'm subscribed to a school friends list there, I use this procmail entry
to remove the ads tacked onto the messages (listname munged):

:0:
* ^Mailing-List:.*list.*oldschoollist@egroups.com
| sed '/-~-~>$/,/--_->$/d' >> lists/oldschoollist
On 2001-05-08, James also posted this URL to the Slug list of his new .procmailrc;
http://spacepants.org/dot.procmailrc

Otherwise, it seems procmail is the way.
Back to Table Of Contents

xfmail


xfmail can be obtained from http://xfmail.slappy.org.

These are the contributed instructions;

> Once you have your folders set up, you need the rule definition dialog. This
> can be found at 'Rules' on the 'Misc' menu in the main window.
> 
> It's not that obvious how to use the Rules dialog, and it is slated for
> improvement. At the time of writing, XFMail is being ported to use GTK, so I
> don't expect the Rules dialog to change much for the while.
> 
> The Rules dialog has a 'Help' button which will produce a window of
> documentation. However, to get you going, this is what you do to create a
rule
> to move all mail from the SLUG list into a Slug folder:
> 
> i.    Select 'Create' from the 'Folder' menu and create a new folder
>       named 'Slug'.
> ii.   Hit the 'New' button at the bottom of the dialog.
> iii.  Enter SLUG in the rule name area (top right).
> iv.   Select the 'Move' radio button (if it isn't already).
> v.    Hit the 'Folder' button and select the Slug folder you created already.
> vi.   Enter 'owner-slug' in the Text box in the Match area.
> vii.  Hit the 'Message' button and select 'Sender'.
> viii. Ensure 'Type' 'Incoming' radio button is selected.
> ix.   Hit the 'Add' button. This should add 'SLUG' to the list of rules.
> x.    Hit the 'Save' button to save your new rule.
> xi.   Hit 'Ok' to close the dialog.
> xii.  Test your rule. Highlight a message to the SLUG list in the
>       main window, and select 'Apply Rules' from the 'Message' menu.
>       The message should be re-filed in your SLUG folder. From now on,
>       all messages to the SLUG list should be placed in the SLUG folder
>       automatically when XFMail collects them.


And Jim Hague, jim.hague@acm.org, has kindly offered to answer questions. Thanks Jim.


Back to Table Of Contents

Acknowledgments

Providing this sort of page is made a lot easier when you are assisted by other people and to this end I would like to thank Ken Yap, John Clarke, Jim Hague, Grant Parnell, David Fisher and James Wilkinson for their significant contributions.


Back to Table Of Contents

Back To WOA Linux Resources Page
Back to WOA Front Page

These WWW pages were created with asWedit on GNU/Linux