1

Topic: Accept Mail for Both Hostname and Domain

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====

- iRedMail version (check /etc/iredmail-release):   1.3.2 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer?  Downloadable
- Linux/BSD distribution name and version:  Ubuntu 20.04.2 LTS
- Store mail accounts in which backend:  10.3.25-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04
- Web server (Apache or Nginx):   nginx/1.18.0 (Ubuntu)
- Manage mail accounts with iRedAdmin-Pro?  No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.

Feb 17 01:36:55 mail postfix/smtpd[246609]: NOQUEUE: reject: RCPT from mail-ej1-f49.google.com[209.85.218.49]: 550 5.1.1 <user@hostname.example.com>: Recipient address rejected: User unknown; from=<user@gmail.com> to=<user@hostname.example.com> proto=ESMTP helo=<mail-ej1-f49.google.com>

====

I apologize upfront; I am very certain this has been asked (probably many times), and I'm confident the solution is out there - but I'm having trouble finding the answer.

Mail flow is fine: the server accepts mail for its domain (e.g., example.com). 

However, the server won't accept mail for itself (i.e., at its hostname, e.g., mymailserver.example.com).   The hostname is specified in /etc/postfix/main.cf as a destination:

mydestination = $myhostname, localhost, localhost.localdomain

I feel like I'm missing something very obvious here.

Thank you for your patience.

2

Re: Accept Mail for Both Hostname and Domain

This would be very useful for me too, but I wasn't able to get it working.

I have a main server that sends/receive all mail, and a backup server with lower priority that sends/receives mail only if main server is not available.

I'd like to make antispam and other tuning on the backup server, and to send mail directly to backup mail from outside to test changes.
If anyone can help.

3

Re: Accept Mail for Both Hostname and Domain

For email sent to "<user>@<HOSTNAME>", the <user> must be a system account on server, OR, it's defined in /etc/postfix/aliases for forwarding.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee