kvaps / docker-kolab

Kolab image with nginx, ssl, opendkim, amavis and fail2ban
MIT License
41 stars 19 forks source link

fetchmail from smarthost #12

Closed cguentherTUChemnitz closed 8 years ago

cguentherTUChemnitz commented 8 years ago

I am working on an small additional container, which runs an fetchmail to get my mails from an smarthost. I was able to get it working using the both two fetchmail options:

smtphost: mail.example.org smtpname: first.last@example.org

Those two options tells the fetchmail, where the mails should be delivered. This works quite well when the fetchmail container is linked to the kolab one. In this case the mail hostname is directly resolvable. But i have two major issues, which prevents me from using this state:

  1. When a lot of messages arrive i get the following smpt error: "fetchmail: SMTP error: 451 4.7.1 Rate limit exceeded" This seems for me some kind of protection against too many mails in too short time. But i don't know where i can tweak the rate limit value. I think somewhere in the kolab configuration.
  2. The messages seem to be delivered directly into my users message box. This sadly implies that the running instance of rspamd is not able to check those fetched mails. So how should i configure the fetchmail delivery that the mails also goes through the rspamd?
kvaps commented 8 years ago

Hi,

  1. Please try to play around with these settings in postfix.
  2. You wil configure it here
cguentherTUChemnitz commented 8 years ago

Thanks for your fast answer. The second issue is completely gone by deactivating the local network as white-listed sender. Thanks!

But i was not able to get the first issue fixed. I think the most convenient way should be to define the mynetworks variable in /etc/postfix/main.cf. The documentation says:

smtpd_client_event_limit_exceptions (default: $mynetworks) SMTP clients that are excluded from connection and rate limits specified above.

But it does not seem to have any impact. I still get the

fetchmail: SMTP error: 451 4.7.1 Rate limit exceeded

error message. Also setting all __ratelimit options to zero does not solve the issue. Do i have to set those values at another location or config file?

cguentherTUChemnitz commented 8 years ago

Oh sorry, it seems that i had a typo. Adding in /etc/postfix/main.cf the line

mynetworks = 172.0.0.0/24, 192.168.0.0/16, 127.0.0.0/8
#172.0.0.0/24 address range for standard docker bridge address space

solves the second issue.