customized procmail setup

Discussion in 'Installation/Configuration' started by jmroth, Dec 5, 2005.

  1. jmroth

    jmroth New Member

    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
     
  2. falko

    falko Super Moderator Howtoforge Staff

    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...
     
  3. jmroth

    jmroth New Member

    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 :)
     
    Last edited: Dec 5, 2005
  4. falko

    falko Super Moderator Howtoforge Staff

    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...
     
  5. jmroth

    jmroth New Member

    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
     

Share This Page