You are not logged in.

#1 2023-03-22 00:09:11

gi1242
Member
Registered: 2022-07-07
Posts: 24

[SOLVED] Bypass postfix delay for mail originating from containers

Hi All,

I'm running a few docker containers that need to send email. I'm running postfix on my host. I notice when I try and send mail (using `sendmail`) on the host, then it sends instantly. But when I try to `sendmail` from one of the containers, it takes about 7 seconds.

I suspect there is a delay somewhere in postfix that tells it to wait (probably to fight spam).

Is it possible for me to tell postfix to bypass this delay *only* for mail originating from the containers? All containers have IP addresses in the 172.0.0.x subnet. I've added that to `mynetworks`, and postfix happily accepts relay mail from them, but with a delay.

Any help would be appreciated.

GI

Last edited by gi1242 (2023-03-22 17:06:59)

Offline

#2 2023-03-22 02:33:07

gi1242
Member
Registered: 2022-07-07
Posts: 24

Re: [SOLVED] Bypass postfix delay for mail originating from containers

OK, I found the problem. It's the host doing an nslookup on the guest (with IP 172.17.0.x).

I added a few of these to my /etc/hosts file, and everything is fast now. I wonder if there's a better way?

Offline

Board footer

Powered by FluxBB