Le Tue, Jan 06, 2026 at 02:32:10PM +0100, Sidney Cadot a écrit : > Hi all, > > (Note: I used some italics text in my previous message leading to > formatting problems. Here's the same message without any text formatting.)
Hello, > First thing to note is that my current ISP closed off port 25 (both inbound > and outbound), meaning that my test server (hercules.wherewithal.nl) cannot > directly serve as an MX for my test domain (wherewithal.nl). > > To get around that, I installed a Raspberry Pi in another location (a > different ISP that doesn't block port 25 traffic). That raspberry > implements a TCP-level relay from its port 25 to port 2525 of my test > server, using the "rinetd" relay software. The MX record of my test domain > points to the Raspberry Pi. So whenever a connection is made to port 25 of > the MX of my domain, this results in an incoming TCP connection on port > 2525 on my test server. I have confirmed that this works. Note that it should be possible to set up an opensmtpd on your Raspberry Pi that relays emails to your main server too, if that’s something you would prefer. (This can be done with the relay action.) > The "mda.py" script logs info (arguments, environment, stdin) to a file. > The idea here is for me to be able to see what happens, and to learn how > opensmtpd works. > > This particular action works, at least for locally generated messages. > Crontab messages, for example, are "delivered" to my mda.py script and > logged. So far, so good. > > […] > > Now when I send an mail to my test domain using Google mail, I do see an > incoming SMTP connection and a delivery attempt. Here's the relevant part. > > Note: "hercules.wherewithal.nl" is my test server. 84.86.60.125 is the > raspberry pi that is the acting MX for the wherewithal domain. > > […] > expand: lka_expand: address: [email protected] [depth=0] > lookup: match "84.86.60.125" as netaddr in table static:<anyhost> -> true > lookup: match "wherewithal.nl" as domain in table static:<localnames> -> > false > no rule matched > […] > smtp: 0x558ea16527c0: >>> 550 Invalid recipient: <[email protected]> > 782cc2bf38e66622 smtp failed-command command="RCPT TO:<[email protected]>" > result="550 Invalid recipient: <[email protected]>" > […] > > What happens, apparently, is that the message dropoff is rejected with a > "550 Invalid recipient" response. This is unexpected for me at least, > because of my "match from any" action. The message appears to be rejected > and doesn't make it to the queue. I think what mya be happening is that your rule doesn’t specify "for […]", so the default is "for local", and wherewithal.nl is not considered to be a local name: did you try adding "for domain wherewithal.nl" or "for any"? I hope this helps.
