procmail script

View: New views
2 Messages — Rating Filter:   Alert me  

procmail script

by Didi Kressnig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

first thanx a lot for your work.
i want to use the procmail script to sort messages in some other mailboxes
instead of the inbox. but when i create a filter and look at "Scripts" to store
the .procmailrc at the server, the folder always is "$DEFAULT/./" instead of
the folder i selected earlier.
here is my backends.php:
$backends['procmail'] = array(
 'driver' => 'vfs',
 'preferred' => '',
 'hordeauth' => 'true',
 'params' => array(
 'hostspec' => 'mail.example.com',
 'procmailrc' => '.procmailrc',
 'port' => 21,
 'vfstype' => 'ftp',
 ),
 'script' => 'procmail',
 'scriptparams' => array(
 'path_style' => 'maildir',
 'variables' => array()
 )
);

this works so far.
if i want to create a filter named "muhh" f.e. to put all messages from
didi@... into the folder didi, the procmail script that was created
looks like:
 1: # procmail script generated by Ingo (August 21, 2009, 3:40 pm)
 2:
 3:
 4: ##### muhh #####
 5: :0
 6: * ^From:.*didi@example\.com
 7: "$DEFAULT/./"
 8:
the folder should be didi and not "$DEFAULT/./".
this is only if i select "deliver to folder" <any folder>. all other filters
work as expected.
do i miss something, or is this a bug?
oh, and i use the latest version of horde, imp, ingo, vacation, kronolith,
forwards and turba.
thanx in advance for any hints.
~didi
--
Ingo mailing list - Join the hunt: http://horde.org/bounties/#ingo
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: ingo-unsubscribe@...

Re: procmail script

by Didi Kressnig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 21 August 2009 15:55:08 Didi Kressnig wrote:
> Hi,

> if i want to create a filter named "muhh" f.e. to put all messages from
> didi@... into the folder didi, the procmail script that was created
> looks like:
>  1: # procmail script generated by Ingo (August 21, 2009, 3:40 pm)
>  2:
>  3:
>  4: ##### muhh #####
>  5: :0
>  6: * ^From:.*didi@example\.com
>  7: "$DEFAULT/./"
ouch, escapeshellcmd was disabled in my php.ini.

ok, i use the following setup in my dovecot.conf for mail_location:
mail_location = maildir:~/Maildir:INBOX=/var/mail/%u

so i have to change in /lib/Script/procmail.php at line 755
from         return '"$DEFAULT/.' . escapeshellcmd($folder) . '/"';
to              return '"$MAILDIR/.' . escapeshellcmd($folder) . '/"';
MAILDIR is defined in /etc/procmailrc. DEFAULT is for the INBOX in
/var/mail/%u.

now it works perfectly.
hth,
didi

--
servus.at - institut fuer kunst & kultur im netz
A-4040 Linz, Kirchengasse 4
Tel.: +43 732 731209 301
--
Ingo mailing list - Join the hunt: http://horde.org/bounties/#ingo
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: ingo-unsubscribe@...