docker-mailserver: Recipient address rejected: User unknown in local recipient table
Miscellaneous first checks
- I checked that all ports are open and not blocked by my ISP / hosting provider.
- I know that SSL errors are likely the result of a wrong setup on the user side and not caused by DMS itself. I’m confident my setup is correct.
Affected Component(s)
docker mailserver compose.yaml
What happened and when does this occur?
I use the docker mailserver in Ubuntu behind a Firewall.
If I use the out of the Box Settings I cannot send E-Mails to the Mailserver with the following error:
Even with the following try it did not work:
For your compose.yaml file, remove any domainname field, only use hostname field with full FQDN.
The only way to fix it was to change the main.cf manually and change mydestination to
mydestination = localhost.$mydomain, localhost
What did you expect to happen?
That I can send E-Mails without error
How do we replicate the issue?
Use the out of the Box config
Configure Hostname and Domain at docker-compose.yaml
Run the mailserver at a local network
Forward the ports through a firewall to the outside ip
Try to send a e-mail to the mailserver.
Sending from it works out of the box.
Then change the main.cf as shown before and it will work.
DMS version
10.5.0
What operating system is DMS running on?
Linux
What instruction set architecture is DMS running on?
x86_64 / AMD64
What container orchestration tool are you using?
Docker Compose
docker-compose.yml
Non working one:
version: '3.7'
services:
mailserver:
image: docker.io/mailserver/docker-mailserver:latest
container\_name: mailserver
hostname: FQDN (external and internal reachable) # <-- CHANGE THIS
domainname: MyDomain#<-- CHANGE THIS
env\_file: mailserver.env
# More information about the mail-server ports:
# <https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-port>>
# To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
ports:
- "25:25" # SMTP (explicit TLS => STARTTLS)
- "143:143" # IMAP4 (explicit TLS => STARTTLS)
- "465:465" # ESMTP (implicit TLS)
- "587:587" # ESMTP (explicit TLS => STARTTLS)
- "993:993" # IMAP4 (implicit TLS)
volumes:
- ./data/mail-data/:/var/mail/
- ./data/mail-state/:/var/mail-state/
- ./data/dms/mail-logs/:/var/log/mail/
- ./config/:/tmp/docker-mailserver/
- /etc/localtime:/etc/localtime:ro
- /home/pgsmailadmin/etc/letsencrypt/:/etc/letsencrypt/
restart: always
stop\_grace\_period: 1m
cap\_add:
- NET\_ADMIN
- SYS\_PTRACE
Relevant log output
from external mailserver when sending to docker mailserver (anonymized):
from external mailserver when sending to docker mailserver:
Diagnoseinformationen für Administratoren:
Generierender Server: externailmailserver.anonym.com
test@dockermailserver.com
dockermailserver.com
Remote Server returned '554 5.1.1 <dockermailserver.com #5.1.1 smtp; 550 5.1.1 <externailmailserver.anonym.com>: Recipient address rejected: User unknown in local recipient table>'
Ursprüngliche Nachrichtenköpfe:
Return-Path: <externailmailserver.anonym.com>
Received: from externailmailserver.anonym.com (localhost [127.0.0.1])
by externailmailserver.anonym.com (Test e-Mail Services) with ESMTP id XXX
for <test@dockermailserver.com>; Wed, 30 Mar 2022 07:09:01 +0200 (CEST)
Received: from [127.0.0.1] (helo=externailmailserver.anonym.com)
by externailmailserver.anonym.com with ESMTP (eXpurgate 4.37.0)
(envelope-from <test@dockermailserver.com>)
id 6243e5ed-0412-7f0000012b03-7f000001e060-1
for <test@dockermailserver.com>; Wed, 30 Mar 2022 07:09:01 +0200
Received: from externailmailserver.anonym.comm (anonymail [XXX])
by externailmailserver.anonym.com (Anonym e-Mail Services) with ESMTPS
for <test@dockermailserver.com>; Wed, 30 Mar 2022 07:09:01 +0200 (CEST)
Received: from externailmailserver.anonym.comm (XXX) by
externailmailserver.anonym.comm (XXX) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.1.2375.24; Wed, 30 Mar 2022 07:09:00 +0200
Received: from externailmailserver.anonym.comm ([fe80::19d2:673b:9e97:1891]) by
externailmailserver.anonym.comm ([fe80::19d2:673b:9e97:1891%5]) with mapi id
15.01.2375.024; Wed, 30 Mar 2022 07:09:00 +0200
From: "Geschwentner, Patrick" <patrick.geschwentner@mindbreeze.com>
To: Patrick Geschwentner <test@dockermailserver.com>
Subject: AW:
Thread-Index: AQHYQ/Q992IK+l+sh0y19fhgM1F5MKzXYJ0g
Date: Wed, 30 Mar 2022 05:09:00 +0000
Message-ID: <8dfa2118822e439596c60004159a9553@mindbreeze.com>
References: <20220330050847.E6D192F901B8@mail.pgdatacenter.at>
In-Reply-To: <20220330050847.E6D192F901B8@mail.pgdatacenter.at>
Accept-Language: de-AT, en-US
Content-Language: de-DE
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [XXXX]
Content-Type: multipart/alternative;
boundary="_000_8dfa2118822e439596c60004159a9553mindbreezecom_"
MIME-Version: 1.0
X-purgate-ID: 152191::1648616941-00000412-C0CB1843/0/0
X-purgate-type: clean
X-purgate-size: 3870
X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de
X-purgate: clean
X-purgate: This mail is considered clean (visit http://www.eleven.de for further information)
Other relevant information
.
What level of experience do you have with Docker and mail servers?
- I am inexperienced with docker
- I am inexperienced with mail servers
- I am uncomfortable with the CLI
Code of conduct
- I have read this project’s Code of Conduct and I agree
- I have read the README and the documentation and I searched the issue tracker but could not find a solution
Improvements to this form?
.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (5 by maintainers)
I just simply created the user-patche.sh at the config-folder of the docker-mailserver like that:
OK I’ll use the user-patches.sh and only the hostname Thanks