Re: [exim] Request: configurable "message is too big" messag…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Tony Finch
Dátum:  
Címzett: Sander Plas
CC: exim-users
Tárgy: Re: [exim] Request: configurable "message is too big" message
On Tue, 3 May 2005, Sander Plas wrote:

> As far as i can see, the "message is too big (transport limit = %d)"
> message that Exim sends when a message is larger than the
> message_size_limit that is specified in the transport, can currently
> only be changed by modifying Exim's source code.
>
> I need to be able to modify this message for one of our customers. For
> now, i simply changed the source code, but we would prefer to avoid
> that in the future. Would it be possible to make this configurable in
> a future version of Exim?


Double the router that routes to the transport in question. Have a
condition on the first copy of the transport which only routes messages
that are below the size limit. Change the second router to cause a bounce
with your choice of message. E.g.

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

becomes:

dnslookup:
driver = dnslookup
domains = ! +local_domains
condition = ${if <{$message_size}{10M} }
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8

dnslookup_failed:
driver = redirect
domains = ! +local_domains
data = :fail: message is too big (transport limit = 10M)
allow_fail

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}