<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="Robin Whittle"> <meta name="GENERATOR" content="Mozilla/4.78 [en] (Windows NT 5.0; U) [Netscape]"> <title>Maildrop filtering, deltag mods and subjadd</title> </head> <body text="#000000" bgcolor="#ffffff" link="#0000ee" vlink="#551a8b" alink="#ff0000"> <h2> Maildrop filtering and my two extensions to its capabilities</h2> <p>This page discusses: </p> <blockquote> <table cellspacing="0" cellpadding="8" width="60%"> <tbody> <tr valign="top"> <td valign="top"><a href="#DelTag">>>></a> </td> <td valign="top">Source code changes to Courier Maildrop so a<font size="+1"> message can be delivered tagged for deletion</font>. (Also a binary for Red Hat 9.0.)</td> </tr> <tr valign="top"> <td valign="top"><a href="#subjadd">>>></a> </td> <td valign="top">An external filter program called<font size="+1"><b><tt> subjadd</tt></b></font> which can add a label [Postfix] to the subject line of an email. It will also create a subject line if there was none.</td> </tr> <tr valign="top"> <td><a href="#Filtering">>>></a> </td> <td>My experiences with Maildrop's filtering language, and some simple example files.</td> </tr> </tbody> </table> </blockquote> Robin Whittle 29 May 2003<br> <br> Please see an earlier version of this directory if you are want to see how I did this in 2001. <a href="../Maildrop-mods-filtering-2001">../Maildrop-mods-filtering-2001</a> .<br> <br> The material below is for version 1.5.3 of Maildrop, from about 2003 May 2. <br> <br> <a href="../">To the web-mail directory</a> , from where you can reach such things as: <ul> <li> Survey of web-mail systems.</li> <li><b>mb2md</b> - a perl script for converting multiple Mbox mailboxes into Maildir format.</li> <li> "How-I-Did-It"s for installing:</li> <ul> <li> Postfix</li> <li> Courier IMAP</li> <li> Courier Maildrop</li> <li> Courier SqWebMail</li> <li> Postman web-mail system form University of Valencia, in Spain.</li> <li><font color="#990000"><b>How I called Spam Assassin and Anomy Sanitizer from Maildrop to filter spam, viruses and other malware.</b></font><br> </li> </ul> <li> My 71 foot long <i>Sliiiiiiinky</i> and many non-technical distractions.</li> </ul> <hr align="left" size="1" width="200"><br> <h2><a name="DelTag"></a> Maildrop extension: DELTAG - Tagged for Deletion</h2> <blockquote>This is a modification to two?? files in the Maildrop source code. So you need to recompile Maildrop to be able to use these. But you probably need to be able to recompile it anyway to set it to work with your preferred mailbox locations. Please see my discussion of Maildrop via the parent web-mail directory.</blockquote> <h4> Why I want to deliver messages to the Inbox tagged for deletion</h4> <blockquote>I want to replicate the functionality of Netscape's (4.77 for Windows) mail filtering system (also, I guess, Mozilla's and Netscape 7's - but when I last did filtering in the client, it was with N4.77) - but to do it entirely at the server. I am on several dozen mailing lists and so filtering is vital. Before using Maildrop filtering, I had N4.77 set up to copy messages to the particular mailbox for that mailing list, and to leave the message in the Inbox, but flagged for deletion. This client-based filtering happened when I "Alt-F M" Netscape to check for new mail. The headers come to N4.77 and it sends commands back to the IMAP server about where to put the messages and whether to set the "T" tagged for deletion flag for messages which also remain in the Inbox. But client-based filtering is a pain for a number of reasons. With Maildrop, I can achieve all this and more on the server. <p>The great benefit of this approach to filtering - copying to the target mailbox and putting a copy in the Inbox, tagged for deletion - is that I can see all the activity on my lists without having to look into their various mailboxes. When I have scanned the "tagged for deletion" messages, (which I can read, print, reply to or untag with the Del key) then I use "Alt-F F" (for Netscape 7)to expunge the mailbox. Netscape tells the IMAP server to delete them all. </p> <p>This client-based filtering worked OK, with the following restrictions: </p> <ol> <li> Netscape can only filter on particular types of header line. It is possible to specify other headers, but this is a drag and every time you install a new version of Netscape, it doesn't know about these extra types. Also, I found it hard or impossible to make it filter reliably on a certain header which are commonly the best ones to use for filtering a mailing list. I don't remember which ones it was, but maybe it is "Resent-by:" or similar.</li> <li> My entire email empire was dependent on using Netscape to check for all mail, and having that installation of Netscape loaded with my most up-to-date filtering rules.dat file. This makes remote access from a laptop a pain. It also precludes using a web interface like Postman or IMP, because all emails first seen by Postman will not be first seen by Netscape, so they will not be subject to Netscape client-based mail filter rules. (Actually Netscape may be smarter than this - perhaps the later versions recognise emails it has not seen before, irrespective of whether another client has seen them so far.) I get several hundred emails a day, mainly from mailing lists. (An ISP sys-op I know was getting 200 emails a day just for him, not counting list traffic!)</li> <li> When connected by a slow link, such as a 9.6 kbps (supposedly - but it feels like this at half duplex) high latency (1.4 seconds ping time . . . Urrggh!!) link involving a GSM phone, a laptop (IR link) and the 56/33 kbps access-router modem at the ISP which connects my server to the Net, email is really <i>painful</i> and was costing me lots of money as well as driving me nuts. I takes ages to sort the emails, several seconds for each one. Worse still, if the session drops out in the middle of this, then the mail sorting is not done properly and there are typically dozens of messages in the Inbox which are not tagged for deletion. Trying to tag them with Netscape is even more painfully slow and error prone, since if you take any action before the now very slow IMAP exchange finishes, then the message appears to be tagged, but in fact is not tagged. In practice, it is easier to telnet (now <a href="http://www.openssh.org/">OpenSSH</a>) to the server and delete them with a text-mode email program! I was spending an hour a day at least when I was away recently just trying to keep up with the email, and this was mainly trying to get Netscape to filter correctly, and cleaning up the mess when the link dropped out. I hardly read or responded to any emails. Never again!</li> </ol> <p><br> The advantages of the Maildrop filtering approach include: </p> <ol> <li> By filtering each email as it arrives with Maildrop, I remove all dependence on my email client. This means I can access my account with a web-mail program such as Postman, SqWebMail or IMP from any web browser, SSH to the machine and use Pine or Mutt, or use Netscape via IMAP. (I think I will generally be using Netscape or Mozilla via IMAP over the LAN - but perhaps also from far away.)</li> <li> There is no time spent filtering when I connect via a client.</li> <li> Filtering should be very reliable, since it is not affected by client communication problems.</li> <li> Maildrop's filtering language is extremely powerful.</li> <li> With my two modifications/extensions to Maildrop, I can add labels to the subject lines of messages from mailing lists which have no such label. For instance, the Postfix mailing list is extremely busy, but there is nothing distinctive in its subject lines. I will be able to add labels like "[Postfix]" to each subject line of the emails in my Inbox so I know which mailing list they belong to.</li> <li>I can implement virus and spam filtering from Maildrop, as documented in a page you can find from the parent directory.</li> <li>I can do what I like with the mail filtering system, including cause the computer to run a program, make a beep etc. when particular messages arrive.<br> </li> </ol> The potential disadvantages of the Maildrop filtering approach is: <ol> <li> Netscape (or any other IMAP based email client) does not know that new emails have been put in mailboxes. (The Inbox is fine - just use the normal "Alt-F M" command - N4.77 - or Ctrl T for Netscape 7.02.) The workaround is to close the window for that mailbox and re-open it. The best way to do this is to click on the "parent folder" of whatever mailbox is currently in this window. For the Inbox or other mailboxes on the "first level" this is a folder with the name of the mail server. For mailboxes in other folders, it is that folder itself. In either case, the current window becomes selected to a "non-mailbox" and then clicking on the original mailbox causes Netscape to look at the mailbox again, so it sees all new messages. </li> <li> I have to use SSH<strike>telnet</strike> to a shell account and use an editor there to edit a potentially tricky <tt>.mailfilter</tt> file, and then watch to see that it is working and has no syntax errors, typically by sending myself a test message. However, each section of the file, for each mailing list, should have a pretty standardised form, and comments are allowed, so I can document what I am doing.</li> </ol> </blockquote> <blockquote> <h4>Operational matters based on experience</h4> I have been using this mail filtering system for nearly 2 years and it is a great success. <br> <br> I find that some mailing lists have a plethora of ways in which they can forward email, and so it is necessary to keep refining my filtering rules. I expected this. For instance a list which normally sets the "Return-Path: " header reliably may not do this if the message it is forwarding already contains some other "Return-Path: " and or was Cc:ed to the list, rather than sent To: it.<br> <br> There is an important operational matter to consider. Since emails can arrive at any time (unless, I suppose, I manually halted Postfix for a while) my plan of seeing every bit of list activity via the "Tagged for Deletion" copies in the Inbox can only be reliable if (when using Netscape 7 Messenger, for instance) :<br> <ol> <li>I use Ctrl T to check for the latest received messages.</li> <li>I then look to see if any new ones have arrived which I want to read - and then read them (or I guess undelete them and read them in the Inbox later, or remember to read them in the mailing list box).</li> <li>I use Alt F, F to delete all messages which are tagged for deletion.</li> <li>No messages arrive in the Inbox tagged for deletion between steps 1 and 3.</li> </ol> </blockquote> <blockquote>I discovered this one morning. There were a few messages tagged for deletion which had arrived the night before, so I thought "OK. lets clear those (Alt F, F) and then Ctrl T to get the new messages. But the Alt F, F deletes all messages in the folder which were tagged for deletion, whether Netscape had seem them or not. So I was scratching my head wondering why there had been so little mailing list activity overnight!</blockquote> <br> <br> <h4> The changed code and what it does</h4> <blockquote>The two new source files, and their original versions from ,Maildrop-1.5.3 are here. Also a tarball with the source and the modified maildrop binary, compiled for i386 (Pentium Pro) on Red Hat 9.0. <blockquote><tt><a href="maildir.C"></a></tt></blockquote> <tt> <a href="maildir.C.txt">maildir.C.txt</a> </tt><tt> 6,031 bytes </tt><br> <tt> <a href="maildir.C-orig.txt">maildir.C-orig.txt</a> </tt><tt> 4,138</tt><tt> bytes<br> <br> <a href="maildircreate.c.txt">maildircreate.c.txt</a> </tt><tt> 6,393 bytes</tt><br> <tt> <a href="maildircreate.c-orig.txt">maildircreate.c-orig.txt</a> </tt><tt> 4,670 bytes</tt><tt> <br> <br> <a href="maildrop-1.5.3-DELTAG-mods.tar.gz">maildrop-1.5.3-DELTAG-mods.tar.gz</a> </tt><tt>100,126 bytes </tt><br> <br> <font color="#000000"><br> </font><font color="#000000">I had previously done a full install of Maildrop, as documented in another page</font> on <a href="../RH90-Postfix-Courier-Maildrop-IMAP/">../RH90-Postfix-Courier-Maildrop-IMAP/</a><font color="#000000">. To get it to do what I wanted, I had to change one configuration option. The option is in <tt>maildrop/config.h</tt></font><font color="#000000"> - the line: </font>#define DEFAULT_DEF "./Maildir" . Please see the section <b><a href="#DelTag">Compiling Maildrop</a> </b>in that page.<br> <font color="#000000"><br> <br> By the filtering commands setting a variable "DELTAG" to "1", any subsequent delivery, either "to" or "cc" which are to Maildir format mailboxes will result in the message having the "T" flag set on its file name. IMAP servers recognise this as the "Tagged for deletion" flag. At least with Courier IMAP and Netscape, the email will be moved from the /new/ directory of the Maildir to the /cur/ directory, with this tag intact. Then it will show up in the client as tagged for deletion, and a subsequent IMAP expunge command will delete it.</font> <p><font color="#000000">The source is well commented, self-explanatory and all the changes are tagged "RW". Copyright public domain.</font></p> <p><font color="#000000">See the filtering section below for some examples.</font></p> </blockquote> <p><br> </p> <hr align="left" size="1" width="200"><br> <h2><a name="subjadd"></a> subjadd - add a label like [XYZ] to the Subject: line of an email</h2> <blockquote>Here is the source file, and a tar-gzip file with the source and firstly a Red Hat 7.1 i386 executable and secondly a Red Hat 9.0 i386 executable.:<br> <br> Here is the source file, a Red Hat 7.1 i386 executable and the two zipped: <blockquote><tt><a href="subjadd.c">subjadd.c</a> 11,108 bytes</tt><br> <tt><a href="subjadd">subjadd</a> 17,882 bytes</tt><br> <tt><a href="subjadd.tgz">subjadd.tgz</a> 9,829 bytes</tt></blockquote> <tt> </tt> <b>subjadd</b> is a filter - working from stdin to stdout. Maybe it will be useful for other situations than being called from Maildrop. Please let me know if you have any such uses. <p>Here is the usage text for <b>subjadd</b>: </p> <p><tt><font color="#000099"> Adds a label such as [XYZ] to the subject line of an email on</font></tt><br> <tt><font color="#000099"> stdin and sends it to stdout. The label is the only argument.</font></tt></p> <p><tt><font color="#000099"> subjadd [XYZ] results in:</font></tt></p> <p><tt><font color="#000099"> Subject: Foo Subject: Re: Bar</font></tt><br> <tt><font color="#000099"> Subject: [XYZ] Foo Subject: Re: [XYZ] Bar</font></tt></p> <p><tt><font color="#000099"> Always passes the file, but only writes the label if it is the</font></tt><br> <tt><font color="#000099"> sole argument. If there was no subject line, then an empty one</font></tt><br> <tt><font color="#000099"> is added, preceded by an informative header line:</font></tt></p> <p><tt><font color="#000099"> X-Subjadd: No subject line, so this one was added by subjadd.</font></tt></p> <p><tt><font color="#000099"> "subjadd" primarily means "adding to the subject line"</font></tt><br> <tt><font color="#000099"> but if there was no subject line, then its function is to</font></tt><br> <tt><font color="#000099"> "add a subject line" too.</font></tt></p> <p><tt><font color="#000099"> Always returns 0. Intended to be used with the xfilter</font></tt><br> <tt><font color="#000099"> command of Sam Varshavchik's Maildrop mail filtering program.</font></tt></p> <p><tt><font color="#000099"> Public domain. Robin Whittle www.firstpr.com.au 8 July 2001</font></tt><br> </p> </blockquote> <p><br> </p> <hr align="left" size="1" width="200"> <h2><a name="Filtering"></a> Exploring Maildrop's filtering</h2> <blockquote>Note: see the <a href="../">parent directory</a> for another page, begun in October 2002, with more Maildrop filtering examples and how I use it to run Spam Assassin and Anomy Sanitizer.<br> <br> Maildrop has an extensive and well organised filtering language. The typical arrangement is for each user to have a <tt>.mailfilter</tt> file in their home directory. This is a text file, using the commands documented in: <blockquote> <li><a href="http://www.flounder.net/%7Emrsam/maildrop/maildropfilter.html"> http://www.flounder.net/~mrsam/maildrop/maildropfilter.html</a> <a name="maildropfilter"></a> Documents the filtering language.</li> <li><a href="http://www.flounder.net/%7Emrsam/maildrop/maildroptips.html"> http://www.flounder.net/~mrsam/maildrop/maildroptips.html</a> Hints on using the filtering language.</li> </blockquote> There is not much in the way of examples in this documentation. <p>Patterns can be matched, typically in the email's header, but also in the body or in both, and actions taken. Actions include delivering it to a mailbox, by default to the Inbox, or to any number of email address. An email can be copied to a local mailbox (and then perhaps to another) before, typically but not necessarily, being delivered to the Inbox. </p> <p>The filtering "recipe" - as I will refer to the contents of the <tt>.mailfilter</tt> file or any other files it includes - also has the capability to pass the message through an external program, which processes the message from stdin to stdout according to parameters in or generated by the filtering program. In this way, the message itself can be modified. </p> <p><tt>.mailfilter</tt> must have its permissions set only to be accessible to the user, otherwise Maildrop generates an error. Maildrop compiles the contents of the file and exits with an error if there is a syntax problem with it. An error to this effect will be written in <tt> /var/log/maillog</tt> . For instance: </p> <blockquote><tt>postfix/local[23463]: 3CDCF3D9C: to=<blah@firstpr.com.au>, relay=local, delay=0, status=deferred (temporary failure. Command output: <font color="#ff0000">.mailfilter(33): Syntax error after if </font>)</tt></blockquote> The <tt><font color="#ff0000">(33)</font></tt> refers to the line number where the syntax error occurs. <p>The intention is that the calling program, the MTA - Postfix in my case - will queue the message for delivery later. Postfix does do this. The command: </p> <blockquote><tt>postfix flush</tt></blockquote> will cause all queued messages to be delivered immediately. <p>It haven't figured out how to run Maildrop on the command line to check the <tt>.mailfilter</tt> syntax, but I am sure it can be done, or achieved by some script. Without such a test, the way to test that he new filtering recipe does not have syntax errors is to send yourself a test email and check that it comes through. </p> <p><b>Setting the filter recipe by web or email?</b></p> <p>The filtering language is pretty fancy, and not the sort of thing a non-technical user would want to mess with. A good project would be a Web or email interface into this filtering capability. For instance placing an email of a particular format into a particular mailbox via IMAP, where a program would crunch it, convert it to a <tt>.mailfilter</tt> file or if there were any errors, annotate the original file with pointers to what needs to be fixed. Alternatively, Maildrop could have a filter recipe to pass an email with special flags that it contains a new filter recipe to an external program which will extract the recipe, install it, send a test mail, and if it gets through, leave the new recipe in place and send an acknowledgement email. If the new recipe had syntax errors, then the program would remove it, restore the old one and send something helpful back to the user about whatever errors Maildrop reported (in <tt>/var/log/maillog</tt> ). The same system could also make a copy of the filter log available by some means, such as mailing it to the user. </p> <p>From the same stable as Courier, Courier IMAP and Courier Maildrop, is a cgi-based web-mail system called SqWebMail. This has a web-based filtering interface for Courier Maildrop. <a href="http://www.inter7.com/sqwebmail/"> http://www.inter7.com/sqwebmail/</a> - but I haven't checked it out. See my page via the parent directory of my installation of it and my brief evaluation. </p> <p>When I get up to speed with mail filtering, I will put some sample files here. The documentation of the filtering language is clear, but has very few examples. </p> <p><b>Brief examples of a filtering "recipe"</b></p> <p>Here is a simple .mailfilter file: </p> <blockquote><tt><font color="#cc33cc">logfile "maildrop-filter-log"</font></tt> <p><tt> # Search the message body for distinctive SirCam virus/worm text.</tt><br> <tt> #</tt><br> <tt> # ":b" means search the body.</tt></p> <p><tt><font color="#3366ff">if( ( /I send you this file in order/:b) \</font></tt><br> <tt><font color="#3366ff"> || ( /Te mando este archivo para que/:b) \</font></tt><br> <tt><font color="#3366ff"> )</font></tt><br> <tt><font color="#3366ff">{</font></tt><br> <tt> # Copy it to a mailbox. Then add a label</tt><br> <tt> # deliver it to the Inbox.</tt><br> <tt> # The "to" command terminates filtering.</tt><br> <tt> <font color="#3366ff"> cc "Maildir/.yyy.xxx"</font></tt><br> <tt><font color="#3366ff"> DELTAG=1</font></tt><br> <tt><font color="#3366ff"> xfilter "subjadd [SirCam]"</font></tt><br> <tt><font color="#3366ff"> to "Maildir"</font></tt><br> <tt><font color="#3366ff">}</font></tt><br> <br> </p> <p><tt> # Now look in the headers only, for a particular line.</tt><br> <tt> # Absence of ":b" means search in the headers only.</tt><br> <tt> # The "^" means look for this text at the start of the</tt><br> <tt> # line only.</tt></p> <p><tt><font color="#009900">if ( /^Delivered-To: postfix-users@cloud9.net/ )</font></tt><br> <tt><font color="#009900">{</font></tt><br> <tt><font color="#009900"> cc "Maildir/.Lists.Postfix"</font></tt><br> <tt><font color="#009900"> DELTAG=1</font></tt><br> <tt><font color="#009900"> xfilter "subjadd [PF]"</font></tt><br> <tt><font color="#009900"> to "Maildir"</font></tt><br> <tt><font color="#009900">}</font></tt></p> </blockquote> <p><br> If statements are supposed to be on a single line - so use trailing backslashes to continue them (or any other statement) over mulitple lines. </p> <p>Be especially careful not to have a blank line after an if (. . . ) line!!! If the example had been: </p> <blockquote><tt><font color="#3366ff">if( ( /I send you this file in order/:b) \</font></tt><br> <tt><font color="#3366ff"> || ( /Te mando este archivo para que/:b) \</font></tt><br> <tt><font color="#3366ff"> )</font></tt> <p><tt><font color="#3366ff">{</font></tt><br> <tt><font color="#3366ff"> .....</font></tt></p> </blockquote> then the if statement would have not had any effect and control would fall through to whatever was in the braces. <br> <br> <p>Note that the two mailboxes mentioned here are specified by their exact directory name, relative to the user directory. This is how it works with Courier IMAP, but Maildrop does not rely on Courier IMAP and can deliver to Maildir mailboxes no matter what the IMAP/POP server is: </p> <blockquote><tt><font color="#3366ff">Maildir/.yyy.xxx/</font></tt></blockquote> is a mailbox in the <tt>yyy</tt> folder (of the INBOX, as are all folders with Courier IMAP) of name xxx <blockquote> <p>(Note: See the mb2md page from the parent directory to read more about Courier IMAPD's Maildir mailbox naming and directory structures, and how to convert from Mbox format to Maildir.)<br> </p> </blockquote> <p>Likewise: </p> <blockquote><tt><font color="#009900">Maildir/.Lists.Postfix</font></tt></blockquote> appears to the user as: <blockquote><tt>Inbox -----------------------</tt><br> <tt> |</tt><br> <tt> | --- Lists</tt><br> <tt> | |</tt><br> <tt> | | --- Postfix ---</tt><br> <tt> | |</tt></blockquote> In the Maildrop' log file, as specified at the start of the <tt>.mailfilter</tt> file, the two sections above generate results like this when they successfully handle a message: <blockquote><tt><font color="#3366ff">Date: Thu Aug 2 00:10:52 2001</font></tt><br> <tt><font color="#3366ff">From: Foo <foo@example.org></font></tt><br> <tt><font color="#3366ff">Subj: [SirCam] Fantasies for Mistress.doc</font></tt><br> <tt><font color="#3366ff">File: Maildir/.yyy.xxx (243295)</font></tt> <p><tt><font color="#009900">Date: Thu Aug 2 00:17:13 2001</font></tt><br> <tt><font color="#009900">From: Foo <foo@example.org></font></tt><br> <tt><font color="#009900">Subj: [PF] Postfix rocks!</font></tt><br> <tt><font color="#009900">File: Maildir/.Lists.Postfix (2474)</font></tt></p> </blockquote> <p><br> If the filtering recipe specifies sending the message to a mailbox which does not exist as a proper Maildir mailbox, then Maildrop will create an ordinary Mbox format mailbox file of that name instead. </p> <p>The Maildrop filtering language is rich: </p> <ul> <li> Extra log file entries can be generated as desired: simply use the "log" command followed by text.</li> <li> Files can be conditionally included - which saves long, rarely needed sets of filtering instructions from needing to be compiled except when needed.</li> <li> There are text and numeric variables.</li> <li> There are if, for and while constructs.</li> <li> There are ways of trapping exceptions within a section which would normally be fatal to Maildrop!</li> <li> "Although Maildrop evaluates expressions numerically, results of expressions are stored as text literals. When necessary, text literals are converted to numbers, then the results of a mathematical operation is converted back into a text literal."</li> </ul> So I don't see much reason to be concerned about the language being inadequate for any mail filtering operation. <p>Here are some advanced examples I can think of: </p> <p>Lets say I get a bunch of emails all the time from Telstra Internet about outages all over the country - but in fact I never look at them because the Subject: lines are all the same, and very few concern me. A filtering rule could find these messages, and then scan the body to identify those which concern my neck of the woods. Then, those messages could be given distinctive labels and perhaps copied or delivered to the Inbox in ways which are different from the rest of these messages. </p> <p>It is possible to use an external programs or scripts to send email to any destination - including to an SMS message gateway. So the filtering system could alert me via my mobile bone to particular incoming emails. <br> <br> </p> <h4>Which headers to look for in mailing lists?</h4> <p> </p> <p>Generally, for mailing lists I find that the "Return-Path: " header # is the most distinctive and stable for all the ways that messages can be sent to a mailing list. Yahoo Groups lists (and others which run from elzm) are different - the "Return-Path: " is customised for every message. So the "Reply-To: " seems to be the best header. But list servers can do all sorts of things! </p> <p>Sometimes the "Delivered-To: " header can be distinctive, such as to <tt>xxxxx-outgoing@example.org</tt> .<br> <br> </p> <h4>Examples<br> </h4> <p> Here is a slightly shortened copy of my original operational .mailfilter file:<br> </p> <blockquote><big><a href="my.mailfilter.txt"> my.mailfilter.txt</a></big> <br> </blockquote> <p>In fact, as time goes on, it gets more elaborate rules to cope with every possible way some list servers might relay mailing list messages.<br> </p> <p>Here is a section of the log file it generates:</p> <blockquote> <p><big><a href="mailfilter-log.txt">mailfilter-log.txt</a></big> </p> <p> </p> </blockquote> </blockquote> <p><br> </p> <h3>Update history</h3> <ul> <li>2003 May 29 Page established, based on August 2001 version.</li> </ul> <br> <p><br> </p> <blockquote> <p><br> </p> <blockquote> <p> </p> </blockquote> </blockquote> <br> <br> <br> <br> <br> </body> </html>