Mailing List Archive

Newbie Brain Failure - or - A bug ?????
Hi,

First off, sorry for such a long first message!

However, being new to Exim 4.04 (I'm still evaluating it), I tried to create
a router than simply bounced a message back to everyone who sent to a
specific domain. In case you are wondering, I do have a valid reason for
doing it!

So, based on the examples in the manual, I created a router as follows:

route_foo_net:
driver = redirect
allow_filter = true
user = exim
domains = foo.net
file = /etc/mail/exim/foo.filter
reply_transport = remote_smtp_reply

Which uses the following transport:

remote_smtp_reply:
driver = smtp
port = 25
hosts = foo.co.uk

The foo.filter file contains:

#Exim filter

mail
to "$sender_address"
from "postmaster@foo.net"
text "Thank you for the message"
subject "Re: Your Message"

All well and good I thought - BUT - I whenever I send to "foo.net", I get
the following error message from my (real) SendMail SMTP host:

This message was created automatically by mail delivery software (Exim).

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

mail to tony.sheen@wcom.co.uk
generated by tonys@foo.net
SMTP error from remote mailer after RCPT TO:<>tony.sheen@wcom.ie>:
host vardar.wcom.co.uk [170.127.79.101]: 553 5.0.0
<>tony.sheen@wcom.co.uk>... Unbalanced '>'

------ This is a copy of the message, including all the headers. ------

Return-path: <tony.sheen@wcom.co.uk>
Received: from leste ([170.127.79.97] helo=soo.com)
by leste with smtp (Exim 4.04)
id 17AcMc-00074C-00
for tonys@foo.net; Wed, 22 May 2002 21:06:04 +0100
Subject: Test 21
From: tony.sheen@wcom.co.uk
To: tonys@foo.net
Message-Id: <E17AcMc-00074C-00@leste>
Date: Wed, 22 May 2002 21:06:04 +0100

test 21

<END>

The same extra '>' character appears in the debug trace from Exim itself
(see below) and there is no sign of "postmaster@foo.net" MAIL FROM address !

So what am doing wrong??? Or is it a bug ? :-(


--<snip>--
>>>>>>>>>>>>>>>>>> Local deliveries >>>>>>>>>>>>>>>>>>
--------> >tony.sheen@wcom.co.uk <--------
locking /var/spool/mqueue/exim/db/retry.lockfile
locked /var/spool/mqueue/exim/db/retry.lockfile
opened hints database /var/spool/mqueue/exim/db/retry: flags=0
dbfn_read: key=T:>tony.sheen@wcom.co.uk:tonys@foo.net
no retry record exists
search_tidyup called
changed uid/gid: local delivery to >tony.sheen@wcom.co.uk
<>tony.sheen@wcom.co.uk> transport=remote_smtp_reply
uid=5009 gid=520
auxiliary group list: <none>
home=NULL current=/
set_process_info: 27285 delivering 17AcMc-00074C-00 to
>tony.sheen@wcom.co.uk using remote_smtp_reply
remote_smtp_reply transport entered
>tony.sheen@wcom.co.uk
using the transport's hosts: vardar.wcom.co.uk
getting address for vardar.wcom.co.uk
DNS lookup of vardar.wcom.co.uk (A) succeeded
fully qualified name = vardar.wcom.co.uk
vardar.wcom.co.uk 170.127.79.101 mx=-1 sort=-32
foo.net in queue_smtp_domains? no (option unset)
checking status of vardar.wcom.co.uk
locking /var/spool/mqueue/exim/db/retry.lockfile
locked /var/spool/mqueue/exim/db/retry.lockfile
opened hints database /var/spool/mqueue/exim/db/retry: flags=0
dbfn_read: key=T:vardar.wcom.co.uk:170.127.79.101
dbfn_read: key=T:vardar.wcom.co.uk:170.127.79.101:17AcMc-00074C-00
no host retry record
no message retry record
vardar.wcom.co.uk [170.127.79.101] status = usable
170.127.79.101 in serialize_hosts? no (option unset)
delivering 17AcMc-00074C-00 to vardar.wcom.co.uk [170.127.79.101]
(>tony.sheen@wcom.co.uk)
set_process_info: 27285 delivering 17AcMc-00074C-00 to vardar.wcom.co.uk
[170.127.79.101] (>tony.sheen@wcom.co.uk)
Connecting to vardar.wcom.co.uk [170.127.79.101]:25 ... connected
read response data: size=76
SMTP<< 220 Ready. ESMTP waiting for mail on Wed, 22 May 2002 21:06:03
+0100 (BST)
SMTP>> EHLO leste
read response data: size=190
SMTP<< 250-vardar.wcom.co.uk Hello leste [170.127.79.97], pleased to meet
you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 50000000
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
170.127.79.101 in hosts_require_auth? no (option unset)
SMTP>> MAIL FROM:<tony.sheen@wcom.co.uk>
read response data: size=45
SMTP<< 250 2.1.0 <tony.sheen@wcom.co.uk>... Sender ok
SMTP>> RCPT TO:<>tony.sheen@wcom.co.uk>
read response data: size=51
SMTP<< 553 5.0.0 <>tony.sheen@wcom.co.uk>... Unbalanced '>'
ok=1 send_quit=1 send_rset=1 continue_more=0 yield=0 first_address=0
transport_check_waiting entered
sequence=1 local_max=500 global_max=-1
locking /var/spool/mqueue/exim/db/wait-remote_smtp_reply.lockfile
locked /var/spool/mqueue/exim/db/wait-remote_smtp_reply.lockfile
opened hints database /var/spool/mqueue/exim/db/wait-remote_smtp_reply:
flags=102
dbfn_read: key=vardar.wcom.co.uk
no messages waiting for vardar.wcom.co.uk
SMTP>> QUIT
set_process_info: 27285 delivering 17AcMc-00074C-00: just tried
vardar.wcom.co.uk [170.127.79.101] for >tony.sheen@wcom.co.uk: result OK
Leaving remote_smtp_reply transport
search_tidyup called
remote_smtp_reply transport returned FAIL for >tony.sheen@wcom.co.uk
post-process >tony.sheen@wcom.co.uk (7)
LOG: MAIN
** >tony.sheen@wcom.co.uk <tonys@foo.net> R=route_mki_net
T=remote_smtp_reply: SMTP error from remote mailer after RCPT
TO:<>tony.sheen@wcom.co.uk>: host vardar.wcom.co.uk [170.127.79.101]: 553
5.0.0 <>tony.sheen@wcom.co.uk>... Unbalanced '>'

--<snip>--

Tony Sheen
WorldCom International PostMaster
Messaging Team Leader
Re: Newbie Brain Failure - or - A bug ????? [ In reply to ]
On Wed, 22 May 2002, Sheen, Tony wrote:

> However, being new to Exim 4.04 (I'm still evaluating it), I tried to create
> a router than simply bounced a message back to everyone who sent to a
> specific domain. In case you are wondering, I do have a valid reason for
> doing it!
>
> So, based on the examples in the manual, I created a router as follows:
>
> route_foo_net:
> driver = redirect
> allow_filter = true
> user = exim
> domains = foo.net
> file = /etc/mail/exim/foo.filter
> reply_transport = remote_smtp_reply

A shorter router would be as follows:

route_foo_net:
driver = redirect
domains = foo.net
allow_fail
data = :fail: Your message here...

No need for a transport. But you can do it your way if you want to
customize the message some more. Except...

> Which uses the following transport:
>
> remote_smtp_reply:
> driver = smtp
> port = 25
> hosts = foo.co.uk

This won't work. A setting of "reply_transport" on the redirect router
is expected to point to an "autoreply" transport to send the bounce
message. Sending it to an smtp transport will cause something weird to
happen. (And anyway, you wouldn't always want to send it to foo.co.uk,
would you?)

> The same extra '>' character appears in the debug trace from Exim itself
> (see below) and there is no sign of "postmaster@foo.net" MAIL FROM address !

Indeed. Exim uses a leading '>' to indicate a "delivery" that really is
sending a new message. This will confuse anything but an autoreply
transport.

> So what am doing wrong??? Or is it a bug ? :-(

Maybe a bug in the documentation. You are not the first to make this
mistake. I'll see if I can improve the wording sometime.

> >>>>>>>>>>>>>>>>>> Local deliveries >>>>>>>>>>>>>>>>>>
> --------> >tony.sheen@wcom.co.uk <--------
> locking /var/spool/mqueue/exim/db/retry.lockfile
> locked /var/spool/mqueue/exim/db/retry.lockfile

On the other hand, you get brownie points for doing the right thing by
running a debugging test and posting the relevant output. :-)

--
Philip Hazel University of Cambridge Computing Service,
ph10@cus.cam.ac.uk Cambridge, England. Phone: +44 1223 334714.
RE: Newbie Brain Failure - or - A bug ????? [ In reply to ]
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
On Thu, 23 May 2002, the responder wrote:
>On Wed, 22 May 2002, Sheen, Tony wrote:

>> However, being new to Exim 4.04 (I'm still evaluating it), I tried to
create
>> a router than simply bounced a message back to everyone who sent to a
>> specific domain. In case you are wondering, I do have a valid reason for
>> doing it!
>>
>> So, based on the examples in the manual, I created a router as follows:
>>
>> route_foo_net:
>> driver = redirect
>> allow_filter = true
>> user = exim
>> domains = foo.net
>> file = /etc/mail/exim/foo.filter
>> reply_transport = remote_smtp_reply
>
>A shorter router would be as follows:
>
> route_foo_net:
> driver = redirect
> domains = foo.net
> allow_fail
> data = :fail: Your message here...

I need the original message to pass, hence the way I was doing it.

>No need for a transport. But you can do it your way if you want to
>customize the message some more. Except...
>
> Which uses the following transport:
>
> remote_smtp_reply:
> driver = smtp
> port = 25
> hosts = foo.co.uk
>
>This won't work. A setting of "reply_transport" on the redirect router
>is expected to point to an "autoreply" transport to send the bounce
>message. Sending it to an smtp transport will cause something weird to
>happen. (And anyway, you wouldn't always want to send it to foo.co.uk,
>would you?)

Thanks! Works a treat now.

>> The same extra '>' character appears in the debug trace from Exim itself
>> (see below) and there is no sign of "postmaster@foo.net" MAIL FROM
address !
>
>Indeed. Exim uses a leading '>' to indicate a "delivery" that really is
>sending a new message. This will confuse anything but an autoreply
>transport.

I understand now.

>> So what am doing wrong??? Or is it a bug ? :-(
>
>Maybe a bug in the documentation. You are not the first to make this
>mistake. I'll see if I can improve the wording sometime.

That would be nice. I suspect most of my problems are due to being
unfamiliar
with Exim (but I'm learning fast).

>> >>>>>>>>>>>>>>>>>> Local deliveries >>>>>>>>>>>>>>>>>>
>> --------> >tony.sheen@wcom.co.uk <--------
>> locking /var/spool/mqueue/exim/db/retry.lockfile
>> locked /var/spool/mqueue/exim/db/retry.lockfile
>
>On the other hand, you get brownie points for doing the right thing by
>running a debugging test and posting the relevant output. :-)

I'll add them to my collection! I used to work in tech support and I have
seen far too many messages that had no supporting information, irrelevant
info, wrong info or far too much information (etc)!

Thanks for a very powerful tool !!! See you on the course in June...

Tony Sheen
--