Thread: Mail Filter
View Single Post
  #5  
Old 8th July 2009, 01:59
Rescue9 Rescue9 is offline
Member
 
Join Date: Jun 2007
Posts: 52
Thanks: 4
Thanked 3 Times in 2 Posts
Default

Forgive me if I start thinking aloud here, but I'm hoping that someone might be able to interpret my ramblings. Keep in mind that at this time THIS CODE DOES NOT WORK. DO NOT TRY TO USE IT. I'm going to try debugging this later myself and also manually edit the .mailfilter code to see if using a variable overcomes the space. If it does, then editing the code to use a variable should kill the bug.

Looking at mail_user_filter_edit.php, it seems like if we take this:
Code:
		if($this->dataRecord["action"] == 'move') {
		
			$content .= "
`test -e ".'$DEFAULT/.'.$this->dataRecord["target"]."`
if ( ".'$RETURNCODE'." != 0 )
{
  `maildirmake -f ".$this->dataRecord["target"].' $DEFAULT'."`
  `chmod -R 0700 ".'$DEFAULT/'.$this->dataRecord["target"]."`
  `echo INBOX.".$this->dataRecord["target"]." >> ".'$DEFAULT'."/courierimapsubscribed`
}
";		
		}
and change it to something like this :
Code:
               $WhatIsMyTarget = $this->dataRecord["target"]
		if($this->dataRecord["action"] == 'move') {
		
			$content .= "
`test -e ".'$DEFAULT/.'.$WhatIsMyTarget."`
if ( ".'$RETURNCODE'." != 0 )
{
  `maildirmake -f ".$WhatIsMyTarget.' $DEFAULT'."`
  `chmod -R 0700 ".'$DEFAULT/'.$WhatIsMyTarget."`
  `echo INBOX.".$WhatIsMyTarget." >> ".'$DEFAULT'."/courierimapsubscribed`
}
";		
		}
Then the spacing in the folder names should work. That all depends on whether the information in the nabble.com link works, and using a variable overcomes the spacing.
Reply With Quote