|
From: Paul L. <pa...@sq...> - 2006-01-12 17:56:39
|
Just FYI, this thread is better placed on the plugins mailing list.
> >>> Installing SM on new server (we have older version working on current
> >>> server).
> >>> SM is from debian stable package: 1.4.4 <sorry debian packages is
> >>> down for the last couple of days> googled for similar problems but no
> >>> luck Setup:
> >>> - debian Sarge 64 (Opteron)
> >>> - Apache (eventually ssl but not yet)
> >>> - Dovecote (but I don't think this is relevent)
> >>> - Mailbox type maildir
> >>> - maildrop 1.5.3 <- yes its eve at /usr/bin/maildrop
> >>> - PHP 4.3.10-16
> >>> - apache Apache/2.0.54
> >>> Plugins
> >>> Installed Plugins
> >>> 1. delete_move_next
> >>> 2. squirrelspell
> >>> 3. compatibility
> >>> No issues
> >>>
> >>> Attempting to install serversidefilter
> >>>
> >>> Tried both procmail and maildrop.
> >>>
> >>> If $ALWAYS_CREATE =3D true;
> >>>
> >>> SM generates:
> >>> Fatal error: Call to undefined function: _write_spam_filter() in
> >>> /usr/share/squirrelmail/plugins/serversidefilter/functions.php on
> >>> line 90
> >>
> >> Please grab code from plugin CVS, where this issue should be fixed.
> >
> > I'll try it and see. Ok found the csv will try moving in tomorrow.
> >
> >>> when I successfully log in. If I have it set to false I get the same
> >>> error when I go to options->filters.
> >>>
> >>> We use real linux users with real addresses and their location is
> >>> tied to their website so I have to generate their real home
> >>> directory. To do this I've modified config.php (in
> >>> plugins/serversidefilters):
> >>>
> >>> list($dir,$gecos,$gid,$name,$passwd,$shell,$uid)
> >>> =3D posix_getpwnam($username);
> >>> I then use the $dir to determine the various directories:
> >>
> >> This is clever. I don't have the code in front of me and it's been a
> >> little while, but I thought the C app su'd to the target user and got
> >> that information for itself.
> >
> > Not sure it will work yet ('die' behaves differently in php than perl)
> > but the config.php wants to set strings with the absolute addresses of
> > the files, at least as I read the comments and examples and our layout
> > depends on kind of user (real person, mail only client of one of the
> > sites we host, etc.)
Right, I already responded to that (your unusual positioning of user
accounts) I think. As I responded above, I guess I was thinking about
the vacation_local plugin, which does gather the user home dir from
the pwnam function in the C app. I just had a look at this code, and
it does no such thing -- why it was designed as such, I do not know,
but there are a few hokey things in this plugin... I think it would
be best to add an option for you to set in the Makefile that tells the
C app to use the user home dir from pwnam() instead of all this
hard-coded mumbo jumbo in config.php. I think that would be exactly
what you need, no?
> >>> $FILTER_FILE_PATH =3D "$dir/.mailfilter";
> >>> $DEFAULT_DELIVERY =3D '$MAILDIR';
> >>> $LOCAL_MAILDIR =3D "$dir/mail/";
> >>> $USE_MAILDIRS =3D 1;
> >>> $VIRTUAL_DOMAINS =3D 0;
> >>> $FORWARD_FILE_TYPE =3D "forward";
> >>> $FORWARD_FILE_PATH =3D "$dir/.forward";
> >>> $FILTER_APP_PATH =3D '/usr/bin/maildrop';
> >>>
> >>> In scripts I've chmod chowned filtercmd:
> >>>
> >>> -rwsr-x--- 1 root www-data 2493892 Apr 19 2004 filtercmd
> >>>
> >>> Any thoghts, help? Thanks. BTW: 2nd post no response to the less
> >>> detailed 1st post. On prior server was running Procmail Filter
> >>> Configuration with a hack to bypass the ftp function.
> >>
> >> Post date?
> >>
> Ok finally found where CSV is on sourceforge. Picked up:
> serversidefilter-1.5-1.2.7-RC1.tar.gz
It's "CVS", not "CSV", and you got a release that is not the same
thing. Try going back and getting a CVS snapshot please.
> The test.sh didn't like my "posix_getpwnam($username);" but I think php d=
id
> Howevr now I'm getting other errors.
>
> BTW: I'm now trying:
> $workArray =3D posix_getpwnam($username);
> $dir =3D $workArray[0];
> (I wish I know php, but I live in the land of perl which is just differnt
> enough to confuse me).
I don't know what this has to do with the errors that follow. Your
trickery would probably work in PHP, but now that I think about it,
the problem will be that the C app reads the config.php file
statically (no PHP is interpreted), so you won't get the desired
result.
> Anyway the current errors are:
> Warning: main(../../src/validate.php): failed to open stream: No such fil=
e
> or directory in
> /usr/share/squirrelmail/plugins/serversidefilter/options.php on line 35
Seems like you changed something else to get this kind of error.
> I did notice that setup.php is NOT referenced (according to grep) in any
> of the php scripts in the serversidefilter directory.
It shouldn't be.
> General question: why are single quotes used sometimes and double quotes
> other times?
Same as perl. Single quotes are not parsed for things like variables,
double quotes are. It has been claimed that single quoted strings are
thus a performance enhancement, although the improvement appears to be
very small if any. Still, being consistent with them is probably good
coding practice.
-paul
|