rspamd connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

Discussion in 'Installation/Configuration' started by commentator, May 7, 2020.

  1. commentator

    commentator Member

    Hello,

    I tried to change amavis to rspamd following https://www.howtoforge.com/replacing-amavisd-with-rspamd-in-ispconfig/
    After
    Code:
    systemctl stop amavisd-new
    
    and resync mailboxes and maildomains
    I cannot send mail:
    Code:
    connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
    So I started amavis and I can send mail. How to solve this problem and disable amavis?

    - Linux Distribution and version used on your server.
    Debian buster
    - ISPConfig version
    ISPConfig 3.1.15p3
     
    Last edited: May 7, 2020
  2. elmacus

    elmacus Active Member

    Did you really change "Content Filter" from Amavis to Rspamd in system/server config/servername/email ??
     
  3. commentator

    commentator Member

    yes:
     

    Attached Files:

  4. elmacus

    elmacus Active Member

    I had this error also so i did manually update according to the code, DONT USE MY CODE AS A RANDOM USER ON INTERNET, investigate first, or wait for @till
    Code:
    postconf -X 'receive_override_options'
    postconf -X 'content_filter'
    postconf -e 'smtpd_milters = inet:localhost:11332'
    postconf -e 'non_smtpd_milters = inet:localhost:11332'
    postconf -e 'milter_protocol = 6'
    postconf -e 'milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}'
    postconf -e 'milter_default_action = accept'
    postconf -e 'smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, permit_mynetworks, permit_sasl_authenticated'
    
    systemctl restart postfix
    tail -f /var/log/mail.log
     
  5. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Try setting that to Amavis, hit save, then set it back to Rspamd and save again.

    If that's still a problem, see what server plugins are enabled in /usr/local/ispconfig/server/plugins-enabled/. Eg. postfix_server_plugin.inc.php is what changes postfix config per the above setting; also ensure rspamd_plugin.inc.php and mail_plugin_dkim.inc.php are enabled.
     
    commentator likes this.
  6. commentator

    commentator Member

    thanks, this solved the problem
     
  7. commentator

    commentator Member

    hm, the problem is solved except:
    in the incoming mail message source I see:
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run this command and post the output:

    grep content_filter /etc/postfix/main.cf
     
  9. commentator

    commentator Member

    Code:
    #content_filter = amavis:[127.0.0.1]:10024
    with # as I tried to disable it
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, then the emails could not have gone through amavis, at least if you did not miss to restart postfix and this email must have really been sent after you did that change.
     
  11. commentator

    commentator Member

    thansk for reply. Today I repeated the suggested switching back to amavis setting and again switching to rspamd. After this switch it is working as it should be. For now :) Keep an eye on it
     
  12. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    FWIW, the content_filter setting was previously used to send mail through amavis, but that is not the case now, the filter is now set via smtpd_sender_restrictions, eg. in:
    Code:
    smtpd_sender_restrictions = check_sender_access regexp:{config_dir}/tag_as_originating.re {reject_slm}, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf
    the tag_as_originating.re access map sets the filter to port 10026 for authenticated mail, and then tag_as_foreign.re changes that to port 10024 for unauthenticated senders.

    The content_filter setting itself would only be used as a default content filter for any non-default transports in /etc/postfix/master.cf which would overwrite smtpd_sender_restrictions, such as port 10025 (where content_filter is set to empty so mail doesn't keep looping through amavis):
    Code:
    127.0.0.1:10025 inet n - n - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o smtpd_end_of_data_restrictions=
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtp_send_xforward_command=yes
            -o disable_dns_lookups=yes
    
    (The above applies to amavis systems, not rspamd.)
     
    till likes this.

Share This Page