On Thu, 2 Jul 1998, David Sheryn wrote:
> I will be decommissioning a system currently used as a mail hub during the
> summer. I've been told that I have to send a reply to every message that gets
> relayed by the system, advising of the impending demise. So I setup an
> autoreply transport and director suitable for intercepting each message:-
>
> warning_t:
> driver = autoreply
> file = /usr/local/mail/warning.txt
> file_expand
> from = postmaster@???
> to = $sender_address
> user = mta
> group = mta
> subject = "Re: Your mail to ${local_part}"
>
> auto_warning_d:
> driver = smartuser
condition = ${if eq{$sender_address}{}{no}{yes}} <<<<<<< add this
> transport = warning_t
> no_verify
> unseen
>
> It all *appears* to work just as planned, except that I get entries in the
> main log file of the form
>
> 1998-07-02 14:40:56 0yrjbc-0005sW-00 <= mta@??? U=mta P=local S=430 for dhs
> 1998-07-02 14:40:57 0yrjbd-0005sb-00 Error while handling error message 0yrjbd-0005sb-00: no recipient addresses
> 1998-07-02 14:40:57 0yrjbc-0005sW-00 == dhs@??? T=warning_t defer (0): Failed to send message from warning_t transport (1)
> 1998-07-02 14:40:58 0yrjbc-0005sW-00 => dhs@??? <dhs@???> D=punt_d T=remote_smtp H=mailswitch.city.ac.uk [138.40.12.12]
>
> despite which, the autoreply warnings get delivered perfectly OK. I'm not too
> familiar with this part of Exim, so if anyone could comment on what's going on
> or what I'm doing wrong, I'd be most grateful.
You are not handling the case when the sender address is empty. See the
fix above.
--
Philip Hazel University Computing Service,
P.Hazel@??? New Museums Site, Cambridge CB2 3QG,
ph10@??? (sic) England. Phone: +44 1223 334714
--
*** Exim information can be found at
http://www.exim.org/ ***