Koozali.org: home of the SME Server
Obsolete Releases => SME 9.x Contribs => Topic started by: mophilly on September 29, 2020, 01:11:33 AM
-
I have a group of incoming email addresses that need to be moved to a single directory in the mail tree. The idea is that incoming email from Ann, Bob, Cathy, Doug, Ed or Francis, should be put in the IMAP directory named, say, "Tree Project".
Individual rules work fine, of course, but being a lazy man I wondered if there was way to set up a single filter for it. None of these people have SME user accounts.
I believe the mail sort contrib uses regex for the filter parsing, so I tried using pipes between the incoming addresses. I found that pipes are not allowed. I also tried a comma delimited string but that appears to function like "and".
How might I set up an "or" filter?
Perhaps a better question is "What flavor of regex is used in SME/mail sort?"
-
How does ths mail come in?
POP3 or SMTP?
Either way the mail must be be ultimately directed to a user account eg admin.
Can you use mail sorting contrib with procmail to sort it?
-
How does ths mail come in?
POP3 or SMTP?
Either way the mail must be be ultimately directed to a user account eg admin.
Can you use mail sorting contrib with procmail to sort it?
SMTP
Yes, there is an SME user account that hosts the target directory.
The mail sort contrib is installed and is using procmail. Presently, the user account in question has a bit more than 260 rules defined.
-
The rules are pretty simple. I think it is tricky to parse/save more complex searches via the web panel.
You could just write a custom procmail template to do more complex commands.