overwriting of .forward, trying to use ASK

Discussion in 'Installation/Configuration' started by doddel, Jan 1, 2006.

  1. doddel

    doddel New Member

    Encountered following problem when installing ASK (Active Spam Killer).
    To have incoming mail checked by ASK the /home/www/web{n}/.forward needs to point at the ASK routines. Everything works as wanted after manual adaptation but the first time I use ISPConfig to change a setting of any mail client under the web{n} site, .forward gets overwritten and set back by ISPConfig to "|/usr/bin/procmail -f-".
    Is there a way to keep ISPConfig from resetting this .forward after a site has been created ?

    rgds and compliments for a nice program !
    martin
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You must make your changes in the template /root/ispconfig/isp/conf/forward.master. Please be warned that the normal ISPConfig procmail recipes (spam, antivirus, autoresponder, etc.) might not work after you changes!
     
  3. doddel

    doddel New Member

    Had a look at the possibility of changing forward.master but that won't do the trick. Thanks for the quick reaction by the way !

    The analysis by ActiveSpamKiller needs to be done with settings that are client dependent, i.e. every mailbox has a whitelist, ignorelist etc. Reference to the position of these things is made in the .forward to the ASK routines.
    So this .forward should not appear at the web{n} level but always at the web{n}_clientname level.
    Experimenting with ISPConfig I noticed that .forward and .procmailrc appear at web{n} level when admin rights have been granted to one of the site's clients, and at web{n}_clientname level when none of the clients has admin rights.
    Neither situation suits my needs; the latter could be used, but only when
    1. .forward is always done at that client level
    2. the .forward contents is unique to that client

    Where could I adapt ISPConfig to make it work that way ?

    rgds
    martin
     
  4. falko

    falko Super Moderator Howtoforge Staff

    The .forward file is always placed in the user's homedir which is web{n} for admin users and web{n}_clientname for other users.

    Have a look at /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php.
     
  5. doddel

    doddel New Member

    Dear Falko,

    although with zero experience level in php, I could make sense out of the ispconfig_procmail.lib.php script (also speak german, so that helps understanding the comments).

    It in the end turned out to be very simple to get Active Spam Killer to work.
    ASK has an option built-in to be operated as a filter for procmail. So it is sufficient to add a few lines to /root/ispconfig/isp/conf/procmailrc.master :

    {MAILDIR_COMMENT}MAILDIR=$HOME/Maildir/
    {MAILDIR_COMMENT}DEFAULT=$MAILDIR
    >>>>>>>>>>>>>
    :0 fW
    |/etc/smrsh/askfilter --procmail --loglevel=5 --logfile={PMDIR}/.ask/ask.log --home={PMDIR}

    :0 e
    /dev/null

    <<<<<<<<<<<<<<
    {QUOTA}
    etc. etc.

    This will make procmail use ASK as filter and wait for it to return with success/error code. If error it will drop the mail. If success then the mail that has an authorised origin, or was confirmed by the sender, gets delivered to the next ISPConfig treatments.
    The .ask directory and .askrc should be placed at the web{n}_client level and have as owner web{n}_client and as group web{n}.
    /etc/smrsh should have a symbolic link askfilter to /etc/ask/askfilter.

    Hope this shortcuts trial and error for other ASK users. Have been using ASK by the way for some years and it proves very effective as spam programs cannot interpret the confirmation request that ASK sends when it first receives a mail from some origin. The few that have a human reading and replying to the confirmation requests that ASK sends can be put in the ignore list to be silenced. It brought my spam from hundreds a day back to nothing on most days.
    Perhaps an idea to integrate it into ISPConfig ?
     
    Last edited: Jan 3, 2006
  6. doddel

    doddel New Member

    adding a switch in the html user interface

    Would like to be able to switch ASK on/off for any web{n}_client via a checkbox.

    Introduced an extra column in db_ispconfig's isp_isp_user table.
    But am struggeling to get a checkbox with title to show on one of the mail/user decks.

    Have already an entry in isp_kunde/lib/lang/en.lng for a title. But where is the template for these decks ?

    Would appreciate some hints on the process that is followed to get the deck sent out as html.

    rgds
    martin
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    There are no templates for the decks. You must simply create the checkbox in the form editor, the form editor will extend the database table automatically and bind the checkbox to the database field.
     
  8. doddel

    doddel New Member

    Thanks Till, that aspect I had not seen yet as the domain name is still pointing in DNS to the old server. Clicking on the edit form fills in the domain name and the browser goes to a place without ISPConfig. But tweaked that manually and now managed to make the ActiveSpamKiller checkbox. Noticed a small limitation while editing the form:
    the name of the checkbox should not contain capitals. It did initially and then the datatype gets not set to a char(1) but to a short string and the box for some reason doesn't show. Did a mysql> describe isp_isp_user; and that showed the difference with the other checkboxes. What is strange is that 'save' makes the capitals disappear and appear in the name as small characters, also in the db, but the datatype is then a short string which cannot be seen in the editor that only indicates checkbox type like the other char(1) checkboxes.
    Anyway, am on the right track now ! Very nifty piece of programming you've been doing.
    Thanks
    martin
     
    Last edited: Jan 4, 2006

Share This Page