Thread: Mail Filter
View Single Post
Old 9th July 2009, 03:04
Rescue9 Rescue9 is offline
Join Date: Jun 2007
Posts: 52
Thanks: 5
Thanked 3 Times in 2 Posts

Ok, after much trial and error from a complete php noob, I've figured a few things out.

First, I have verified that using a $variable inside the .mailfilter file works. I stripped out quite a bit of the .mailfilter file as follows:

if (/^Subject:.*\[BGTEditors\]/:h)
myfolder = "$DEFAULT/.Yahoo Groups.BGTEditors/"
exception {
to $myfolder
Assigning myfolder must happen without $. Trying to assign it as $myfolder breaks it. Also, the $DEFAULT/.Yahoo Groups.BGTEditors/ MUST be wrapped in quotes. Not having these also breaks it.

Now, not knowing how ISPConfig writes these rules, I can only assume that having multiple rules with only 1 $myfolder would break things. I plan on changing this variable to [filter_id]EndFolder as such; 2EndFolder. As each FilterID is unique, this should help avoid variables being named the same.

Right now, I'm working on modifying the mail_user_filter_edit.php to write the .mailfilter as above. I'll work on changing the variable later.
Reply With Quote