Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild or replace dovecot plugins #5646

Closed
gsanchietti opened this issue Nov 19, 2018 · 10 comments

Comments

@gsanchietti
Copy link
Member

commented Nov 19, 2018

From CentOS 7.6.1810, dovecot has been updated to 2.2.36.
This dovecot release is not compatible with current build of dovecot-antispam.

Steps to reproduce

  • Install nethserver-mail-server and nethserver-mail-filter
  • Update Dovecot from cr repository:
    yum --enablerepo=cr dovecot
    

Expected behavior

Everything should continue to work.

Actual behavior

IMAP login is denied, error reported inside /var/log/imap:

dovecot: imap(user@domain): Error: Couldn't load required plugin /usr/lib64/dovecot/lib90_antispam_plugin.so: Module is for different ABI version 2.2.ABIv10(2.2.10) (we have 2.2.ABIv36(2.2.36))

Proposed solution

  • Rebuild dovecot-antispam with latest dovecot release (make sure updates and cr repositories are enabled inside mock configuration). Please also note that the upstream project is no more available: to build the package use the archive (5ebc6aae4d7c.tar.gz) from current source rpm
  • Replace current implementation with IMAPSieve: https://wiki2.dovecot.org/HowTo/AntispamWithSieve

See also

@gsanchietti gsanchietti added the bug label Nov 19, 2018

@gsanchietti gsanchietti added this to the 7.6.1810 milestone Nov 19, 2018

@gsanchietti gsanchietti added this to ✋ Needs review in NethServer 7 via automation Nov 19, 2018

@gsanchietti

This comment has been minimized.

Copy link
Member Author

commented Nov 19, 2018

To quickly fix broken machines, use these RPM from 7.5.1804/testing:

  • dovecot-antispam-0.0.49-3.2.g4c6e244.ns7.x86_64.rpm
@filippocarletti

This comment has been minimized.

Copy link
Member

commented Nov 19, 2018

The antispam plugin is deprecated, we should favor replacement with IMAPSieve.
Ref. http://dovecot.2317879.n4.nabble.com/Replacement-for-antispam-plugin-td58852.html

@DavidePrincipi DavidePrincipi moved this from ✋ Needs review to ⚙ Developing in NethServer 7 Nov 20, 2018

@DavidePrincipi DavidePrincipi self-assigned this Nov 20, 2018

@DavidePrincipi

This comment has been minimized.

Copy link
Member

commented Nov 20, 2018

Additional information

A similar problem occurs with dovecot-deleted-to-trash-0.6-3.ns7.x86_64

[root@vm5 ~]# config setprop dovecot DeletedToTrash enabled
[root@vm5 ~]# signal-event nethserver-mail-server-save 
[root@vm5 ~]# curl -v -u admin:Nethesis,1234 imap://vm5/INBOX

In /var/log/imap

Nov 20 18:06:39 vm5 dovecot: imap(admin@dpnet.nethesis.it): Error: Couldn't load required plugin /usr/lib64/dovecot/lib89_deleted_to_trash_plugin.so: Module is for different ABI version 2.2.ABIv10(2.2.10) (we have 2.2.ABIv36(2.2.36))

The plugin is still valid, should be safe to rebuild it: https://wiki.dovecot.org/Plugins/deleted-to-trash

@DavidePrincipi DavidePrincipi changed the title Dovecot: rebuild or replace dovecot-antispam Rebuild or replace dovecot plugins Nov 20, 2018

@gsanchietti

This comment has been minimized.

Copy link
Member Author

commented Nov 20, 2018

In nethserver-testing/7.5.1804:

  • dovecot-deleted-to-trash-0.6-3.1.ge535a8e.ns7.x86_64.rpm
gsanchietti added a commit to NethServer/dovecot-deleted-to-trash that referenced this issue Nov 21, 2018
spec: requires dovecot-devel >= 2.2.36 (#1)
Fix error:
Error: Couldn't load required plugin /usr/lib64/dovecot/lib89_deleted_to_trash_plugin.so:
Module is for different ABI version 2.2.ABIv10(2.2.10) (we have 2.2.ABIv36(2.2.36))

NethServer/dev#5646

@DavidePrincipi DavidePrincipi removed their assignment Nov 21, 2018

@DavidePrincipi

This comment has been minimized.

Copy link
Member

commented Nov 21, 2018

Test case

  1. Moving a message from/to the Junk mail folder must trigger rspamc learning. For instance,
# grep spam-training /var/log/maillog
Nov 21 11:53:48 vm5 spam-training/admin@dpnet.nethesis.it[9145]: Message enqueued as learn_ham
Nov 21 11:55:42 vm5 spam-training/admin@dpnet.nethesis.it[9193]: Message enqueued as learn_spam

The "Learned" counter in Rspamd web UI must be increased accordingly.

  1. Moving a message from Junk to Trash must not trigger ham learning

@stephdl stephdl added the testing label Nov 23, 2018

@stephdl stephdl self-assigned this Nov 23, 2018

DavidePrincipi added a commit to NethServer/nethserver-mail that referenced this issue Nov 23, 2018

@stephdl stephdl removed the testing label Nov 25, 2018

@DavidePrincipi

This comment has been minimized.

Copy link
Member

commented Nov 26, 2018

Test case

  • Check that spam learning is triggered by moving a message in and out of the configured junkmail folder.
  • Check that the learning is skipped if the destination directory is Trash

@stephdl stephdl added the testing label Nov 26, 2018

@stephdl

This comment has been minimized.

Copy link

commented Nov 26, 2018

VERIFICATION OK (done with rspamd 1.8.1)

  1. Full upgrade to cr repository
  2. Upgrade from testing

yum update --enablerepo=nethserver-testing --exclude=rspamd,nethserver-base,nethserver-backup-config,dovecot-antispam,nethserver-antivirus

  1. rpm version
[root@ns7loc15 ~]# rpm -qa | grep dovecot
dovecot-2.2.36-3.el7.x86_64
dovecot-pigeonhole-2.2.36-3.el7.x86_64
dovecot-antispam-0.0.49-3.ns7.x86_64
dovecot-deleted-to-trash-0.6-3.1.ge535a8e.ns7.x86_64
[root@ns7loc15 ~]# rpm -qa | grep rspamd
rspamd-1.8.1-1.x86_64
[root@ns7loc15 ~]# rpm -qa | grep nethserver-mail
nethserver-mail-common-2.3.2-1.2.g1c2b860.ns7.noarch
nethserver-mail-filter-2.3.2-1.2.g1c2b860.ns7.noarch
nethserver-mail-smarthost-2.3.2-1.2.g1c2b860.ns7.noarch
nethserver-mail-server-2.3.2-1.2.g1c2b860.ns7.noarch
  • with dovecot from CR repository, I can log using a webmail like roundcubemail (imap based authentication) OK
  • Moving a message from/to the Junk mail folder must trigger rspamc learning OK
  • Moving a message from Junk to Trash must not trigger ham learning OK
  • No errors with dovecot-deleted-to-trash

@stephdl stephdl added verified and removed testing labels Nov 26, 2018

@stephdl stephdl removed their assignment Nov 26, 2018

@DavidePrincipi

This comment has been minimized.

Copy link
Member

commented Dec 3, 2018

In nethserver-updates 7.6.1810

  • dovecot-deleted-to-trash-0.6-4.ns7.x86_64.rpm

NethServer 7 automation moved this from ⚙ Developing to 🗑 Done Dec 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.