Skip to content

mail: Postfix notices to postmaster are silently lost #8186

Closed

Description

@stephdl

Postfix sends its own notices (classes resource and software by default) to the bare address postmaster. With myorigin = <host>.localhost this becomes postmaster@<host>.localhost, which does not resolve in any map. The notice bounces and, since it uses the null sender, it is silently discarded. Nobody is told when Postfix hits a resource or software problem.

Steps to reproduce

  • Install mail 1.8.0, bind it to a user domain (Samba AD or OpenLDAP) and add a mail domain
  • Enter the postfix container: runagent -m mail1 podman exec -ti postfix sh
  • Send a message to the bare postmaster address: printf 'Subject: test\n\ntest\n' | sendmail -f '' postmaster
  • Check the journal: journalctl --since -2min | grep status=

Expected behavior

The message is delivered to the postmaster public mailbox, like mail sent to postmaster@<mail domain>.

Actual behavior

to=<postmaster@mail.example.org.localhost>, orig_to=<postmaster>, ... dsn=5.1.1, status=bounced (... 550 5.1.1 <postmaster@mail.example.org.localhost> User doesn't exist ...)

The wildcard alias postmaster@* -> vmail+postmaster only applies to domains in the domains table. The internal .localhost domain is not listed there.

A possible fix is to map postmaster@<host>.localhost to vmail+postmaster, next to the existing inline vmail@<host>.localhost entry. Enabling bounce and 2bounce in notify_classes, or making it a setting, could also be considered.

Components

  • ns8-mail 1.8.0, latest stable release
  • Reproduced on a test system with Samba AD and OpenLDAP, same code in current main

See also

Activity

  1. self-assigned this
    on Sep 25, 2026
  2. moved this from ToDo to In Progress in NethServeron Oct 13, 2026
  3. DavidePrincipi commented on Oct 13, 2026

    @DavidePrincipi
    Member

    @stephdl moved to In Progress since NethServer/ns8-mail#313 is open. Feel free to move it back if that's not right.

  4. stephdl commented on Oct 26, 2026

    @stephdl
    Author

    QA for mail 1.9.2.dev-2

    Setup: mail bound to a user domain, with one mail domain. Update the module:

    api-cli run update-module --data '{"module_url":"ghcr.io/nethserver/mail:1.9.2.dev-2","instances":["mail1"]}'
    
    1. Bare postmaster is delivered

    Send a message like a Postfix notice, with the null sender:

    runagent -m mail1 podman exec postfix sh -c "printf 'Subject: notice test\n\nprobe\n' | sendmail -f '' postmaster"
    journalctl --since -2min | grep orig_to=.postmaster
    

    Expected: to=<vmail+postmaster@<host>.localhost>, orig_to=<postmaster>, ... status=sent (250 2.0.0 ... Saved).

    Check the message is in the postmaster public mailbox:

    runagent -m mail1 podman exec dovecot doveadm fetch -u vmail hdr.subject mailbox postmaster subject "notice test"
    
    1. Internal address is not reachable from outside

    From another host:

    curl -v smtp://<server>:25 --mail-from qa@example.org --mail-rcpt 'postmaster@<host>.localhost' -T /dev/null
    

    Expected: 554 5.7.1 <postmaster@<host>.localhost>: Recipient address rejected: access denied.

  5. moved this from In Progress to Testing in NethServeron Oct 26, 2026
  6. added
    testingPackages are available from testing repositories
    on Oct 26, 2026
  7. removed their assignment
    on Oct 26, 2026
  8. DavidePrincipi commented on Nov 2, 2026

    @DavidePrincipi
    Member

    Test case 1 & 2 VERIFIED

  9. removed
    testingPackages are available from testing repositories
    on Nov 2, 2026
  10. moved this from Testing to Verified in NethServeron Nov 2, 2026
  11. DavidePrincipi commented on Nov 2, 2026

    @DavidePrincipi
    Member
  12. moved this from Verified to Done in NethServeron Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    verifiedAll test cases were verified successfully

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions