[exim] Retaining message IDs through transport filters

Top Pagina
Delete this message
Reply to this message
Auteur: Steve Hill
Datum:  
Aan: exim-users
Onderwerp: [exim] Retaining message IDs through transport filters

I have a filter (external program) that accepts a message on stdin, adds
some headers and produces the modified message on stdout (similar to the
way SpamAssassin works). Currently I have a transport filter set up to
handle this like:

iceni_transport:
    driver = pipe
    batch_max = 1000
    use_bsmtp
    command = /usr/sbin/exim -oMr iceni-scanned -bS
    transport_filter = /usr/bin/mailfilterc $message_id $local_part
    user = exim
    log_output = true


This quite happilly accepts the mail and re-injects the modified message
into exim. The problem is that the re-injected message is treated as an
entirely new message - it gets a new message ID so it's not possible to
track a message on it's journey through the mail server by just grepping
the logs for it's message ID.

Is there any way to pipe a message through an external command, and then
continue on to process the message that's produced on the command's
stdout as if it were the same message rather than having to re-transmit
the command's output as an entirely new message?

--

  - Steve
    xmpp:steve@???   sip:steve@???   http://www.nexusuk.org/


      Servatis a periculum, servatis a maleficum - Whisper, Evanescence