4

I have a postfix mail server based on Arch Linux.

I used the usual configuration: mysql virtual_* (mailbox, alias, domain) and amavisd filtering (content_filter = smtp-amavis:[127.0.0.1]:10024).

I would like to try the rspamd and I think I've set everything right.

I use the following settings in Postfix:

#MILTER
milter_default_action = accept
milter_protocol = 6

smtpd_milters = inet:127.0.0.1:8891 inet:127.0.0.1:11332
non_smtpd_milters = inet:127.0.0.1:8891
milter_mail_macros =  i {mail_addr} {client_addr} {client_name} {auth_authen}

rspamd local.d/worker-proxy.inc

bind_socket = "127.0.0.1:11332";
milter = yes;
timeout = 120s;
upstream "local" {
    default = yes;
    self_scan = yes;
}

When I turn off postfix content_filter option (do not have amavis filtering), postfix does not resolve the RCPT TO (alias envelope recipient) value with the virtual table, so redirects do not work:

if I send an email to somebody@domain.hu, which is a virtual alias and would be redirected to somebody2@domain.hu, this recipient expand will not occur when there is no content_filter and rspamd is set based on smtpd_milters.

However, if I switch back to content_filter, so rspamd and amavis will filter together, there is no problem.

The recipient expand task is theoretically done by the postfix cleanup process.

Otherwise rspamd works: filter from command line, web interface, and milter.

I just don't understand.

Laszlo Malina
  • 168
  • 2
  • 10

1 Answers1

3

I found the answer: The receive_override_options line disables address manipulation before the content filter.

If we use content_filter then we must use receive_override_options = no_address_mappings in main.cf. If there is no content_filter, there should be no receive_override_options.

Laszlo Malina
  • 168
  • 2
  • 10