Sorry, me again :-)

Is there a way to tell opensmtpd to relay only using IPV4 for mta? I
googled it I found that "limit mta inet4" doesn't work and prevents
opensmtpd from starting. The manual doesn't say anything about it.

The reason is that opensmtpd tries first a bunch of IPV6 addresses
corresponding to smtp.office365.com, all failing, then finally finds an
IPV4 address that works. See below.

Thanks!

Apr  2 20:32:09 raspberrypi4GB smtpd[94911]: 043f05fd01c65762 mta
connecting address=smtp+tls://[2603:1016:401:1840::2]:587
host=2603:1016:401:1840::2
Apr  2 20:32:09 raspberrypi4GB smtpd[94911]: 043f05fd01c65762 mta error
reason=Connection failed: Network is unreachable
Apr  2 20:32:09 raspberrypi4GB smtpd[94911]: smtp-out: Disabling route []
<-> [2603:1016:401:1840::2] (2603:1016:401:1840::2) for 15s
Apr  2 20:32:11 raspberrypi4GB smtpd[94911]: 043f05fe883a0089 mta
connecting address=smtp+tls://[2603:1016:401:2003::2]:587
host=2603:1016:401:2003::2
Apr  2 20:32:11 raspberrypi4GB smtpd[94911]: 043f05fe883a0089 mta error
reason=Connection failed: Network is unreachable
Apr  2 20:32:11 raspberrypi4GB smtpd[94911]: smtp-out: Disabling route []
<-> [2603:1016:401:2003::2] (2603:1016:401:2003::2) for 15s
Apr  2 20:32:14 raspberrypi4GB smtpd[94911]: 043f05ffd86b69cd mta
connecting address=smtp+tls://[2603:1016:401:2c0a::2]:587
host=2603:1016:401:2c0a::2
Apr  2 20:32:14 raspberrypi4GB smtpd[94911]: 043f05ffd86b69cd mta error
reason=Connection failed: Network is unreachable
Apr  2 20:32:14 raspberrypi4GB smtpd[94911]: smtp-out: Disabling route []
<-> [2603:1016:401:2c0a::2] (2603:1016:401:2c0a::2) for 15s
Apr  2 20:32:15 raspberrypi4GB smtpd[94911]: 043f06004d81a9a6 mta
connecting address=smtp+tls://[2603:1016:401:1001::2]:587
host=2603:1016:401:1001::2
Apr  2 20:32:15 raspberrypi4GB smtpd[94911]: 043f06004d81a9a6 mta error
reason=Connection failed: Network is unreachable
Apr  2 20:32:15 raspberrypi4GB smtpd[94911]: smtp-out: Disabling route []
<-> [2603:1016:401:1001::2] (2603:1016:401:1001::2) for 15s
Apr  2 20:32:17 raspberrypi4GB smtpd[94911]: 043f0601fa69d671 mta
connecting address=smtp+tls://52.98.143.178:587 host=52.98.143.178
Apr  2 20:32:17 raspberrypi4GB smtpd[94911]: 043f0601fa69d671 mta connected
Apr  2 20:32:17 raspberrypi4GB smtpd[94911]: 043f0601fa69d671 mta tls
ciphers=TLSv1.3:TLS_AES_256_GCM_SHA384:256
Apr  2 20:32:17 raspberrypi4GB smtpd[94911]: 043f0601fa69d671 mta
server-cert-check result="success"


On Fri, 31 Mar 2023 at 22:16, Thomas Bohl <opensmtpd-misc-64...@aloof.de>
wrote:

> Hello,
>
> > action "relay" relay host smtp+tls://smtp.office365.com:587
> > auth <secrets>
>
> the relay-url is missing the label.
>
> man smtpd.conf
> ...
> The format for relay-url is
> [proto://[label@]]host[:port].
> ...
> The label corresponds to an entry in a credentials table,
> as documented in table(5).  It is used with the
> “smtp+tls” and “smtps” protocols for authentication.
> ...
>
> This should work:
>
> action "relay" relay host smtp+tls://msexcha...@smtp.office365.com:587
> auth <secrets>
>
> cat /etc/mail/secrets:
> msexchange ad...@mydomain.com.au:*password*
>
>
>

Reply via email to