mailcow-dockerized icon indicating copy to clipboard operation
mailcow-dockerized copied to clipboard

Address rewriting, BCC maps

Open dl1976 opened this issue 3 years ago • 3 comments

Contribution guidelines

I've found a bug and checked that ...

  • [X] ... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue.
  • [X] ... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries.
  • [X] ... I have understood that answers are voluntary and community-driven, and not commercial support.
  • [X] ... I have verified that my issue has not been already answered in the past. I also checked previous issues.

Description

Recipient maps do not work when Rspamd is not triggered. We use a separate spam filter server/appliance in front of MailCow. That server is defined in forwarding hosts within MailCow. If "Spam filter" option is disabled for that host then inbound mails are not delivered to BCC destination/mailbox.

Logs

/

Steps to reproduce

As stated in description ...

System information

Question Answer
My operating system I_DO_REPLY_HERE
Is Apparmor, SELinux or similar active? I_DO_REPLY_HERE
Virtualization technology (KVM, VMware, Xen, etc - LXC and OpenVZ are not supported I_DO_REPLY_HERE
Server/VM specifications (Memory, CPU Cores) I_DO_REPLY_HERE
Docker version (docker version) I_DO_REPLY_HERE
docker-compose version (docker-compose version) I_DO_REPLY_HERE
mailcow version (git describe --tags `git rev-list --tags --max-count=1` ) I_DO_REPLY_HERE
Reverse proxy (custom solution) I_DO_REPLY_HERE

Output of git diff origin/master, any other changes to the code? If so, please post them:

YOUR OUTPUT GOES HERE

All third-party firewalls and custom iptables rules are unsupported. Please check the Docker docs about how to use Docker with your own ruleset. Nevertheless, iptabels output can help us to help you: iptables -L -vn:

YOUR OUTPUT GOES HERE

ip6tables -L -vn:

YOUR OUTPUT GOES HERE

iptables -L -vn -t nat:

YOUR OUTPUT GOES HERE

ip6tables -L -vn -t nat:

YOUR OUTPUT GOES HERE

DNS problems? Please run docker exec -it $(docker ps -qf name=acme-mailcow) dig +short stackoverflow.com @172.22.1.254 (set the IP accordingly, if you changed the internal mailcow network) and post the output:

YOUR OUTPUT GOES HERE

dl1976 avatar Jun 07 '22 09:06 dl1976

A workaround is to enable spam filtering and set high scores for default actions in data/conf/rspamd/local.d/actions.conf.

That's due to BCC being a postfilter (it should be) and the FWD host rule being a prefilter.

(Just changing priorities in the LUA scripts is not wanted and will break the logic)

andryyy avatar Jun 07 '22 09:06 andryyy

I did enable spam filtering and got it working but I would like to use it without it (if possible). I believe my setup is not uncommon and using a second spam filter can add some confusion (at least for end users) and use system resources.

The reason I am using address rewriting is that I am testing a mail archiving solution. I need to catch all the mails for a domain in a mailbox and I would like to do that with as little administration as possible. Another option is to use "SMTP journaling" but I did not find any way how to do that.

If I forgot before, thanks for all the great work You are doing.

dl1976 avatar Jun 07 '22 10:06 dl1976

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

milkmaker avatar Aug 06 '22 20:08 milkmaker

We got the same problem, as we use a mailgateway in front of mailcow. Inbound bcc is not triggered, because inbound antispam is disabled for the mailgateway ip.

NetBLOKS avatar Nov 30 '22 10:11 NetBLOKS