On 2019-02-26 15:51, Wietse Venema wrote:
Tom Sommer:
I have a feature request for a lookup table like randmap(), but with the
option to control a percentage or a count of mails sent to the
transport.

Even if the percentage was just a "chance" of selection, it would be
nice.

So you could do :

sender_dependent_default_transport_maps = randmap:{smtp1=90%,smtp2=10%}

Or is there another way to achieve this?

# Picks smtp1 90% of the time, smtp2 10% of the time.
randmap:{smtp1,smtp1,smtp1,smtp1,smtp1,smtp1,smtp1,smtp1,smtp1,smtp2}

POSTCONF(1)                                                        POSTCONF(1)

              randmap (read-only)
An in-memory table that performs random selection. Exam- ple: "randmap:{result_1, ..., result_n}". Each table query returns a random choice from the specified results. The first and last characters of the "randmap:" table name must be "{" and "}". Within these, individual results are separated with comma or whitespace. To give a specific result more weight, specify it multiple times.

True, that is a way - although a litte bit of a workaround; setting 93% is a little bit of a mess :)

I only read http://www.postfix.org/DATABASE_README.html where that last bit was missing.

Thanks.

--
Tom

Reply via email to