Re: [Exim] Subject: in autoreply (vacation)

Page principale
Supprimer ce message
Répondre à ce message
Auteur: John Jetmore
Date:  
À: exim-users
CC: Robert Heron
Sujet: Re: [Exim] Subject: in autoreply (vacation)
Here's what I did for our users (3.36) (I know some of this isn't great,
I'm just presenting the concept). It looks up the interesting stuff from a
user's .vacation file, or uses defaults if needed. This is designed to
be run from a web interface, though I haven't built that part yet. I
recently expanded the condition to allow a simulation of vacation's -a
option. The only thing that's really missing is a lookup for once_repeat,
but that string isn't expanded. I put in a feature request for it a while
back. .vacation looks like this:

FROM: John Jetmore <jetmore@???>
USERS: (?i)john@|jetmore
SUBJECT: Re: $h_subject:
TEXT: This is\nthe body\nof the\nresponse

DIRECTOR:
local_vacation:
  driver = localuser
  transport = local_vacation
  require_files = /home/${lc:$local_part}/.vacation
  condition = \
    ${if match\
      {$h_to:}\
      {\
        ${lookup{USERS}lsearch{\
          /home/${lc:$local_part}/.vacation\
        }{$value}{(?i)$local_part}}\
      }\
      {yes}\
      {no}\
    }
  no_verify
  no_expn
  unseen


TRANSPORT:
local_vacation:
  driver = autoreply
  user = $local_part
  to = $sender_address
  once_repeat = 7d
  once = /home/${lc:$local_part}/.vacation.db
  from = \
    ${lookup{FROM}lsearch{\
      /home/${lc:$local_part}/.vacation\
    }{$value}{$local_part@$domain}}
  subject = \
    ${expand:\
      ${lookup{SUBJECT}lsearch{\
        /home/${lc:$local_part}/.vacation\
      }{$value}{Away from mail}}\
    }
  text = \
    ${expand:\
      ${lookup{TEXT}lsearch{\
        /home/${lc:$local_part}/.vacation\
      }{$value}{I am currently away from my mail}}\
    }



On Wed, 22 May 2002, Robert Heron wrote:

> Hi All,
>
> I've just configured vacation service using autoreply transport. It looks
> like this:
>
>
> vacation_pipe:
> driver = autoreply
> file = /home/${local_part}/.vacation
> to = ${sender_address}
> from = ${original_local_part}@${original_domain}
> subject = "Autoreply: Vacation message for ${local_part}@${domain}"
> log = /home/${local_part}/.vacation_log
> once = /home/${local_part}/.vacation_log_db
>
>
> and in the DIRECTORS:
>
>
> on_holiday:
>    driver = localuser
>    transport = vacation_pipe
>    require_files = ${local_part}:/home/${local_part}/.vacation
>    unseen

>
>
> Everything works fine.
> The only thing I need to do is a user could change its Subject header value.
>
> Now it is always "Autoreply: Vacation message for ${local_part}@${domain}"
> but I want to read the content of Subject header from a file, for example
> from /home/${local_part}/.subject.
>
> I know that the subject can be read from MySQL database, but I don't want
> to involve MySQL.
>
> How to make exim to read Subject value from a file?
>
> Robert
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>