Migration amavis to rspamd some questions

Discussion in 'ISPConfig 3 Priority Support' started by tr909192, Nov 17, 2023.

  1. tr909192

    tr909192 Member HowtoForge Supporter

    Dear,

    we are finally ready to migrate some nodes from the old amavis to the new rspamd. We have seen that the performance of rspamd is quite good (and better than amavis). The migration process described here worked well on a development server. But production has a different smell.
    The questions are:
    - is the migration script smart enough to keep the users' custom rules? or will they be lost in the process?
    - will users who have the Normal policy with amavis right now see big differences with the new Normal with rspamd? (and also with the other policies?)
    - on nodes with, say 800-2000mailboxes does the migration in your opinion work perfectly or should we expect some kind of timeout or other performance related issues (nodes with 8 cores, 32GB of ram)?
    - does the size of the mailboxes have an impact on the migration process?
    - any other aspects I haven't considered?

    Thanks for your opinions.
     
    Last edited: Nov 17, 2023
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    What kind of custom rules? Sieve filters are not affected by the change.

    Filtering will be improved.

    Your systems will be faster with less resource usage.

    The speed of migration is mostly limited by the bandwidth for copying the data between the servers.
     
  3. tr909192

    tr909192 Member HowtoForge Supporter

    This one: there is a mailbox data movement?!? In development i don't see any. I miss something?
    I believed that only the
    Code:
    .ispconfig*
    files in the mailbox was changed...
    That's could be a trouble because some of the mailbox are pretty big (>50GB)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The question is what you mean with migration? Do you just want to change the spam filter from amavisd to rspamd, then no data is moved if you want to transfer a mail server to another hardware while changing the spam filter system as well using Migration Tool, then data is moved.

    Neither amavisd nor rspamd have any files in mailbox folders.
     
  5. tr909192

    tr909192 Member HowtoForge Supporter

    No, no hardware change of any type. Sorry for the misleading message.
    We just want to change the spamfilter from amavisd to rspamd on the same server (ispconfig latest) following this procedure: https://www.howtoforge.com/replacing-amavisd-with-rspamd-in-ispconfig/ nothing fancy.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, this does not influence mailbox contents or files in mailboxes. You can see the spam filter as a software piece in the middle between postfix (which receives the emails) and dovecot (which stores them into the maildir) and also the other way round when it comes to mail signing via DKIM. So the maildir and its content are not affected by this change. Also, all spamfilter policies are kept during this change.
     
  7. tr909192

    tr909192 Member HowtoForge Supporter

    Ok that's great. Last question and i'm good to go: we are in a master-slave environment. Can i follows that guide: https://www.howtoforge.com/replacing-amavisd-with-rspamd-in-ispconfig/ easily in any slave, and then from the master interface do the amavis to rspamd change. Right? I think that should be the way.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    tr909192 likes this.
  9. tr909192

    tr909192 Member HowtoForge Supporter

    ok thank you
     
  10. tr909192

    tr909192 Member HowtoForge Supporter

    Ok started the migration process today with the first node (was a busy month). Just a couple of questions after migration:
    - everything seems flawless, i was able to see the new rspamd working pretty well on the server, and i was also be able to configure there my ratelimit setup;
    - why for every mail on the server when i have changed for the slave server on the master interface amavisd -> rspamd, we have this output on ispconfig log:

    Code:
    [...]
    Thu 14 Dec 11:47:20 CET 2023 14.12.2023-11:47 - DEBUG [modules.inc:177] - Replicated from master: REPLACE INTO `spamfilter_users` (`id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`priority`,`policy_id`,`email`,`fullname`,`local`) VALUES ([...])
    Thu 14 Dec 11:47:20 CET 2023 14.12.2023-11:47 - DEBUG [rspamd plugin.inc:208] - rspamd: user_settings_update() for spamfilter_user [email protected]
    Thu 14 Dec 12:09:20 CET 2023 14.12.2023-12:09 - DEBUG [modules.inc:177] - Replicated from master: REPLACE INTO `mail_user` (`mailuser_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`email`,`password`,`name`,`uid`,`gid`,`maildir`,`maildir_format`,`quota`,`cc`,`forward_in_lda`,`sender_cc`,`homedir`,`autoresponder`,`autoresponder_start_date`,`autoresponder_end_date`,`autoresponder_subject`,`autoresponder_text`,`move_junk`,`purge_trash_days`,`purge_junk_days`,`custom_mailfilter`,`postfix`,`greylisting`,`access`,`disableimap`,`disablepop3`,`disabledeliver`,`disablesmtp`,`login`,`disablesieve`,`disablesieve-filter`,`disablelda`,`disablelmtp`,`disabledoveadm`,`disablequota-status`,`disableindexer-worker`,`last_quota_notification`,`backup_interval`,`backup_copies`,`imap_prefix`) VALUES ([...])
    Thu 14 Dec 12:09:21 CET 2023 14.12.2023-12:09 - DEBUG [system.inc:1794] - Created Maildir /var/vmail/domain.com/mailaccount/Maildir with subfolder: Sent
    Thu 14 Dec 12:09:21 CET 2023 14.12.2023-12:09 - DEBUG [system.inc:1794] - Created Maildir /var/vmail/domain.com/mailaccount/Maildir with subfolder: Drafts
    Thu 14 Dec 12:09:21 CET 2023 14.12.2023-12:09 - DEBUG [system.inc:1794] - Created Maildir /var/vmail/domain.com/mailaccount/Maildir with subfolder: Trash
    Thu 14 Dec 12:09:21 CET 2023 14.12.2023-12:09 - DEBUG [system.inc:1794] - Created Maildir /var/vmail/domain.com/mailaccount/Maildir with subfolder: Junk
    Thu 14 Dec 12:09:21 CET 2023 14.12.2023-12:09 - DEBUG [system.inc:2430] - safe_exec cmd: chown -R 'vmail':'vmail' '/var/vmail/domain.com/mailaccount' - return code: 0
    Thu 14 Dec 12:09:22 CET 2023 14.12.2023-12:09 - DEBUG [mail plugin.inc:398] - Set ownership on /var/vmail/domain.com/mailaccount
    Thu 14 Dec 12:09:22 CET 2023 14.12.2023-12:09 - DEBUG [rspamd plugin.inc:208] - rspamd: user_settings_update() for mail_user [email protected]
    [...]
    - on this node also postgrey was missting (because the node was installed before the automatic installer script, and at that time, postgrey was not included on the best server installation). Is it fine to just install postgrey, and then do again the update of ispconfig with the reconfigure service enable? From my pov, i think yes, because i can see the main.cf file correclty configured with the new postgrey installation, but i'm asking to be sure of it...

    thank you
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The mailbox user needs to be updated when you switch the spamfilter daemon. But the maildir folders should already be there. maybe you did not only switch from amavis to rspamd but also from courier to dovecot imap or so?

    Installing postgrey should be fine.
     
  12. tr909192

    tr909192 Member HowtoForge Supporter

    Nope, i'm supersure to have not changed anything but amavisd->rspamd
     
  13. tr909192

    tr909192 Member HowtoForge Supporter

    seems that the procedure try anyway to create the directories of the mailbox, even if they exist
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    That's not the case as you can see in the code of mail_plugin.in.php, that's why I mentioned it. But if everything works and mails in your IMAP folders are still there, then that's fine.
     

Share This Page