[Exim] headers_add with -qq not working?

Página Inicial
Delete this message
Reply to this message
Autor: John Horne
Data:  
Para: Exim Users List
Assunto: [Exim] headers_add with -qq not working?
Hello,

A complicated one this one! With exim 3.22 it seems that if we send a
message via a director which uses the 'headers_add' option, then it works if
the message is subsequently 'forced' with the -q option, but not -qq.

In particular, it concerns the lists to all our staff and/or students again
(!). The message first passes through a director with filtering set - this
freezes the message, and works in both cases.

If we then 'force' the message using 'exim -qqRff plymouth.ac.uk' it goes
through the following director:

----------------
special_lists:
  no_expn
  domains = PLYMOUTH
  condition = ${if eq {$sender_address} {} {false} {true} }
  senders = POSTMASTER
  prefix = uop-
  local_parts = ! uop-replies
  driver = forwardfile
  no_check_local_user
  headers_remove = X-UoP-Rewrite : Reply-To : X-Confirm-Reading-To : \
                   Return-Receipt-To : X-pmrqc : X-XFmail-Return-To : \
                   Disposition-Notification-To : Resent-From : Resent-To : \
                   Resent-Date : Resent-Message-Id : Precedence : From
  headers_add = "Reply-To: ${lookup {$local_part} lsearch
{TABLES/lists/special/replies} \
                                    {$value} {POSTMASTER} }\n\
                 Precedence: Bulk\n\
                 From: POSTMASTER"
  file = TABLES/lists/special/$local_part
  forbid_file
  forbid_pipe
  forbid_include
  forbid_filter_logwrite
  forbid_filter_reply
  one_time
  skip_syntax_errors
  syntax_errors_to = POSTMASTER
  errors_to = POSTMASTER
-------------


Unfortunately the dreaded 'one_time' is in there as well. Sending a test
message with the '-d9 -qqRff' option showed it all going well, and then:

-----------------
Considering: jhorne@???
plymouth.ac.uk in local_domains? yes (matched plymouth.ac.uk)
plymouth.ac.uk in percent_hack_domains? no (end of list)
unique = jhorne@???
jhorne@??? was previously delivered: discarded
uop-jhfl@???: children all complete
>>>>>>>>>>>>>>>>>>>>>>>>

After directing:
  Local deliveries:
  Remote deliveries:
  Failed addresses:
  Addresses to be routed:
    jhorne@???
  Deferred addresses:

>>>>>>>>>>>>>>>>>>>>>>>>

routing jhorne@???, domain tracy.csd.plymouth.ac.uk    
------------------


Doing the same but with '-d9 -qRff' showed:

-----------------
Considering: jhorne@???
plymouth.ac.uk in local_domains? yes (matched plymouth.ac.uk)
key="tracy.csd.plymouth.ac.uk" partial=-1
LRU list:
0/usr/local/exim/tables/virtual-domains.cdb
0/usr/local/exim/tables/redirections.cdb
0/usr/local/exim/tables/copies.cdb
0/usr/local/exim/tables/defer-users.cdb
0/usr/local/exim/tables/vacation-users.cdb
7/usr/local/exim/tables/lists/special/replies
7/etc/mail/aliases
0/usr/local/exim/tables/aliases.cdb
7/usr/local/majordomo/lists/majordomo.aliases
End
internal_search_find: file="/usr/local/exim/tables/virtual-domains.cdb"
type=cdb key="tracy.csd.plymouth.ac.uk"
file lookup required for tracy.csd.plymouth.ac.uk
in /usr/local/exim/tables/virtual-domains.cdb
lookup failed
tracy.csd.plymouth.ac.uk in local_domains? no (end of list)
unique = jhorne@???
dbfn_read: key=R:tracy.csd.plymouth.ac.uk
dbfn_read: key=R:jhorne@???
jhorne@???: queued for routing
>>>>>>>>>>>>>>>>>>>>>>>>

After directing:
  Local deliveries:
  Remote deliveries:
  Failed addresses:
  Addresses to be routed:
    jhorne@???
  Deferred addresses:

>>>>>>>>>>>>>>>>>>>>>>>>

routing jhorne@???, domain tracy.csd.plymouth.ac.uk    
--------------------




The overall effect seems to be that the headers_add of the 'special_lists'
director is 'ignored'. It works with '-q' but not '-qq'. It would seem that
when using '-qq' and it goes through the 2-stage routing/directing then it
obeys the 'headers_add' probably but then discards the result (hence the
'discarded' bit in the output). It then does the actual routing but ignores
(or has lost) the information about the 'headers_add'.

The question I guess is whether this is the correct action or not when '-qq'
is used with directors with 'headers_add'? We tend to use a small perl
script to 'force' mail on when necessary, and this uses '-qqRff', but I can
easily change it to use '-qRff'.

Thanks,

John.

------------------------------------------------------------------------
John Horne, University of Plymouth, UK           Tel: +44 (0)1752 233914
E-mail: jhorne@???
PGP key available from public key servers