Pedro Hernandex <phph...@yahoo.es> wrote:
Pedro,
I had a look at your Maildrop script in which you do a lot of filtering of
mailing lists and I think you may be interested in the
following fragment:
if ( /^List-Id:.*<![0-9A-Za-z_\-]*!/ \
|| /^X-list: ![0-9A-Za-z_\-]*!/ \
|| /^Mailing-List: contact ![0-9A-Za-z_\-]*!-help@.*/ \
|| /^Mailing-List: list ![0-9A-Za-z_\-]*!@.*/ \
|| /^Sender: owner\-![0-9A-Za-z_\-]*!@cyrusoft.com/ \
|| /^List-Post: <mailto:![0-9A-Za-z_\-]*/ \
|| /^List-Subscribe: <mailto:![0-9A-Za-z_\-]*!-subscribe@.*/ \
|| /^Return-Path: <owner-![0-9A-Za-z_\-]*!@.*>/ )
{
exception {
to "${VMAILDIR}/.${LISTS}.${MATCH2}/"
}
exception {
`${MAILDIRMAKE} -f ${LISTS}.${MATCH2} ${VMAILDIR}`
`( echo Subject: New IMAP folder created ; \
echo Created ${LISTS}.${MATCH2} in ${VMAILDIR} ) \
| QMAILNAME="Mail Admin" \
QMAILUSER="postmaster" \
QMAILHOST=robinbowes.com \
${QMAILINJECT} ${EXT}@${HOST}`
to "${VMAILDIR}/.${LISTS}.${MATCH2}/"
}
}
What this does is pretty simple:
If the message is from mailing list, it is delivered to a folder with the same
name as the list. If the folder doesn't exist it is
created and a message notifying the user is sent.
HTH,
R.