1) I'm using mail from Yandex for mydomain.com
DNS MX record is:
mydomain.com. 21599 IN MX 10 mx.yandex.net.
All works fine.
2) I need send notification emails directly from my server. I installed Postfix as null-client with config:
myorigin = mydomain.com myhostname = mydomain.com mydestination = #relayhost = inet_interfaces = loopback-only
When I send emails from server to another domains - all works fine, but email sended to my domain like firstname.lastname@example.org doesn't send and I got line in logs:
Feb 11 19:37:49 myhost postfix/smtp: 69BDA5AEBF: email@example.com, relay=none, delay=998, delays=998/0.02/0/0, dsn=4.4.1, status=deferred (connect to mail.mydomain.com[my.server.ip.address]:25: Connection refused)
I don't understand, why postfix trying to connect