#1  
Old 6th July 2009, 18:14
Rescue9 Rescue9 is offline
Member
 
Join Date: Jun 2007
Posts: 52
Thanks: 5
Thanked 3 Times in 2 Posts
Default Mail Filter

I can't understand how to get the mail filter to work with folders that contain spaces. I'm coming from an ISPConfig2 setup and the procmail.rc worked wonderfully with this, but .mailfilter doesn't want to play nice.

I have multiple folders titled .Yahoo Groups.MyYahooGroup. In the procmailrc it was listed as \.Yahoo\ Groups\.MyYahooGroup. I've tried every configuration of that I could, and even searched the web. The only fix I could find was actually nesting the entire directory inside quotes, but this would require the user manually editing the .mailfilter as opposed to using the web frontend.

Any help is appreciated!
Reply With Quote
Sponsored Links
  #2  
Old 7th July 2009, 13:13
Rescue9 Rescue9 is offline
Member
 
Join Date: Jun 2007
Posts: 52
Thanks: 5
Thanked 3 Times in 2 Posts
Default

Is there no way to use a folder name that has a space in it now?

If this is not possible with the current setup, is it possible to rewrite the code that generates the .mailfilter file from the web front end. My understanding is that if the folder name is in quotes, then it should work correctly. If the script that generates the .mailfilter file rewrote the filter as a variable, rather than inputting the text directly inline, then it might be possible to use various folder names.

MyFilterName="$DEFAULT/.Yahoo Groups.MyFolderName"

I've gotten my information from various places, but here is the one that most accurately describes what I'm trying to say: http://www.nabble.com/Maildrop-TO-ex...d17189650.html
Reply With Quote
  #3  
Old 7th July 2009, 13:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,041
Thanks: 841
Thanked 5,660 Times in 4,467 Posts
Default

Please post this to the bugtracker and we will check this:

http://bugtracker.ispconfig.org
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 7th July 2009, 16:19
Rescue9 Rescue9 is offline
Member
 
Join Date: Jun 2007
Posts: 52
Thanks: 5
Thanked 3 Times in 2 Posts
Default

Bug Report submitted: #806
Reply With Quote
  #5  
Old 8th July 2009, 02:59
Rescue9 Rescue9 is offline
Member
 
Join Date: Jun 2007
Posts: 52
Thanks: 5
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
  #6  
Old 8th July 2009, 09:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,041
Thanks: 841
Thanked 5,660 Times in 4,467 Posts
Default

This will not work as $this->dataRecord["target"]
is also a variable like $WhatIsMyTarget, so your code does the same then the original code. I guess you mixed up that $this->dataRecord["target"] and $WhatIsMyTarget are variables interpreted and replaced by PHP when the code of the form is executed and they are not variables inerpreted by maildrop like $DEFAULT.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix problem and few questions Gimly Installation/Configuration 12 7th July 2009 17:27
Postfix + postfixadmin = SMTP errors... Rashef Server Operation 4 25th June 2009 17:12
just the last step...and it works. Postfix...need help config. ubuntusr Installation/Configuration 1 5th January 2009 10:50
Problem with dcc-client installation (Postfix) swap-as Installation/Configuration 9 18th September 2008 21:47
Apache2 Freezes celtic Server Operation 31 28th May 2007 18:18


All times are GMT +2. The time now is 21:24.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.