Mail alias failure

I have incoming email addressed to user@server.mydomain.tld which I want delivered to the user’s email user@mydomain.tld.

I set up a mail alias but incoming mail is rejected:

 user@server.mydomain.tld
   host server.mydomain.tld [12.34.56.78]
   SMTP error from remote mail server after RCPT TO:<user@server.mydomain.tld>:
   554 5.7.1 <user@server.mydomain.tld>: Recipient address rejected:
   Access denied
Reporting-MTA: dns; another.server.tld

Action: failed
Final-Recipient: rfc822;user@server.mydomain.tld
Status: 5.0.0
Remote-MTA: dns; server.mydomain.tld
Diagnostic-Code: smtp; 554 5.7.1 <<user@server.mydomain.tld>>: Recipient address rejected: Access denied

How can I fix things to receive email!?

I still have this problem, who can help. I even have a new installation of NethServer.

Here’s an entry from my maillog

Jun 24 01:44:30 server postfix/smtpd[11725]: NOQUEUE: reject: RCPT from another.server.tld[12.34.56.78]: 554 5.7.1 david@server.mydomain.tld: Recipient address rejected: Access denied; from=SRS0=YuI8nz=JK=yetanotherdomain.tld=mail@mydomain.tld to=david@server.mydomain.tld proto=ESMTP helo=<anotherserver.tld>
Jun 24 01:44:30 server postfix/smtpd[11725]: disconnect from anotherserver.tld[12.34.56.78]

I seem to be able to send an email to david@server.mydomain.tld from root when using RoundCube. The email is delivered as expected to david@mydomain.tld. So the alias I set up works ‘internally’. But it still does not work when I send from outside my NethServer. Then it is still rejected as in the post above.

I need this to work otherwise I’ll have to give up on NethServer!

Hello,
I don’t know if this will work, but have you tried creating a SERVER alias (not an email alias) for your nethserver?

On the interface, go to DNS then Server alias
Enter your “server.mydomain.tld” in the Hostname box
Click apply

Regards
bob

No, sorry but thanks, that didn’t do it. I didn’t have any DNS entries so I added them including an alias. I also tried changing the DNS servers in Network to 127.0.0.1 and the IP address of the NethServer. Neither worked. :frowning:

If that corresponds to the server FQDN I’m afraid it can’t work… Maybe the server manager should forbid to create such mail domain :thinking:

The server FQDN is an internal mail domain that serves the root account and /etc/aliases DB. It’s the predefined Postfix domain from upstream config. This special treatment makes it hard to override its behavior without breaking something else.

1 Like

I’m seeing this warning in my mail log

Jun 24 01:44:30 server postfix/trivial-rewrite[11730]: warning: do not list domain server.mydomain.tld in BOTH mydestination and virtual_alias_domains

Maybe it will help with another problem where mail is rejected. But I don’t know if this warning is because of a setting I have changed or… a bug? What does it mean or refer to?

I am still having trouble with email being rejected when sending to an alias - i have another thread Mail alias failure

This Postfix warning confirms that Server Manager must forbid the creation of a mail domain named like the server FQDN

To be reviewed by @dev_team NethServer 7 · GitHub

4 Likes

Okay, thank you, I now have things running as I want. I think I understand!

I can reproduce

Even if I create a mail alias and a domain in mail tabs, I cannot have a mail domain named like the FQDN server

Hi @DavidG, while trying to implement a solution for this issue I noticed a strange behavior that probably originates from our Postfix configuration. I wrote it down here.

Could you check another workaround?

  1. Allow the domain server.mydomain.tld (which corresponds to the Server name - aka FQDN) to receive messages from other MTAs:
    config setprop postfix SystemUserRecipientStatus enabled
    signal-event nethserver-mail-server-save
  2. Create a dummy domain example.relay.tld and set delivery type to “Relay to another server”

Does it solve the original problem?

Thanks @davidep, unfortunately I have had to take my server off line while I work out some hardware issues - or work out how to keep the clock correct!

1 Like