Undelivered Mail Returned to Sender with .local domain

Good evening
can no longer send the email via the smarthost. Receive the following error message

his is the mail system at host nethserver.domain.local.

I’m sorry to have to inform you that your message could not
be delivered to one or more recipients. It’s attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<abc@me.com>: host smtp.abc.net[67.45.256.209] said: 554 5.1.8
<info@domain.local>: Sender address rejected: Domain not found (in reply to
RCPT TO command)

Yes because you are exit with a domain.local and if the recipient server verify the address, your address it’s invalid.

1 Like

Thanks for your help, so what am I supposed to do … Sogo sending works.

But why are you sending with a .local domain?

Have the server with nethserver.domain.local installed.

Yes, but you can add a second email domain and change identity of user to exit with another domain.

Hello, I have already done that, domaine .it. Where can I change the identity of the user for the external domain to appear?

Please have a look to this post. I think it can be a solution.

So I should put it this way?

# Manual changes will be lost when this file is regenerated.                                                                                  
#                                                                                                                                             
# Please read the developer's guide, which is available                                                                                       
# at NethServer official site: https://www.nethserver.org                                                                                     
#                                                                                                                                             
#                                                                                                                                             
#                                                                                                                                             
# 10root_map                                                                                                                                  
#                                                                                                                                             
root info@domain.it                                                                                                                           
user@domain.it.ext
user ispdomain.ext

You have to modify the file /etc/postfix/canonical by adding at the end of the file this line:

user@domain.local user@yourdomain.ext

Replace user and yourdomain/ispdomain with real values.
Then launch command postmap /etc/postfix/canonical and check that it doesn’t return errors.
If yes restart postfix with systemctl restart postfix

Use real name instead of domain.local and yourdomain.ext

1 Like

is this correct?

# ================= DO NOT MODIFY THIS FILE =================                                                                                 
#                                                                                                                                             
# Manual changes will be lost when this file is regenerated.                                                                                  
#                                                                                                                                             
# Please read the developer's guide, which is available                                                                                       
# at NethServer official site: https://www.nethserver.org                                                                                     
# 10root_map                                                                                                                                  
#                                                                                                                                             
root info@linux.it                                                                                                                           
gottfried@linux.it              gottfried@ispdomain.ext

No. You are modifying an incorrect file.

1 Like

Dear Ballarini,
Gentile Signore Ballarini,

adesso ho capito… Grazie ti tutto!!

I understood it now and changed it.

it works…
Thanks alot

1 Like

Please mark this topic as solved

I’ve changed the solution mark to the post containing the most correct answer, so others can find the solution faster.

Best ist if you make a file in custom template, 70_canonical
mkdir -p /etc/e-smith/templates-custom/etc/postfix/generic
nano /etc/e-smith/templates-custom/etc/postfix/generic/70_canonical
in that file put only
@domain.local @domain.com

It works
than
expand-template /etc/postfix/canonical
than
signal-event nethserver-mail-server-update

And it works

But if i want to send a mail to an external E-Mail address with the same domain , that is not configuried in Nethserver7, than i have a problem, and not working, maybe somebody have a tip?

THX