Koozali.org: home of the SME Server

forwarding emails and spamfilter

Offline tiwang

  • *
  • 21
  • +0/-0
forwarding emails and spamfilter
« on: January 11, 2005, 08:55:39 PM »
hi out there
I have several accounts on my sme-server 6.01 for which I forward their emails to external smtp servers. After I added the spam-filter (spamassasin 2.53) they don't get their emails deliverd any more ?? Any suggestion on how to track this ? Are there a way to enable debugging in qmail ? or maybe somebody out there have had similary problems ? If I reconfigure the mailaccounts to keep a local copy also the local email is delivered - but the forwarded mail to the external mail server never shows up ?
...

Offline tiwang

  • *
  • 21
  • +0/-0
forwarding emails and spamfilter
« Reply #1 on: January 11, 2005, 09:04:39 PM »
extra note regarding my forwading problem: how is this forwarding facility implemented ??

regards /ti
...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: forwarding emails and spamfilter
« Reply #2 on: January 11, 2005, 09:41:12 PM »
Quote from: "tiwang"
hi out there
I have several accounts on my sme-server 6.01 for which I forward their emails to external smtp servers. After I added the spam-filter (spamassasin 2.53) they don't get their emails deliverd any more ??


No-one can answer your question until you are more specific about what additional software you have installed on your server. sme-server 6.01 does not do any spam filtering, even if you install a spamassassin rpm.

Offline tiwang

  • *
  • 21
  • +0/-0
forwarding emails and spamfilter
« Reply #3 on: January 12, 2005, 03:28:12 PM »
hi again
ok ok - could have been more specific, but if you search this site for spamfilter you get a hit "how to install spamfilter for dummies" which is what I expect normally is used on the SME servers:
http://sme.swerts-knudsen.dk/index.html?frame=http%3A//sme.swerts-knudsen.dk/howtos/howto_29.htm
This package installs without any problems and is simple to configure afterwards. But - it seems to me that after I have installed this package I cannot have both emails delivered locally AND forwarded to an external server. If I make use of either local delivery or forwarding to an external it works - but not both - can somebody out there give me some tips about where to look ?
Regards /tiwang
...

Offline frederikbay

  • **
  • 41
  • +0/-0
forwarding emails and spamfilter
« Reply #4 on: January 12, 2005, 04:20:28 PM »
Had the same problem, and disabled spam filter and removed the forward for the users in question and saved.

Then readded the forward and saved again, and then enabled spam filter, then it worked for me.


Know it's a rough workaround and if you have a lot for forwards it's a killer.

- Frederik

Offline tiwang

  • *
  • 21
  • +0/-0
forwarding emails and spamfilter
« Reply #5 on: January 12, 2005, 04:41:21 PM »
thanks for the advice - this was also what I would try as next step - it is just annoying not to know why but I am already spending to much time with my PC so I don't worry any more..
...

lancew

EXcellent, found a fix
« Reply #6 on: January 31, 2005, 05:14:35 PM »
Cool, I was finding the same problem, good to know how to fix it.

Lance

P.s. Has anyone actually checked if you need to reset every users settings? Or is just disabling and re-enabling the spam filter enough?

P.p.s. I also have this nagging feeling that doing the fix in this thread stops the spam filter from working properly. In that it then starts tagging email but still delivering the spam into your inbox.

lancew

Fix for spam
« Reply #7 on: February 02, 2005, 11:53:31 AM »
As I mentioned above applying this fix seemed to stop Jespers spam filter contrib from moving spam emails to the junk mail folder. (the emails were being tagged as spam, but seemed to just sit in the inbox)

I have solved this by from the console typing:
lat-procmail -c "username|enabled|no|some|normal" for each of my in house users. (not those with email redirection)

Although this works, it is not ideal as although (as yet) I have no proof I assume that the redirected emails would receive the spam.

Any thoughts anyone?

Offline verti

  • *
  • 30
  • +0/-0
    • http://www.davidmartinez.org
forwarding emails and spamfilter
« Reply #8 on: March 17, 2005, 06:58:33 PM »
I try it the command, but it fails the result, After executing it the Spam does not move to the junkmail folder.

:roll:    

we have continue searching...  Thanks

lancew

forwarding emails and spamfilter
« Reply #9 on: March 17, 2005, 08:22:21 PM »
Quote from: "verti"
I try it the command, but it fails the result, After executing it the Spam does not move to the junkmail folder.

:roll:    

we have continue searching...  Thanks


What happens when you type in:
Code: [Select]

lat-procmail -c "username|enabled|no|some|normal"

                 ^^^^^^^^  <-- Don't forget to change this to the login ID of your user.


What messages do you get?

Lance

Offline verti

  • *
  • 30
  • +0/-0
    • http://www.davidmartinez.org
forwarding emails and spamfilter
« Reply #10 on: March 17, 2005, 10:49:42 PM »
say:

Code: [Select]
Activating procmail for user 'verti'

Then the spam has ben moved to JunkMail folder but not fordward the mail.

Thanks

Offline kruhm

  • *
  • 680
  • +0/-0
forwarding emails and spamfilter
« Reply #11 on: April 19, 2005, 11:39:47 PM »
i have the same problem.
SME 6.0.1-01+

users that are set on LOCAL & FORWARD get the message locally but the message never get forwarded.

i've tried several things (turn off AV scan of outing, restart spam filter, etc) but the only way i can get it to forward is to set it to FORWARD EMAIL TO ADDRESS BELOW.

i saw one post ( http://forums.contribs.org/index.php?topic=21324.msg87894#msg87894 ) that suggests customizing "e-smithForward20" but i can't find that file anywhere.

another post ( http://forums.contribs.org/index.php?topic=21324.msg87894#msg87894 ) sets a rule for each user, but then i couldn't use LAT easily :-D

ADDITIONAL INFO ADDED:
since SA works with PROCMAIL for filtering to junkmail folder, if PROCMAIL is turned on then PROCMAIL handles the email processing (hence procmail), including forwarding of messages. PROCMAIL must be told to forward the message. This can be done in the USER-MANAGER. Too bad I can't have LAT easily add rules for each user.

Any other workarounds or fixes?

Offline kruhm

  • *
  • 680
  • +0/-0
forwarding emails and spamfilter
« Reply #12 on: May 07, 2005, 12:32:13 AM »
well, it happened again. When SpamAssassin updated, it automatically turned on procmail with a:
Running event handler: /etc/e-smith/events/spamfilter-update/S10spamfilter-expand-procmailrc

Good for most because it will automatically sort out the JunkMail. But it also overtakes the handling of the mail and therefore turns off all the mail forwards setup.

Interestingly (and maybe I'm the last to find this out), a lat-dump -d shows "procmail" in the EMAILFORWARD field which isn't documented as valid input. Since "procmail" isn't valid, it never shows in the Users page and stays as "both deliver locally and forward" which is where the confusion for most is.

Is there a way to automatically create a .procmailrc template for all users to get the mail to forward?

Offline raem

  • *
  • 3,972
  • +4/-0
forwarding emails and spamfilter
« Reply #13 on: May 07, 2005, 03:18:03 AM »
kruhm & others

> since SA works with PROCMAIL for filtering to
> junkmail folder, if PROCMAIL is turned on then
> PROCMAIL handles the email processing (hence
> procmail), including forwarding of messages.
> PROCMAIL must be told to forward the message.
> This can be done in the USER-MANAGER.

The crux of the issue is that as designed the system is working as it should, it's just that users expectations are somewhat different.

When Jesper Knudsens Spam Filter script runs, it installs the User Manager contrib and each user is automatically configured to use procmail to filter to the junkmail folder.
The settings in the standard server manager Collaboration/Users panel are overridden. Even though it says deliver "Both deliver locally & forward" that is incorrect as the settings in the actual User Manager contrib prevail (www.yourserver/user-manager) as procmail has been selected for all users by the spamssassin install. Unfortunately server manager does not have knowledge of the User Manager settings and incorrectly shows a value of  "Both deliver locally & forward"  when it should ideally show "procmail enabled" or something similar. That's the problem of integrating other contribs into the base system, not always perfect.

Using procmail implies that only local delivery of messages can occur (procmail does not work any other way except on locally delivered messages).
Therefore if junkmail messages filtering is enabled then procmail is enabled and you will have to manually setup procmail rules for each user that requires mail to be forwarded to external users.

I think that with LAT you can selectively add procmail rules for selected users (based on a list you create for LAT to use) but I have not tried it myself so please check the LAT documentation.
Other than that you would need to log in to each users User Manager (ie www.yourserver/user-manager) one by one and create the required forwarding rule within the user manager contrib panel using procmail. You will of course need to know the password for each user.

Sorry for the good/bad news.
...

Offline kruhm

  • *
  • 680
  • +0/-0
forwarding emails and spamfilter
« Reply #14 on: May 07, 2005, 04:29:00 PM »
Quote
Other than that you would need to log in to each users User Manager (ie www.yourserver/user-manager) one by one and create the required forwarding rule within the user manager contrib panel using procmail.


That's exactly what I mean. I don't want to go one by one.

Isn't there a way to get:

my $ForwardAddress = db_get_prop(\%accounts, $USERNAME, "ForwardAddress");

automatically into the .procmailrc at /etc/e-smith/templates-user/.procmailrc/99default?