[Exim] Autoreply problems, Exim 3.35

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Alex King
Date:  
À: exim-users
Sujet: [Exim] Autoreply problems, Exim 3.35
OK, I'm on exim 3.35 as long as Debian stable includes this version,
just for explanaion.

I'm having a problem with adding headers to an autoreply. From what I
understand it can't be done, and add header type options on the
transport or director simply add the headers to the incomming mail, not
the reply.

The autoreply transport (and output returned from a pipe transport)
seem to only allow you to secify the text of the message to be used as
the reply, not the headers.

The situation is that I want a simple autoresponder which will send a
response to any incomming mail. The problem is that it needs to have an
attachment, therefore needs to be a multipart mime message, therefore
needs soem mime headers.

Here is what I have so far:

autoreplydirector:
  driver = forwardfile
  reply_transport = address_reply
  require_files = /etc/mail/autoreply/${local_part}
  check_local_user = false
  user = mail
  filter = true
  headers_add = ${if exists {/etc/mail/autoreply.headers} {${lookup{${local_part}} lsearch {/etc/mail/autoreply.headers}{$value}}}}
  data = "#Exim filter\n\
        if personal then\n\
          seen mail subject \"${local_part}\"\n\
            from \"Autoreply Subsystem <${local_part}@${domain}>\"\n\
            file /etc/mail/autoreply/${local_part}\n\
            log /etc/mail/autoreply/${local_part}.log\n\
        else\n\
          seen finish\n\
        endif"


To explain:

If I put an email in a file "/etc/mail/autoreply/foo", then that email
is returned to the sender if they email to foo@mydomain.

the headers_add lie was supposed to add headers taken from the file
/etc/mail/autoreply.headers and indexed by local_part (foo). However, I
believe it only adds it to the incomming mail, not the reply.

Has anyone set up a similar thing, an autoresponder that fires back a
mime mail?

My thoughts now are that I'll need an external script to generate the
reply message.

TIA,

Alex King

(PS. please cc me, I'm not on the list)