[OGo-Users] Filter (Sieve) Problem Using Move To Folder option.

Adam Tauno Williams users@opengroupware.org
Mon, 26 Nov 2007 22:16:17 -0500


> to work. Looking at the "ogo.script" and "ogo.bc" files i saw that the rule was
> created like this one: "fileinto INBOX.WEBMIN". Looking at the "cyradm" a saw
> that the address to this folder is "user/smith.rock/webmin". So, if i change,
> by hand, the rule into the "ogo.bc" file to "fileinto INBOX/WEBMIN" the filter
> works fine.
> Thats some way to still using dotted addresses and make OGo save the filters
> correctly into the "ogo.script" and "ogo.bc" files???

Yes, I'm pretty certain there is a default that determines the separator
character.  

Try setting "SieveFilenameSeparator' in NSGlobalDomain to "."

In Tools/sky_install_sieve.m is -

- (NSString *)sieveFilenameForString:(NSString *)fileName {
  NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
  NSString *sep;
  
  if ([fileName hasPrefix:@"/"]) {
    fileName = [fileName substringWithRange:
                           NSMakeRange(1, [fileName length] - 1)];
  }

  sep = [ud stringForKey:@"SieveFilenameSeparator"];
  if (![sep isNotEmpty])
    sep = @".";
  
  if ([sep isEqualToString:@"/"])
    return fileName; /* return as-is, no transformation required */
  
  fileName = [[fileName componentsSeparatedByString:@"/"]
	                componentsJoinedByString:sep];
  return fileName;
}