Spamassassin step-by-step

Moderator: crythias

Locked
Arry
Znuny newbie
Posts: 11
Joined: 20 Jun 2011, 12:41
Znuny Version: 3.0.7

Spamassassin step-by-step

Post by Arry »

I wonder whether you could guide me step-by-step through the spamassassin configuration on OTRS. I do the following:
1. install OTRS
2. configure Postmaster Mail Accounts as POP3
3. install Spamassassin
4. Configure PostMaster::PreFilterModule###6-SpamAssassin to move tickets to X-OTRS-Queue: Spam

However, since I only download mails from ISP and I am not running procmail or fetchmail on my server, the e-mails are not tagged as Spam.

What am I doing wrong?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Spamassassin step-by-step

Post by reneeb »

Anything in the logs? Can you download the plain email to your server and run the command manually?

(assuming the downloaded mail is saved as "test.eml".

Code: Select all

cat test.eml | /usr/bin/spamassassin | grep -i  "X-Spam-Status: yes"
When no error occurs, but the mail is not tagged as spam (and you are sure that the mail should be tagged), remove the "| grep ...." part and run the command again. Maybe you can check then if the "flag" has changed.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Spamassassin step-by-step

Post by crythias »

Arry wrote: since I only download mails from ISP and I am not running procmail or fetchmail on my server, the e-mails are not tagged as Spam.

What am I doing wrong?
Spam checking should be handled where email is delivered.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
gerald2545
Znuny newbie
Posts: 22
Joined: 19 Jul 2019, 16:31
Znuny Version: 6.0.14
Real Name: Gerald
Company: INRA

Re: Spamassassin step-by-step

Post by gerald2545 »

Hi,
I know this is an old thread...but I get the same behaviour.
  • Installed spamassassin on my centos7 server (where OTRS is installed)
    Configured PostMaster::PreFilterModule###6-SpamAssassin to move tickets to X-OTRS-Queue: Spam
I get the email from imap, from another server, that I don't manage
I received some spam, but they are not treated as such...I run spamassassin with command line against one of thies emails and the X-Spam-Flag is set to YES as expected

Is this spamassassin configuration sufficient and it should work? Or did I miss something?

Thank you for your help
OTRS : 6.0.29, with FAQ extension, on centOS7
Agent auth against local database (postgresql 9)
gerald2545
Znuny newbie
Posts: 22
Joined: 19 Jul 2019, 16:31
Znuny Version: 6.0.14
Real Name: Gerald
Company: INRA

Re: Spamassassin step-by-step

Post by gerald2545 »

Hi,
I didn't manage to make the spamassisson work with OTRS. But fortunately, lokking at the headers of the emails I found that some spam headers were set by our network manager...
changed PostmasterX-Header configuration, adding X-SpamState
added a postmaster filter : X-SpamState (if X-SpamState = 1 > add the header X-OTRS-queue = spam)

4 spams catched today!!!
OTRS : 6.0.29, with FAQ extension, on centOS7
Agent auth against local database (postgresql 9)
Locked