Mail alias failure


(David Gordon) #1

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:

   host server.mydomain.tld []
   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!?

Postfix warning
Email questions - users with multiple domains
Postfix warning
(David Gordon) #2

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[]: 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[]

(David Gordon) #3

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!

(bob) #4

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


(David Gordon) #5

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 and the IP address of the NethServer. Neither worked. :frowning:

(Davide Principi) #6

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.

(David Gordon) #7

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

(Davide Principi) #8

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

(David Gordon) #9

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

(Stéphane de Labrusse) #10

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

(Davide Principi) #11

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?

(David Gordon) #12

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!