[Exim] Hairy Autoreply Setup

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil White
Dátum:  
Címzett: exim-users
Tárgy: [Exim] Hairy Autoreply Setup
Hello.

I've been working on a specific configuration for a few days now, and
seem to have hit a dead end. Normally, I just go back to the
beginning and start again from scratch, but in this case I still
havn't succeeded. Rather than continue, I thought I'd check to see if
anyone else here does anything similar to what I require.

Basic setup: In all cases; A simple director routing specific local
addresses to an auto-reply transport to send a specific file back to
the sender. Config file maps the local_part to the file to send.
Eventually, the file will be sent as an attatchment or enclosure (I
havn't got round to thinking about this yet)

Stage 2:
Sometimes (dependant upon the same file that is used in basic setup),
the original senders email is to be passed on to the owner of the
auto-reply mailbox. The owners email account may be local or remote
to the exim-host machine.

Stage 2 is causing me the problem - mainly because I am stubborn and
dislike messy repetitive conditional checks. My first is reproduced
below. My problems start when I try to direct a copy of the original
mail to the auto-reply owner. In the director section, using
'new_address' doesn't work. Neither does a 'shadow_transport' (as far
as I have been able to configure it!). The only way I can see to do
this is set 'unseen' on the director, and then use an alias file -
but as I have already tested and determined that this email address
is an autoreply, I instinctively feel reluctant to do exactly the
same test again, which would therefore be used against all incoming
emails, not just the autoreply ones. Setup is further complicated by
the fact that the copy is sent to an address which may or may not be
local.

If anyone has any thoughts, I'd be interested to hear them - I'm sure
it will lessen the ammount of time I am spending on this! Also
comments on the enclosure method would be gratefully received (or
will copy the style found in C008)

Regards
    Phil White.


----------------------------------------------------

# this is placed at the beginning of the directors section.
reply_director:
driver = smartuser
transport = reply_transport
local_parts = lsearch;/home/${domain}/reply/reply.cfg


reply_transport:
  driver = autoreply
  to = ${sender_address}
  subject = "Automatic Reply Response."
  user = mail
  file = "${lookup{$local_part:file}\
          lsearch {/home/$domain/reply/reply.cfg}\
          {/home/$domain/reply/$value} }"
  log = /var/log/autoreply.log
  once = "${if match{lookup{$local_part:once}\
            lsearch {/home/$domain/reply/reply.cfg}\
            {$value} }{yes}\
          {/home/${domain}/reply/reply.db}{false}}"
  text = "\
  -----\n\
  This message was automatically generated by email software\n\
  in response to your email request. \n\
  -----\n\n\n" 


config.file:
  info:    file=info.dat    copy=email@???    once=no


where
info = mailbox name
info.file = file to send back
send original mail to mailbox owner
no = once only