On Mon, 16 Oct 2000, Andrew D wrote:
> # router
> outbound_big:
> self = defer
> driver = lookuphost
> transport = out_big
> condition = ${if >{$message_size}{200K}{yes}{no}}
>
> # transport
> out_big:
> driver = smtp
> delay_after_cutoff = false
> keepalive = true
> batch_max = 1
> serialize_hosts = *
>
> Basically I wish to have large emails go out one at a time.
There are two problems with your configuration:
(1) self=defer isn't going to achieve much for general outgoing mail,
since such messages won't ever route to the local host.
(2) serialize_hosts works *per host*, not "per all connections". So you
will only get serialization if two large messages *for the same host*
arrive simultaneously.
One possibility would be to set up a router which *did* defer all large
messages, except in queue runs. Since queue runners deliver just one
message at a time, if you limited the number of simultaneous queue
runners to 1, you would get the effect you wanted. A suitable router
might be
defer_if_large_unless_queue_run:
driver = domainlist
self = defer
condition = ${if or {{queue_running}{ < {$message_size}{200K}}}{no}{yes}}
route_list = * 127.0.0.1 byname
Of course, this would always delay any large message until the next
queue runner, but if you run them fairly regularly, this shouldn't be a
huge problem. (May even be desirable!)
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.