rspamd: ispconfig did not write milter to postfix main.cf

Discussion in 'ISPConfig 3 Priority Support' started by Taleman, May 31, 2020.

Tags:
  1. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I changed another e-mail server from amavisd-new to rspamd, this time e-mail server was separate from web server. The first comments on the rspamd Tutorial showed how to do this setup. OS is Debian 9.12 Stretch on both and ISPConfig 3.1.15p3 multiserver setup.
    When I figured I need to a2enmod on the web server, not on e-mail server I got somewhere. But in addition to
    Code:
    a2enmod proxy
    I had to do also
    Code:
    a2enmod proxy_balancer
    a2enmod proxy_http
    This got me a working GUI.
    Then to the problem in topic of this thread: I could see from rspamd.log nothing was happening. E-mails were coming and going according to mail.log, but nothing was given to rspamd. Comparing the setup on the e-mail server where I installed rspamd a week ago, I noticed this new host had no milter lines in /etc/postfix/main.cf.
    First I tried in ISPConfig Panel System > Server Config > Mail to change Content Filter back to Amavisd, wait two minutes and turn it to Rspamd again. The red ball showed mailboxes were converted again, which was a bit scary, but no milter lines got added.
    Then I copied the last four lines from the working rspamd setup, and removed the two amavisd lines from postfix main.cf.
    Code:
    # diff /var/tmp/main.cf main.cf
    89,90c89,90
    < content_filter = amavis:[127.0.0.1]:10024
    < receive_override_options = no_address_mappings
    ---
    > ####content_filter = amavis:[127.0.0.1]:10024
    > ####receive_override_options = no_address_mappings
    91a92,97
    > #Taleman lisäsi 2020-05-31
    > smtpd_milters = inet:localhost:11332
    > non_smtpd_milters = inet:localhost:11332
    > milter_protocol = 6
    > milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
    > milter_default_action = accept
    After restarting postfix rspamd got emails to scan.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please add it as bug report to the bug tracker so we can verify if there is an issue. Might happen on multiserver systems only.
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Did that bug report https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/5627
    But I just noticed amavisd-new is still running on this host and if I stop amavisd-new e-mails get stuck in mailq with
    Code:
    (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    Seems I did not configure postifix enough so it would stop using amavisd. I noticed port number 10024 is also in file /etc/postfix/tag_as_foreign.re, but this file with same contents exists also on my other e-mail server with rspamd, but there I did not do any configs myself.
    Also, how come amavisd-new starts after reboot when I have done systemctl disable amavisd-new?
    This problem host is an ISPConfig multiserver setup where e-mail server is separate. How do I get it configured properly for postfix, rspamd and disabled amavisd?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page