Tomas Kuliavas wrote:

Before you ask, yes, I looked at the "Server Side Filter" plugin. :)

The problem is that only secure connections are allowed to the server,
so ftp is not allowed. sftp and scp are allowed, but not ftp.

Any ideas on other ways to let my users update their .mailfilter files?

http://article.gmane.org/gmane.mail.squirrelmail.plugins/5892


Latest beta version does not use ftp. It uses SUID binary.

This is exactly what I need. It's currently Linux-centric though, and I'm in the process of making it work on FreeBSD, which I've been documenting on the courier-users list, so I won't here (but will gladly do so once done, if anyone's interested).


I have it working, except for two things, the second of which is likely a configuration error on my part: 1) it doesn't do tls yet, and 2) it is naming sub-folders wrong.

The first may be because the included Linux binary (which I'm running on FreeBSD via Linux emulation) doesn't have tls built into it. Is anyone here using that binary on Linux, that can confirm or deny this? I do know that the comments in filtercmd.c claim that it gets the server address and port from the SM config file, but it does not. It retrieves $imapServerAddress, but not $imapPort - at least not anywhere that I can determine, so I'm not sure how it would manage a connection to port 993 anyway. But for the moment, that's the lesser of my concerns.

The second problem is that, since I'm using Courier-IMAP, I have $default_folder_prefix set to nothing, so that my Maildir has the following structure:

peter# ls Maildir
.Drafts                 .Trash                  cur
.Ebay in                .ebay                   new
.Other                  courierimapkeywords     tmp
.Sent                   courierimapsubscribed
.Ste                    courierimapuiddb
peter#

This is the correct layout - yes?

Unfortunately, when I create a filter via the plugin - say, for instance to move anything that has a To: or Cc: line with "dhpotter+ste@" in it to the "Ste" folder, it writes the filter as:

##Begin Filter Configuration -- Please do not edit by hand, use SquirrelMail
MAILDIR=$HOME/Maildir/ # Default mail directory

###TO_ '' dhpotter+ste@ '' INBOX.Ste '' m '' on '' off ''  '' Contains
if (/^(To|Cc):.*dhpotter\+ste@/:h)
{
to "$MAILDIR/INBOX.Ste"
}

to "$MAILDIR"

##End Filter Configuration

When this filter is triggered, it causes an unsubscribed file called "INBOX.Ste" to be created, with the message in it, rather than putting the message in the ".Ste" folder:

peter# ls -CF Maildir
.Drafts/                .Trash/                 courierimapuiddb
.Ebay in/               .ebay/                  cur/
.Other/                 INBOX.Ste               new/
.Sent/                  courierimapkeywords/    tmp/
.Ste/                   courierimapsubscribed
peter# file Maildir/INBOX.Ste
Maildir/INBOX.Ste: ASCII mail text
peter#

Being the sometimes smart person that I am, I read the included FAQ file, which states:

peter# cat FAQ
Q1) The filter writes folders like this:
      $MAILDIR/INBOX.Trash
   instead of like this:
      $MAILDIR/.Trash

A1) You need to setup the Default Folder prefix:
    1) Run the SquirrelMail conf.pl
    2) Select option 3 (Folder Settings)
    3) Select option 1 and enter 'INBOX.'


peter#


So I did what it said, and it fixed one problem, and created another (don't they always? :) ).

Now, the filter (when recreated) says (in part):

to "$MAILDIR/.Ste"

and when triggered, the mail goes where it should. Success! Well, almost.

By having $default_folder_prefix set to "INBOX.", when next accessed, Courier-IMAP creates these in the Maildir directory:

.INBOX.Drafts
.INBOX.Sent
.INBOX.Trash

which I don't want, and if I create a new folder off of INBOX, called "Shaun", I get this in the Maildir:

.INBOX.Shaun

instead of this:

.Shaun

Clearly, it seems I want $default_folder_prefix set to nothing, but that leaves the filter file "to" line being written incorrectly, and the mail going to the wrong place.

Is anyone using this plugin on Linux, with SM 1.4.2 and Courier-IMAP 2.2.1, that can tell me if I just have something configured wrong, in SM, the module, Courier-IMAP, or some combination thereof, or if it's just a bug in the module? I'd like to narrow it down, and maybe fix my setup, before I start hacking the module.

-ste


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click -- squirrelmail-users mailing list List Address: [EMAIL PROTECTED] List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995 List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to