Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st January 2006, 15:35
doddel doddel is offline
Junior Member
 
Join Date: Dec 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default overwriting of .forward, trying to use ASK

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
Reply With Quote
Sponsored Links
  #2  
Old 1st January 2006, 15:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

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!
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 1st January 2006, 20:18
doddel doddel is offline
Junior Member
 
Join Date: Dec 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #4  
Old 1st January 2006, 20:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Quote:
Originally Posted by doddel
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.
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.

Quote:
Originally Posted by doddel
Where could I adapt ISPConfig to make it work that way ?
Have a look at /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 3rd January 2006, 11:50
doddel doddel is offline
Junior Member
 
Join Date: Dec 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 by doddel; 3rd January 2006 at 11:57.
Reply With Quote
  #6  
Old 3rd January 2006, 20:41
doddel doddel is offline
Junior Member
 
Join Date: Dec 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #7  
Old 3rd January 2006, 21:24
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,672
Thanks: 819
Thanked 5,317 Times in 4,170 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 4th January 2006, 13:54
doddel doddel is offline
Junior Member
 
Join Date: Dec 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

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 by doddel; 4th January 2006 at 13:57.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:03.


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