Indeed, I totally overlooked this. Oddly, I tried it before and my container did start without any warning that the port was already in use.
After some testing using nmap
in the container I figured out I could use the IP address of docker0
to send mail (Note: you can also use the private IP of the host but for this you first need to add this IP to the inet_interfaces
in main.cf
- but it doesn’t make any difference)
Anyway I can now send test mails from my Nextcloud instance.
However: when sharing a file or adding a note I got the following error in mail.log
:
Apr 8 15:47:28 postfix/smtpd[3227107]: connect from unknown[172.24.0.3]
Apr 8 15:47:28 postfix/smtpd[3227107]: 24BACFD9B4: client=unknown[172.24.0.3]
Apr 8 15:47:28 postfix/cleanup[3227111]: 24BACFD9B4: message-id=<32ced750fc384e5a246175adf17184dc@my.cloud>
Apr 8 15:47:28 postfix/qmgr[3227061]: 24BACFD9B4: from=<my.cloud@yahoo.com>, size=20673, nrcpt=1 (queue active)
Apr 8 15:47:28 postfix/smtpd[3227107]: disconnect from unknown[172.24.0.3] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr 8 15:47:30 postfix/smtp[3227112]: 24BACFD9B4: to=<recipient@gmail.com>, relay=smtp.mail.yahoo.com[74.6.228.44]:587, delay=2.2, delays=0.01/0.02/1.9/0.32, dsn=5.0.0, status=bounced (host smtp.mail.yahoo.com[74.6.228.44] said: 550 Request failed; Mailbox unavailable (in reply to end of DATA command))
Apr 8 15:47:30 postfix/cleanup[3227111]: 5DFB9FD9B6: message-id=<20220408134730.5DFB9FD9B6@.mynet.oraclevcn.com>
Apr 8 15:47:30 postfix/bounce[3227113]: 24BACFD9B4: sender non-delivery notification: 5DFB9FD9B6
Apr 8 15:47:30 postfix/qmgr[3227061]: 5DFB9FD9B6: from=<my.cloud@yahoo.com>, size=22894, nrcpt=1 (queue active)
Apr 8 15:47:30 postfix/qmgr[3227061]: 24BACFD9B4: removed
(FYI: 172.24.0.3 is the IP of the nextcloud container)
This is very similar to the error I got last year using the same mail provider (yahoo) but using SMTP directly to yahoo.
It does seems strange to my as an 550 error means that the mailbox of the recipient does not exist, but this is not the case here obviously. How can I solve this, or should I create a separate post for this?