0

I recently moved my postfix server on docker using the mailu image on my raspberrypi 4 (rasbian buster). I uninstalled totally postfix so as to be sure there are no remaining things that would interact with mmy docker instance. So the 25 port is now "forwarded" to the docker container. But I still need to send emails from my Pi (e.g. as an MTA for all the cron jobs) so I installed sendmail and tried to configure it to send emails through my docker mail server using a relay mechanism. Now I'm facing the problem that the relay host has the same IP as the sendmail service itself.

I always get the message: Jun 5 19:46:38 raspberrypi sm-msp-queue[30614]: 051511t6001616: to=postmaster, delay=4+12:45:32, xdelay=00:00:00, mailer=relay, pri=29916391, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

is it possible to get this working?

  • Can you contact sendmail at 127.0.0.1:587? Does telnet 127.0.0.1 587 produce SMTP greeting message? – AnFi Jun 8 at 11:27
0

I fixed the problem this way:

  1. in sendmail.mc I added the following lines:
define(`SMART_HOST',`mail.mydomain.tld')
GENERICS_DOMAIN(localhost.localdomain localhost raspberrypi)dnl
include(`/etc/mail/tls/starttls.m4')dnl
  1. in Mailu config I had to add so that mails coming from my local network are relayed in trusted mode (user not authenticated)
RELAYNETS=192.168.0.0/24 localhost.localdomain 

It works but I'm not sure this is 100% sure though...

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.