Random delivery

Jorge Bastos mysql.jorge at decimal.pt
Sun Dec 31 14:30:30 EET 2017


Hi Joseph,

It's that what I want!!
Sequentially, my bad saying random!

Well... with the script, I remember I did something like this 15 years ago
with qmail with a php script, that every email was saved in mysql and I
always selected the next email addrr in the list.

Going to search for this option in postfix, thanks for the tip as this is a
bit offtopic of dovecot,

-----Original Message-----
From: dovecot [mailto:dovecot-bounces at dovecot.org] On Behalf Of Joseph Tam
Sent: 30 de dezembro de 2017 07:17
To: dovecot at dovecot.org
Subject: Re: Random delivery

"Jorge Bastos" <mysql.jorge at decimal.pt> writes:

> I?d like to achieve something that i don?t know if it?s possible.

It's almost always possible; it really depends on how much work you want to
do.

> I have account info at domain.tld and when an email is received, I want 
> to forward it to several accounts, always in this order:
>
> ?  Email1 at domain.tlf
> ?  Email2 at domain.tld
> ?  Email3 at domain.tld

Others have suggested a postfix method.  You can also pipe it to a script
that will select a destination to forward to alias "info at domain.tld" to
"|/my/selector|script".  This will work both in Postfix, sendmail, and
probably most other MTAs.

If you actually want randomization (rather than sequential round-robin), you
can simplify because you won't need to record the last delivery.  Use
/dev/urandom or unix time() mod 3 to select forwarding address.

Joseph Tam <jtam.home at gmail.com>



More information about the dovecot mailing list