On Wed 22 Mar 2023 at 13:52:00 (-0700), pe...@easthope.ca wrote:
> 
> After configuring exim for a new smarthost, message sending fails.

What are the contents of /etc/exim4/update-exim4.conf.conf, the
configuration file?

> This might help to identify the problem.
> 
> root@dalton:/home/root# exim -bh 142.103.1m.1n

I've not used this facility before, but it seems to work:

> **** SMTP testing session as if from host 142.103.1m.1n
> **** but without any ident (RFC 1413) callback.
> **** This is not for real!
> 
> > > > host in hosts_connection_nolog? no (option unset)
> > > > host in host_lookup? yes (matched "*")
> > > > looking up host name for 142.103.1m.1n
> > > > IP address lookup yielded "dalton.invalid"
> > > > checking addresses for dalton.invalid
> > > >   142.103.1m.1n OK
> > > > host in host_reject_connection? no (option unset)
> > > > host in sender_unqualified_hosts? no (option unset)
> > > > host in recipient_unqualified_hosts? no (option unset)
> > > > host in helo_verify_hosts? no (option unset)
> > > > host in helo_try_verify_hosts? no (option unset)
> > > > host in helo_accept_junk_hosts? no (option unset)
> > > > host in pipelining_connect_advertise_hosts? yes (matched "*")
> 220 dalton.invalid ESMTP Exim 4.94.2 Wed, 22 Mar 2023 13:02:25 -0700
> 
> LOG: SMTP syntax error in "" H=dalton.invalid [142.103.1m.1n]
                            ↑↑
So there's a syntax command in the empty string, which would
be a reasonable reaction from exim.

> unrecognized command
> 500 unrecognized command
> LOG: SMTP command timeout on connection from dalton.invalid
> [142.103.1m.1n]
> 421 dalton.invalid: SMTP command timeout - closing connection
> root@dalton:/home/root#

I assumed you just stared at the screen until this timeout appeared.

From man exim:

   -bh <IP address>
      This  option runs a fake SMTP session as if from the given IP
      address, using the standard input and output. The IP address
      may include a port number at the  end, after a full stop.
      For example: 
       exim4 -bh 10.9.8.7.1234

You've now got to type something. It will then talk back to you.
Try typing (ignore my indentation):

  ehlo dalton.invalid              ← that's not a typo
  mail from: pe...@easthope.ca
  rcpt to: pe...@easthope.ca
  data
  from: pe...@easthope.ca
  to: pe...@easthope.ca
  subject: hand written test 01
                                   ← that's a blank line
  Hand written test 01
  .                                ← that's nothing but a fullstop Return
  quit

How far you get in this conversation depends what it says back.
You want to see several 250s, and a 354 after you type DATA.

> A test message produces this in /var/log/exim4/mainlog
> 
> 2023-03-22 13:39:10 1pf5Ek-0000gQ-Dk <= pe...@easthope.ca
> H=localhost.localdomain (dalton) [127.0.0.1] P=smtp S=586

Yes, that does look somewhat lacking.

> 2023-03-22 13:39:10 1pf5Ek-0000gQ-Dk == pe...@easthope.ca R=smarthost
> T=remote_smtp_smarthost defer (-53): retry time not reached for any host for
> 'easthope.ca'

Cheers,
David.

Reply via email to