HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   customized procmail setup (http://www.howtoforge.com/forums/showthread.php?t=1540)

jmroth 5th December 2005 11:43

customized procmail setup
 
Hi there,
I was wondering if it was possible to define some extra filters for certain users. Some want virus-infected mails deleted etc. Now if I put something like that in the local .procmailrc or similar it will be gone the next time ispconfig does something. Also I can't make it global if only few people want it. Is there a feature or do I have to be creative?
Regards,
~jm

falko 5th December 2005 11:59

Quote:

Originally Posted by jmroth
Hi there,
I was wondering if it was possible to define some extra filters for certain users. Some want virus-infected mails deleted etc. Now if I put something like that in the local .procmailrc or similar it will be gone the next time ispconfig does something. Also I can't make it global if only few people want it. Is there a feature or do I have to be creative?
Regards,
~jm

I'm afraid you have to be creative. :( I haven't figured out a way yet to write custom recipes into .procmailrc without ISPConfig overwriting them...

jmroth 5th December 2005 12:47

Alright, but you don't need to be that creative

Just put the following at the end of the procmailrc master file

Code:

:0
* ? test -f $HOME/.procmailrc-custom
{
INCLUDERC=$HOME/.procmailrc-custom
}

Now for every customer where such a file exists, it is executed :)

falko 5th December 2005 14:54

That's one solution, but please keep in mind that the order of the recipes matters. If you put your file at the end, the recipes will be executed after all other recipes, if at all...

jmroth 5th December 2005 21:20

yeah that's right but I think that's the direction in which one should go... maybe offer pre- and post-ispconfig-rules, but I think the latter is enough to satisfy wishes like please delete my virus mails etc... although those could be directly built-in somehow
one could offer a textfield where users can input their custom procmail data, then maybe somehow test it for sanity, and then just add it to the home
of course one should think about moving it too when the user home moves (e.g. from admin to non-admin)
i will add it to my feature request list :D


All times are GMT +2. The time now is 11:00.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.