Re: [exim] No MAIL verb before RCPT

Página Inicial
Delete this message
Reply to this message
Autor: Mike Brudenell
Data:  
Para: Exim Users
Assunto: Re: [exim] No MAIL verb before RCPT
Hi, Phillip -

On 13 February 2017 at 17:44, Phillip Carroll <
postmaster@???> wrote:

> Some questions:
> Should my mta deny RCPT from any host that did not send a MAIL verb? Is
> that sequence even permitted by RFC? Even if not RFC-permitted, is it
> fairly common practice (other than by bad actors)? Should I repeat all the
> MAIL tests in the RCPT ACL, or simply move all the tests to the RCPT ACL?
> It appears that the sample conf file avoids this issue by having no MAIL
> time checking at all. However, checking at MAIL time avoids redundant
> conversations with DNS and ZEN in the case of multiple recipients. Seemed
> to me the logical place for it.
>


Have you tried using Telnet to connect to port 25 on your mail server and
seeing whether it accepts a RCPT TO without a previous MAIL FROM? I ask
because I've just done that here with my test server and Exim rejects the
RCPT TO, complaining no sender has been given yet:

% telnet tmailgw 25
Trying 144.32.129.129...
Connected to tmailgw.york.ac.uk.
Escape character is '^]'.
220 tmailgw.york.ac.uk ESMTP Exim 4.86_2 Ubuntu Mon, 13 Feb 2017 17:57:05
+0000
helo testmachine
250 tmailgw.york.ac.uk Hello tardis.york.ac.uk [144.32.226.226]
rcpt to: test@???
503 sender not yet given


I've not put any special tests tests into Exim's configuration file to
implement this, so believe it to be Exim's standard behaviour. If your
server is permitting it then you might have accidentally/deliberately put
something into your configuration to cause it.

As for the RFC, you can find RFC 5321 Simple Mail Transfer Protocol at

https://tools.ietf.org/html/rfc5321


Section *3.3 Mail Transactions* states:

If a RCPT command appears without a previous MAIL command, the server MUST
return a 503 "Bad sequence of commands" response.


To debug you might want to run up a test server and run Exim in daemon mode
with debugging options turned on. For example, to go mad and turn
everything on:

exim -v -d+all -bd


(I'm sure you can select fewer options to the "-d" option if you wish!)

Then fake up an SMTP session to that server to mimic the problem you're
seeing, and after entering each SMTP command look through the debugging
output to trace through what tests and actions your configuration file is
causing.

Cheers,
Mike B-)

--
Systems Administrator & Change Manager
IT Services, University of York, Heslington, York YO10 5DD, UK
Tel: +44-(0)1904-323811

Web: www.york.ac.uk/it-services
Disclaimer: www.york.ac.uk/docs/disclaimer/email.htm