Re: Issue with procmail and folder names with spaces

"Frank R. Servas" <[email protected]> Wed, 8 Nov 2017 11:18:35 -0500
Newsgroups gmane.mail.squirrelmail.plugins
Message-ID <[email protected]>
Hi Paul,

No worries, thanks for the info.  That fix did the trick, just to note
this was made to the server_side_filters_procmail plugin. I agree the
double quotes is a cleaner solution for handling with the plugin.

Thanks,
Frank

> Frank,
>
> Sincere apologies for not responding sooner.  A fix is simple, described
> below:
>
>
> On 2017=E5=B9=B407=E6=9C=8806=E6=97=A5 12:06, Frank R. Servas wrote:
>> Hi,
>>
>> I have a CentOS 7.3.1611 fully patched server, running
>> Squirrelmail-1.4.22-16 and procmail 3.22-35.  I have
>> server_settings_backend-2.0-1.4.0, server_side_filters-2.0beta1-1.4.0,
>> and
>> server_side_filters_procmail-1.0beta1-1.4.0 installed.  The filters
>> plugin
>> is configured to write .procmail files for each specific user account.
>> Everything was setup a while ago and had worked as expected.
>>
>> I don't know if this was due to a recent CentOS update or not,
>
> No, it's a but in the plugin.  I don't know why it would have been
> working previously.
>
>> but this
>> week users are complaining that their filter rules are creating new
>> folders and putting the email into them.  In troubleshooting, I
>> discovered
>> what is happening is that the mail folders have spaces in their names,
>> i.e. "Saved Emails", and that now the space is ignored and the folder
>> "Saved" is created and emails moved to it by the rule.  It is the
>> .procmail file that is the cause, basically it needs a "\" to deference
>> the space but it isn't written to the file by the plugin that way.  If I
>> manually edit the .procmail file to include the "\" things work as
>> expected.
>
> Actually, quoting the folder names is a better solution, at least from
> the POV of the plugin.  The fix is to go into the
> server_side_filters_maildrop plugin, open the functions.php file and
> find this line (around line #371):
>
> . '   ' . $rule['TARGET_FOLDER'] . "\n\n"
>
> Change it to this:
>
> . '   "' . $rule['TARGET_FOLDER'] . "\"\n\n"
>
> Just below that is another line (around line #380):
>
> $action =3D $rule['TARGET_FOLDER'];
>
> Change it to this:
>
> $action =3D '"' . $rule['TARGET_FOLDER'] . '"';
>
>
>> Excerpt from the .procmail file:
>> $MAIL_LOCATION/Saved Emails  (doesn't work sends emails to "Saved")
>> vs
>> $MAIL_LOCATION/Saved\ Emails (does work as expected)
>>
>> Just wondering if this is a known issue in the plugin or an easy fix?
>> Any
>> help would be appreciated.
> Thanks for reporting this.
>
> --
> Paul Lesniewski
> SquirrelMail Team
> Please support Open Source Software by donating to SquirrelMail!
> http://squirrelmail.org/donate_paul_lesniewski.php
>


Frank R. Servas
[email protected]

---------------------------------------------------------------------------=
---
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
-----
squirrelmail-plugins mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.plugins
List info (subscribe/unsubscribe/change options): https://lists.sourceforge=
.net/lists/listinfo/squirrelmail-plugins