Lähettäjä: W B Hacker Päiväys: Vastaanottaja: exim users Aihe: Re: [exim] redirect driver + transport choice
Marcin Gryszkalis wrote: > On Tuesday of May 26 2009, W B Hacker wrote:
>>> Sounds heretic ;)
>> With my surname you expected conventional?
>
> I wouldn't dare :)
>
>> I meant 'just for the routers and transports that need to do weird stuff'
>>
>> That adds perhaps 4 lines to each of perhaps 5 or 6 routers and their
>> matching transports so they can pull directly from the DB and not rely on a
>> semi-local, sei-global, neither, both, sometimes, variable.
>
> I read my questions and your answers again and now I think I understand what
> you mean.
>
>> One transport ordinarily may be called by more than one router.
>> Conventionally, one router is expected to call one, and only one, transport
>> - but doesn't mean it cannot 'choose' *which* of several.
> I know that as at the beginning I tried to do it.
>
>>> Wondering why exim doesn't have generic variable system, where I could
>>> define arbitrary variables, assign anything I want to them etc...
>> It does. In acl_c and acl_m. You can grant yourself 'many' more than the
>> default in the build configure.
>> Not yet in router/transports, though. I've suggested acl_r for those, but
>> so far no takers.
>
> Right, but don't call that "generic", numbering variables sounds... well...
The 'connect (phase) and message (phase) acl_c and acl_m haven't been limited to
'numbers' for quite some time now.
One may name (and rename) them at will.
> You say exim config is NOT programming language? ;)
>
Oddly, though Exim is coded in 'C' and PH also developed PCRE, the acl's
resemble Forth case structures (to an old Forth coder, anyway..).
Solutions tend to resemble the problems they solve.
But in the right hands, almost *anything* is a 'programming' language.
Google the 99 bottles (of beer) collection, and find the problem coded in
everything from Postscript (a Forth dialect) to SQL.
>>> to = ${lookup mysql {SELECT sms FROM user WHERE
>>> username='${quote_mysql: $local_part}' AND
>>> domain='${quote_mysql:$domain}'}{$value}}
>> Yo might want to employ a 'LIMIT 1' in those...
>
> Not needed as username+domain forms unique primary key.
>
Or so it is intended. You are aware that a DB superuser can sometimes violate
his own constraints with no more interference than a warning message, so 'Belt
and braces' at least insures that one consistently makes the *same* error
if/as/when that one is over-ridden in a DB. BT,DT,GTTS
>> You can limit size with an acl in acl_smtp_data.
> but that includes other (than Subject:) headers
>
>> You can even map the message to more terse text.
>> Look, for example, at all the things SpamAssassin does (or CAN do) during
>> the DATA phase while the session is still in-process.
>
> Right, flexibility is what makes me use exim.
>
> greetings
If you don't mind hacking the source, all MTA are flexible.