Koozali.org: home of the SME Server

SpamAssassin & Mail forwarding settings

Offline loek

  • 12
  • +0/-0
SpamAssassin & Mail forwarding settings
« on: March 16, 2004, 11:35:05 PM »
I just installed SpamAssassin using the scripts from http://sme.swerts-knudsen.dk/ (works like a charm, splendid!). The only problem I have now is that when I change the mail forwarding settings for a certain user, the procmail filtering that is used for SA is switched off, also when I put the forwarding back to local delivery.

I also have the user-panel installed, which may have something to do with it. Using the user-panel for that specific user, I can select the option 'use procmail filtering' (then it works again), but I don't have that option in server-manager and this is quite a long de-tour.

I would also like to enable procmail filtering for the option 'Both deliver locally & forward'. I found the template "/etc/e-smith/templates-user-custom/.qmail/e-smithForward20 " but can't find out how to expand this template and activate the changes made there.

Any help is appreciated. Thanx,
Loek

Offline loek

  • 12
  • +0/-0
SpamAssassin & Mail forwarding settings
« Reply #1 on: March 18, 2004, 08:18:55 PM »
I've found a sufficient solution for my problem. There is no need to expand the user-template: it is used whenever user forwarding settings are changed through either the server-manager or the user-manager panel. I edited the template

/etc/e-smith/templates-user-custom/.qmail/e-smithForward20

By changing the values for "local delivery" and "both forward and deliver locally" I now have procmail enabled at all times, also when the option "both" is applied.

    if ($EmailForward eq "local")
    {
   # local delivery setting now also gets filtered by procmail
        $OUT = "\n";
        $OUT .= "| /usr/bin/procmail ~/.procmailrc \n";
  }
    elsif ($EmailForward eq 'forward')
    {
        $OUT = "&" . $ForwardAddress . "\n";
    }
    elsif ($EmailForward eq 'both')
    {
        $OUT = "&" . $ForwardAddress . "\n";
        $OUT .= "| /usr/bin/procmail ~/.procmailrc \n";
    }

The only disadvantage is that now procmail is always enabled (which is what I prefer, but maybe others may not want that).

lajgaard

SpamAssassin & Mail forwarding settings
« Reply #2 on: March 24, 2004, 08:37:46 AM »
I have experienced the same issue. I would like to know what disadvantages there is concerning having procmail always enabled before I use your solution.

My problem also came after experimenting with the procmail mail filtering in the user-panel. After I had testede procmail I switched back to get my mails delivered locally. So I am pretty confident that the problem originate from the switching back and forward between procmail.

Regards Carsten

Offline loek

  • 12
  • +0/-0
SpamAssassin & Mail forwarding settings
« Reply #3 on: March 24, 2004, 01:47:17 PM »
Applying this patch to e-smithForward20 just makes sure procmail filtering (in the first place for SpamAssassin) stays enabled when you switch back to local delivery, so it should solve your problem. Additionally, it also adds procmail filtering for locally delivered mail in the setting 'Both forward & deliver locally'.

There is not really any disadvantage to have procmail always enabled, but maybe there are people out there who need to be able to switch it off. (If necessary, you could always modify the 4th forwarding option 'enable procmail', which is normally only available in the user-panel, to 'disable procmail'. (I haven't done this myself but it should be relatively easy once you understand how this thing works)

Loek

lajgaard

SpamAssassin & Mail forwarding settings
« Reply #4 on: March 24, 2004, 03:43:27 PM »
I have now applied your correction to e-smithForward20. Have I understod you correct if I believe that I also have to change the settings in the user panel in order to get SpamAssassin scanning my mails again?

Offline loek

  • 12
  • +0/-0
SpamAssassin & Mail forwarding settings
« Reply #5 on: March 24, 2004, 03:56:25 PM »
No, after these changes all you need to do is to go to the users section in server-manager and apply the right forwarding settings for those users who lost the procmail filtering. It will then rewrite the configuration for that user, using the template you just modified.

Loek

Anonymous

SpamAssassin & Mail forwarding settings
« Reply #6 on: March 24, 2004, 04:34:27 PM »
Thank you, now everything works just fine.

Carsten

lajgaard

SpamAssassin & Mail forwarding settings
« Reply #7 on: April 27, 2004, 02:56:18 PM »
Hi Loek

I think there might be a problem with your solution. It seems that the server does not enable procmail for newly created users. To enable procmail you have to change the delivery.

/Carsten

wlu_lax6

Glazer & the Buccaneers
« Reply #8 on: June 19, 2004, 01:29:16 AM »
Topics containing links to people's sites are unneeded and contribute nothing as a whole, much like topics containing content like this one. You could have PMed a moderator and asked this same question and received the same http://download-games.b0x.com response. Please do so in the future.