[exim] Handling :include: in redirect router - bug?

Top Page
Delete this message
Reply to this message
Author: Evgeniy Berdnikov
Date:  
To: exim-users
Subject: [exim] Handling :include: in redirect router - bug?
Hello.

I found that if recipient address is handled by redirect router
with :include:/some/file, the resulting list of addresses is not
fixed on the submission, but can be updated from the file each
queue run. Is it a bug or a feature?

Here is a simple testcase:

------------------------------------------------------------------------
/etc/aliases:
    taddr: :include:/tmp/addr.list


/tmp/addr.list:
    u1@???


# exim4 -bt taddr@localhost
[...]
u1@???
    <-- taddr@localhost
  router = dnslookup, transport = remote_smtp
  host dns.comcor.ru [212.45.0.3] 
------------------------------------------------------------------------


Let submit a test mail to unreachable address:

------------------------------------------------------------------------
# echo test | mail taddr@localhost
# mailq
 0m   827 1TyIZo-00072a-4R <root@*******.*****.ru>
          taddr@localhost


# exim4 -Mvh 1TyIZo-00072a-4R | fgrep comcor.ru
YN u1@???/archive
------------------------------------------------------------------------

Update included file with new address, and look into control file:

------------------------------------------------------------------------
# echo u2@??? >> /tmp/addr.list
# exim4 -q
# exim4 -Mvh 1TyIZo-00072a-4R | fgrep comcor.ru
YY u1@???/archive
NN u2@???/archive
------------------------------------------------------------------------

The problem was raised in production enviroment, where user has to fill
some :include:ed file with addresses, extracted from database, and then
send a mail to a list. This process is repeated with different content
and different set of addresses, but the same file, filled by script.
It was unexpectable that list of recipients is not fixed on submission,
and previously sent mails pick up wrong addresses after staging in queue,
when file is changed.
--
Eugene Berdnikov