Re: [Exim] Autoreply which sends no message

Pàgina inicial
Delete this message
Reply to this message
Autor: John Horne
Data:  
A: Exim Users List
Assumpte: Re: [Exim] Autoreply which sends no message
On 30-Mar-01 at 08:32:41 Philip Hazel wrote:
> On Thu, 29 Mar 2001, John Horne wrote:
>
>> A quick question for you to think about :-) Without all the gory details
>> what I require is an autoreply transport which updates the 'log' and
>> 'once' files, but which does not actually send any message back to the
>> user.
>>
>> I've had 2 thoughts on this - one is to try and set the sender as being
>> the 'nobody' address, which equates to ditching the message to
>> /dev/null. This doesn't seem to work because exim remembers the
>> original sender and seems to send the autoreply to them.
>
> Can you give more configuration details? If you set the "to" option on
> an autoreply, it should send the message to that address, which you can
> arrange to be one that is thrown away.
>

Yes, I tried setting 'to' and it was very close to what I wanted. However, in
the log file it then puts in the 'nobody' address as the To: header, whereas
I want the original recipient instead. It may sound picky, but I'm trying to
get two systems to maintain identical 'log' files without having to do
something like copy them from one system to another. In that respect one log
file having the true recipient and the other having the 'nobody' address is
not identical. Ulitmately it may be something we can live with.

Needless to say we are trying to do something not that usual I suspect! :-)
However the transport and director I last tested were (lines wrapped by me):

jhtrans:  (transport)
  transport_filter = /bin/sh -c "/usr/bin/cat - >/dev/null && /usr/bin/touch
                      /tmp/jhcopy"
  driver = autoreply
  subject = ${if def:h_Subject: {Re: ${quote:${escape:$h_Subject:} } } {I am
                 on vacation} }
  log = /tmp/log
  once = /tmp/once
  to = nobody@MASTER_MAILHUB     (equates to nobody@???)
  from = $original_local_part@$original_domain
  return_message
  user = exim



jhredi2:         (director)
  no_expn
  domains = PLYMOUTH
  local_parts = jhorne
  condition = ${if or { { ! eq {MAILHUB_TYPE} {master} } \
                        { ! eq {$h_X-UoP-redicopy:} {true} } \
                        { match {$h_precedence:} {(?i)junk|bulk|list} } \
                        { eq {$sender_address} {} } \
                        { match {$h_To:} {(?i)^uop-} } \
                      } {false} {true} }
  transport = jhtrans
  driver = smartuser
  new_address = nobody@MASTER_MAILHUB
  no_rewrite
  headers_remove = X-UoP-Rewrite:X-UoP-redicopy                             


Needless to say don't worry about some of the stuff there! PLYMOUTH is
'plymouth.ac.uk' and MAILHUB_TYPE is 'master'.

Regards,

John.

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