[Exim] exim 4.31 and "senders" option for routers

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Alexander Zagrebin
Date:  
À: bugs, exim-users
Sujet: [Exim] exim 4.31 and "senders" option for routers
After upgrading to exim 4.31 i have troubles with configuration,
which successfully worked since 3.x.

I have mailing lists (realized through aliases).
Some are open (anybody can send mail to it), but some are closed
(list of senders is limited).

My solution:

1. Text file with aliases.
   For example, /usr/local/etc/exim/my.domain/aliases:
    list1: user1, user2@???, user3
    list2: user1, user2, user3, user4


2. Text file with allowed senders for lists.
   For example, /usr/local/etc/exim/my.domain/aliases.senders
      list2: user1, user2


3. At configure:
    virtual_aliases:
        driver = redirect
        domains = +my_domains
        senders =
<,${lookup{$local_part}lsearch{/usr/local/etc/exim/$domain/aliases.senders}{
$value}{*}}
        data = ${lookup{$local_part}lsearch{/usr/local/etc/exim/$domain/aliases}}
        qualify_preserve_domain


So for list1 senders is "*", but for list2 - "user1" and "user2" only.
If unapproved sender tried to send mail to list2, it got "unroutable
address".
Also i need sender verification for everyone, except some hosts.
So in ACL i have:

acl_check_rcpt:
    ...
    deny
        hosts = !host1 : !host2
      !verify = sender
    ...


This configuration worked fine before 4.31. But now i have troubles with
sending mail from lists due to sender verification.

>exim -bh ....

...
MAIL FROM: list1@???
RCPT TO: somebody@somewhere
...
>>> check !verify = sender
>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> routing list1@???

...
>>> visp.ru in "+my_domains"? yes (matched "+my_domains" - cached)
>>> in "<,*"? no (end of list)

...

MAIL FROM: list2@???
RCPT TO: somebody@somewhere
...
>>> check !verify = sender
>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> routing list2@???

...
>>> visp.ru in "+my_domains"? yes (matched "+my_domains" - cached)
>>> in "<,user1, user2"? no (end of list)

...

So, due to the _empty_ sender address sender verification fails.

From ChangeLog for 4.31:
55. While running the routers to verify a sender address, $sender_address
    was still set to the sender address. This is wrong, because when routing
to
    send a bounce to the sender, it would be empty. Therefore, I have
changed
    it so that, while verifying a sender address, $sender_address is set to
<>.
    (There is no change to what happens when verifying a recipient address.)


All right. <> is not in list2's senders, but why <> not matched "*"?
Is this bug or feature?

May be was more logically to ignore "senders" option of routers when doing
_sender_ verification?

--
Alexander Zagrebin