Skip to content

[FR] Send-only domains #2813

@Giotino

Description

@Giotino

Feature Request

There is a problem delivering emails to the correct mailserver when the domain exists in the sending mailserver.

Context

If a domain exists in a mailserver, the server becomes its "final destination", catching all the emails for that domain and not relaying them (if needed).

Is your Feature Request related to a Problem?

The fact that every domain ends up in the virtual_mailbox_domains list (https://www.postfix.org/postconf.5.html#virtual_mailbox_domains) create problems in the following case:

I have my domain example.org with all the mailboxes on mailserver1. I also use mailserver2 only to send emails (like from [email protected]).

The problem is that when I send an email from [email protected] to [email protected] using mailserver2 it fails becase mailserver2 can't find user.

Describe the Solution you'd like

There should be a way to prevent domains to be in the virtual_mailbox_domains list, marking them as send-only (as they wouldn't be able to receive any emails).

Are you going to implement it?

Yes, I already have.

Giotino@b651e3e

I created a new configuration file sendonly-domains.cf with the list of domains that shouldn't be in the virtual_mailbox_domains list.

What are you going to contribute??

In addition to the code in the commit, I can add the option to add send-only domains to the setup.sh and then open a PR.

Additional context

Alternatives you've considered

I tried to set a relay for the domain to the mailserver with the mailboxes, but it's ignored.

An easy solution would be disabling the spoofing protection and using a mailbox with an "invalid" domain to send, but it will create a security problem where the user can send emails from any address.

Who will that Feature be useful to?

See the case described before.

What have you done already?

Implemented it.

Drawbacks of the implementation

I don't know if it's really a drawback, but I think it should be taken in consideration.

Non-delivery notifications (for example if the destination address doesn't exists) are delivered to the mailserver specified in the MX record of the domain.

Email aliases and dkim signature seems to not be applied to the mailserver generated notifications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    meta/closed due to age or inactivityThis issue / PR has been closed due to inactivitymeta/needs triageThis issue / PR needs checks and verification from maintainersmeta/staleThis issue / PR has become stale and will be closed if there is no further activitypriority/low

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions