On Sun, 2003-03-02 at 18:37, Robert Fleming wrote:
Does anybody have a clever way of automating this so that the
creation and filing happens automatically, such that I can subscribe to
new lists and just have the right things happen?
Here is what I use. It seems to work with most of the lists I'm subscribed
too. [the expression line is long, so I wrapped it at the OR/AND
delimiters]
Awesome! Many thanks for sharing this!
After a few days of tinkering, this is the version I ended up with:
if (!$LISTS_FOLDER)
LISTS_FOLDER = "Lists"
if ((
/^List-Id:.*<![:alnum:]*\-?[:alnum:]*\-?[:alnum:]*\-?[:alnum:]*!.*>/ ||
/^X-list: ![:alnum:]*/
|| /^Mailing-List: contact ![:alnum:]*\-?[:alnum:]*!-help@.*/
|| /^Mailing-List: list ![:alnum:]*\-?[:alnum:]*!@.*/
|| /^Sender: owner\-![:alnum:]*\-[:alnum:]*!@cyrusoft.com/
|| /^List-Post: <mailto:![:alnum:]*/)
&& !/^X-Spam-Status: Yes.*/ )
{ exception {
to .${LISTS_FOLDER}.${MATCH2}/
}
exception {
logfile $HOME/mailfilter2.log
`maildirmake -f ${LISTS_FOLDER}.${MATCH2} $HOME`
`echo Created ${LISTS_FOLDER}.${MATCH2} in ${HOME} |
mail -s 'new listserv folder created' ${LOGNAME}`
to .${LISTS_FOLDER}.${MATCH2}/
}
}
This is in a file that is included from several users' mailfilter files.
Thanks again!
William