[pmg-devel] [RFC pmg-api 4/4] add support for before queue filtering

Stoiko Ivanov s.ivanov at proxmox.com
Thu Nov 14 12:53:08 CET 2019


On Thu, 14 Nov 2019 10:04:03 +0100 (CET)
Dietmar Maurer <dietmar at proxmox.com> wrote:

> >  [% pmg.mail.int_port %]       inet  n -       -       -       [% pmg.mail.max_smtpd_out %]      smtpd
> > +[% IF pmg.mail.before_queue_filtering -%]
> > +  -o smtpd_proxy_filter=127.0.0.1:10023
> > +  -o smtpd_proxy_options=speed_adjust
> > +  -o smtpd_client_connection_count_limit=[% pmg.mail.conn_count_limit div 5 %]  
> 
> Note: conn_count_limit may be 0!!

While trying to include a dedicated option (conn_count_limit_proxy or
 conn_count_limit_before_queue) in PMG::Config for this (and defaulting 
to int(conn_count_limit/5)) I realized that it might not be too much of
a gain here:
* conn_count_limit can be set manually to 0 (disabling the limit) - however
  I'd expect a user to do that if they get all their mail from a single
  relay-server
* in that case the Before Queue [0] howto also states:
```
This limit is not necessary if you receive all mail from a trusted relay host.
```

I currently cannot come up with a good example where one would want to
have no limit for conn_count_limit, but explicitly set one for the
before-queue proxy (and should someone want that they can always
override the template)

Glad to include it in PMG::Config in any case if it makes sense from
an consistency/aesthetic point of view (or if there is a use-case)

What do you think?

[0] http://www.postfix.org/SMTPD_PROXY_README.html#parameters




More information about the pmg-devel mailing list