Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    kopano antispam and antivirus

    Kopano Groupware Core
    7
    34
    3792
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Former User
      A Former User last edited by A Former User

      Hi,

      now i run efa project and think i want to run this a little longer. can I let kopano-spamd learn efa. So that if i drag a mesage to the spam folder that my efa appliance detects this?

      My second question is that i can not get inotify-spamlearn working. i think i have an older pyton version? i am on centos 7. anyone has experiense with this?

      1 Reply Last reply Reply Quote 0
      • ashceryth
        ashceryth last edited by ashceryth

        If you drag a mail from your inbox to the junk folder kopano-spamd saves the raw mail to the spam directory specified in spamd.cfg. When a mail is moved from junk folder to inbox (ham) the mail is stored in the configured ham directory. The mails can then be picked up and used for learning spam/ham. One way to pickup these mails and hand them to your spam filter for learning is inotify-spamlearn script. Inotify-spamlearn simply monitores the directories for new mails and executes the learning command for each of them.

        You need python3 for inotify-spamlearn. You also need to install python3 version of inotify module with pip.

        A Former User 1 Reply Last reply Reply Quote 0
        • A Former User
          A Former User @ashceryth last edited by

          @ashceryth

          Hi thanks for your reply. The only thing i am missing now is how can i tell that spamassasin, efa is on a different machine?

          1 Reply Last reply Reply Quote 0
          • ashceryth
            ashceryth last edited by

            I’m not familiar with efa. Is it just using SpamAssassin and can you simply use the sa-learn command? If yes, you could use ssh and pipe the mail over ssh to the sa-learn command on the efa host. Maybe there are also other and better possibilities…

            1 Reply Last reply Reply Quote 0
            • ashceryth
              ashceryth last edited by ashceryth

              You could try to use something like /usr/bin/ssh amavis@your.spamassassin.host /usr/bin/sa-learn --spam as spamcmd (haven’t tested it this way, but used something similiar a while ago) with my version of the script. Authentication can be done with ssh pub-key.

              This version of inotify-spamlearn pipes the content of the mail to the specified spamcmd/hamcmd in the config file: https://github.com/ashceryth/inotify-spamlearn/blob/master/inotify-spamlearn.py

              A Former User 1 Reply Last reply Reply Quote 0
              • A Former User
                A Former User @ashceryth last edited by A Former User

                @ashceryth

                im thinking of installing rspamd for a try. i am now installing this. however how i we install python 3 on centos 7 for the other package with the modules? (Inotify-spamlearn)

                i also have a question about rspamd. i cant get the webui working. i followed the quick tutorial but can not connect to my internal ip port 11334

                also i install python 3.6 and with pip i installed inotify. however the module still can not be found?

                any tips on this one?

                1 Reply Last reply Reply Quote 0
                • ashceryth
                  ashceryth last edited by

                  Sorry, without digging into it I don’t have a clue why the webui isn’t working. If you face any truoubles the best place to ask for support would be one of their channels: https://rspamd.com/support.html

                  You need to use pip3 for installing python3 modules. Did you do it that way?

                  A Former User 1 Reply Last reply Reply Quote 0
                  • A Former User
                    A Former User @ashceryth last edited by

                    @ashceryth

                    Hi i think if i dig in some deeper i will get the ui to work. However i install python3.6 and pip3.6. then i installed with pip3.6 the notify module. however when i want to start the service it keeps saying that the module is missing?

                    1 Reply Last reply Reply Quote 0
                    • ashceryth
                      ashceryth last edited by

                      Does it work when you run it manually: python3 /path/to/inotify-spamlearn.py?

                      A Former User 2 Replies Last reply Reply Quote 0
                      • A Former User
                        A Former User @ashceryth last edited by

                        @ashceryth

                        i do not know. i will try this this evening when im done from work. I will let you know. Thank you for the support.

                        A Former User 1 Reply Last reply Reply Quote 0
                        • A Former User
                          A Former User @ashceryth last edited by A Former User

                          @ashceryth

                          nope

                          i Installed the module

                          pip3 install inotify
                          Requirement already satisfied: inotify in /usr/local/lib/python3.6/site-packages (0.2.10)
                          Requirement already satisfied: nose in /usr/local/lib/python3.6/site-packages (from inotify) (1.3.7)

                          [root@kopano inotify-spamlearn]# python3 inotify-spamlearn.py
                          Traceback (most recent call last):
                          File “inotify-spamlearn.py”, line 11, in <module>
                          import inotify.adapters
                          ImportError: No module named ‘inotify’

                          if i do a normal python run it tels me its missing an other module.

                          [root@kopano inotify-spamlearn]# python inotify-spamlearn.py
                          Traceback (most recent call last):
                          File “inotify-spamlearn.py”, line 5, in <module>
                          import configparser
                          ImportError: No module named configparser

                          A Former User 1 Reply Last reply Reply Quote 0
                          • A Former User
                            A Former User @Guest last edited by

                            @ckruijntjens

                            i am a little bit further. now i can get no module error.

                            python3.6 inontify-spamlearn.py

                            however now i get this error:

                            0_1547020305197_7911da5f-fafd-41e1-814c-a3c4021101c0-image.png

                            the path folders exist.

                            1 Reply Last reply Reply Quote 0
                            • ashceryth
                              ashceryth last edited by

                              @ckruijntjens

                              As I can see from your prompt it seems you are in a directory named inotify-spamlearn and the config is also placed there. However, the script is always looking for the config file in /etc/kopano/. Make sure that the file is placed there (as described in the readme).

                              A Former User 1 Reply Last reply Reply Quote 0
                              • A Former User
                                A Former User @ashceryth last edited by

                                @ashceryth

                                that is indeed the problem. tonight i willl reinstall rspamd and see i f it works. thank you!

                                A Former User 1 Reply Last reply Reply Quote 0
                                • thctlo
                                  thctlo @Guest last edited by

                                  @ckruijntjens

                                  Sorry, i dont have it all on paper jet. but its not that hard to setup.
                                  Just setup spamassassin to use sql database on both servers.

                                  my mailscanner (spamassassin) sql db is located on the kopano server.

                                  Basicly this, but configured on 2 servers.
                                  https://p5r.uk/blog/2017/spamassassin-with-mariadb.html

                                  I also did see some rspamd replies, these are on my test list also.
                                  Its bit what you preffer.

                                  1 Reply Last reply Reply Quote 0
                                  • A Former User
                                    A Former User @Guest last edited by A Former User

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • A Former User
                                      A Former User @Guest last edited by

                                      @ashceryth

                                      hi i have it all installed now and working as far as is. however what group should we use in kopano-spamd for rspamd? i did

                                      sa_group = _rspamd

                                      but i get the following error when moving mails to my spam folder:

                                      2019-01-09 22:58:55,186 - spamd - ERROR - Traceback (most recent call last):
                                        File "/usr/lib/python2.7/site-packages/kopano/log.py", line 103, in log_exc
                                          try: yield
                                        File "/usr/lib/python2.7/site-packages/kopano_spamd/__init__.py", line 83, in update
                                          self.learn(item, searchkey, True)
                                        File "/usr/lib/python2.7/site-packages/kopano_spamd/__init__.py", line 106, in learn
                                          os.chown(emlfilename, uid, gid)
                                      OSError: [Errno 1] Operation not permitted: '/var/lib/kopano/spamd/spam/D6FDC3AACE8847D0A2A521D0A5300EC3.eml'
                                      
                                      

                                      and the second question if spam is denied where is the mail stored then? how can we if its a false positive send the mail?

                                      1 Reply Last reply Reply Quote 0
                                      • ashceryth
                                        ashceryth last edited by

                                        The group should be ok. Maybe your issue is related with the issue discussed in this thread: https://forum.kopano.io/topic/2027/kopano-spamd-error-permissionerror-errno-1-operation-not-permitted. However, in your case spamd seems to be running with python2.7…

                                        A Former User 1 Reply Last reply Reply Quote 0
                                        • A Former User
                                          A Former User @ashceryth last edited by

                                          @ashceryth

                                          Hi

                                          I am starting it with python3.6

                                          0_1547131419531_cd86a550-0440-4fd5-9764-415a7df25268-image.png

                                          1 Reply Last reply Reply Quote 0
                                          • ashceryth
                                            ashceryth last edited by

                                            @ckruijntjens

                                            Yes, you’re starting inotify-spamlearn with python3.6 but I was talking about spamd.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post