Skip to content

[BUG] postfix: reject_unknown_client_hostname prevents legitimate mail from being received #2970

@mpldr

Description

@mpldr

Miscellaneous first checks

  • I checked that all ports are open and not blocked by my ISP / hosting provider.
  • I know that SSL errors are likely the result of a wrong setup on the user side and not caused by DMS itself. I'm confident my setup is correct.

Affected Component(s)

postfix

What happened and when does this occur?

mailserver  | Jan  1 12:35:19 mail postfix/smtpd[1556]: NOQUEUE: reject: RCPT from unknown[54.240.85.218]: 450 4.7.25 Client host rejected: cannot find your hostname, [54.240.85.218]; from=<010101856d1d37d3-cb9c308b-0000-0000-0000-a21593c7994e-000000@bounce.stripe.com> to=<[email protected]> proto=ESMTP helo=<a85-218.smtp-out.us-west-2.amazonses.com>

What did you expect to happen?

I expected an option to turn reject_unknown_client_hostname off, if it is not considered necessary. I can overwrite the config in the docker-compose, but that feels hacky.

How do we replicate the issue?

I have absolutely no idea. I don't think this happens for all SES mails.

DMS version

latest (Image Hash: d5db200744f1)

What operating system is DMS running on?

Linux

Which operating system version?

Archlinux

What instruction set architecture is DMS running on?

AMD64 / x86_64

What container orchestration tool are you using?

Docker Compose

docker-compose.yml

services:
  mailserver:
    image: docker.io/mailserver/docker-mailserver:latest
      #entrypoint: ["/bin/sh", "-c", "while true; do sleep 10; done"]
    container_name: mailserver
    # If the FQDN for your mail-server is only two labels (eg: example.com),
    # you can assign this entirely to `hostname` and remove `domainname`.
    hostname: mail
    domainname: moritz.sh
    env_file: mailserver.env
    network_mode: host
    # More information about the mail-server ports:
    # https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-ports/
    # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
    ports:
      - "25:25"    # SMTP  (explicit TLS => STARTTLS)
      - "143:143"  # IMAP4 (explicit TLS => STARTTLS)
      - "465:465"  # ESMTP (implicit TLS)
      - "587:587"  # ESMTP (explicit TLS => STARTTLS)
      - "993:993"  # IMAP4 (implicit TLS)
      - "4190:4190" # MANAGE SIEVE
    volumes:
      - ./docker-data/dms/mail-data/:/var/mail/
      - ./docker-data/dms/mail-state/:/var/mail-state/
      - ./docker-data/dms/mail-logs/:/var/log/mail/
      - ./config/:/tmp/docker-mailserver/
      - ./docker-data/dms/config/dovecot/fts-xapian-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro
      - /etc/localtime:/etc/localtime:ro
      - /etc/letsencrypt:/etc/letsencrypt
    restart: always
    stop_grace_period: 1m
    cap_add:
      - NET_ADMIN
    healthcheck:
      test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
      timeout: 3s
      retries: 0

Relevant log output

mailserver  | Jan  1 12:35:19 mail postfix/smtpd[1556]: NOQUEUE: reject: RCPT from unknown[54.240.85.218]: 450 4.7.25 Client host rejected: cannot find your hostname, [54.240.85.218]; from=<010101856d1d37d3-cb9c308b-0000-0000-0000-a21593c7994e-000000@bounce.stripe.com> to=<[email protected]> proto=ESMTP helo=<a85-218.smtp-out.us-west-2.amazonses.com>

Other relevant information

No response

What level of experience do you have with Docker and mail servers?

  • I am inexperienced with docker
  • I am rather experienced with docker
  • I am inexperienced with mail servers
  • I am rather experienced with mail servers
  • I am uncomfortable with the CLI
  • I am rather comfortable with the CLI

Code of conduct

Improvements to this form?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions