# try this out (untested, of course!)
:0
* ^TO_\/[a-zA-Z.-]+@
{
# chop off the ending '@' char
# and make all chars lowercase
NAME="echo $MATCH | sed 's/@$//' | tr '[A-Z]' '[a-z]'"
:0:
$NAME
}
Here is a recipe I use that works sort of like you want.
# puts email addressed to php-general, php-dev, php-install, etc
# in their respective folders
:0
* ^TO_\/php-(general|dev|install|pear|db)
{
FOLDER="echo $MATCH | tr '[A-Z]' '[a-z]'"
:0:
$FOLDER
}
On Sat, 18 Nov 2000, Eugene Geldenhuys wrote:
Hi
I have a requirement for a menu which sorts mail into multiple
mailboxes with minimal intervention.
I have put together the following menu, but it allows invalid
characters to slip through and creates really wierd mailbox names
like <james, "james", james), etc.
#Procmail recipe file to sort incoming mail to individual mailboxes
#
:0:
* ^TO_\/(.*)@
* MATCH ?? ()\/[^(_at_)]+
$MATCH
Can anyone help me with the correct syntax to strip the invalid
chars - I have tried various things like:
* ^TO_\/([a-z0-9.-]+)@
to no avail
Best Regards
Eugene Geldenhuys
MCNE ECNE MCSE MCP
TFX SOLUTIONS -
PROFESSIONAL NETWORK DESIGN ,IMPLEMENTATION AND SUPPORT
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail