[Exim] a few points I stumbled about

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Joachim Wieland
日付:  
To: exim-users
題目: [Exim] a few points I stumbled about
Hi,

here are a few points in the exim configuration that I stumbled about
yesterday and couldn't quite explain if exim behaves as it is supposed
to be:


- command = adfdfasf "${if eq {...}{...} {-q ...}{}}"
will call 'adfdfasf "-q ..."', not 'adfdfasf -q ...'

Explanation: I had a command that wanted to have a parameter named -q,
followed by a number. It didn't work out with "${if eq ..}" and I used
strace to see what is actually called. exim called

program name
first arg: -q abc

instead of

program name
first arg: -q
second arg: abc

and the program complained about not knowing the parameter "-q abc"

In my case I could easily use --long-q-opt=abc and the problem was
gone :-)


- variable for the return value of a command

I didn't find a variable that holds the return value of a command. Is
there any? One could use it for the following configuration:

  bounce_message_text = ${if eq {$return_value}{1} {first reason} {
                ${if eq {$return_value}{2} {second reason}
                     {other reason}
                }}}


I'd also appreciate a variable that contains the reason why a message
has been bounced. Then you could do checks on it, I wanted to set
return_size_limit to a very small value when bouncing a very big message.
Since I cut it off anyway why shouldn't I cut it off after a few KBs?
Yet I would like to send back up to 100 K if delivery failed for some
other reason.


- Why can't I use ${if ... } for a return_size_limit?

I tried these:

return_size_limit = ${if >{$message_size}{100K}{3K}{100K}}
return_size_limit = ${if >{$message_size}{100000}{3000}{100000}}
return_size_limit = "${if >{$message_size}{100K}{3K}{100K}}"
return_size_limit = "${if >{$message_size}{100000}{3000}{100000}}"

  exim gives:    integer expected for return_size_limit


Is there a syntactical error in my directive?

Furthermore it would be nice if return_size_limit could also be set in a
transport as message_size_limit does.


- can I create hostlists that are evaluated at the time a message is delivered?
I would like to write something like:

localpartlist foolist = pgsql; select ... from tblfoo where $local_part = ...;

...

  foo:
    local_parts = foolist


but exim didn't expand the local_part, a MACRO did the job, though.


- expanding $domain in ACL's

  LOCAL_DOMAINS = pgsql;select domain from tbldomains \
      where domain = '$domain' and relayonly = 0;


...

  accept  domains       = LOCAL_DOMAINS
          endpass
          message       = unknown user
          verify        = recipient


When expanding LOCAL_DOMAINS, $domain seems not to be set. Why this?
I fear that it could take some time to do a SELECT on ALL domains instead
of just getting a partial list (i.e. only the row with the domain I'm
interested in).

debug output:

require: condition test succeeded
processing "accept"
check domains = pgsql;select domain from tbldomains where domain = '$domain' and relayonly = 0;
[...]
PGSQL query: select domain from tbldomains where domain = '' and relayonly = 0;
PGSQL: no data found


I tried the same with a domainlist, it didn't work either, though the
documentation says:

    .  Whenever a domain list is being scanned, $domain contains the subject
       domain.



Maybe someone could tell me what I did wrong or has another solution.


Thank you very much,

Joachim

--
*****PGP key available - send e-mail request*****   -   ICQ: 37225940
Whenever you find that you are on the side of the majority, it is time
to reform.                                               -- Mark Twain