1

Topic: error "Sender address rejected: User unknown in virtual mailbox table"

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? NO
- Related log if you're reporting an issue:
====

Hello Support,
I'm trying to migrate a domain from an old mail server to iredmail.
I have set up a new server based on iredmail and then I will migrate all the email accounts from the old server.
During the migration I need the new server to accept all the emails coming from the old server, even if the sender address is not yet present in the new server.

Example:
I have domain1.org configured both in the OLD (mail1) and in the NEW (mail2) server.
I've configured domain2.org as an alias domain only in the NEW (mail2) server, so that messages sent to user@domain2.org go in the user@domain1.org mailbox.
When I start the migration for "user1@domain1.org" I create the account on the new server, then set up an alias on the old mail server so that email are forwarded to user1@domain1.org AND to the new user1@domain2.org (that is the same mailbox as user1@domain1.org on the NEW server.

Right now, the new server rejects emails going to user1@domain2.org coming from user2@domain1.org (that it's not present yet on the new server, as it haven't already been migrated) with the error message:

host mail2.domain1.org [192.168.0.2] said: 550 5.1.0 <user2@domain1.org>: Sender address rejected: User unknown in virtual mailbox table (in reply to RCPT TO command)

What I need is that the NEW server accepts all the emails coming from the old one (mail1, 192.168.0.1) when the sender is in the domain @domain1.org

It should basically bypass the checks for the existence of the user (virtual_alias_maps ?), but only for emails are coming from the old server (a specific IP), AND whose sender is a @domain1.org address (an address that has not been created yet on the new server).

(Am I doing it wrong? Is there a easier way to migrate users?)

Thanks, any help is greatly appreciated.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: error "Sender address rejected: User unknown in virtual mailbox table"

If mail domain is hosted locally, Postfix will verify whether sender/recipient under same domain exists locally. If not, it rejects the mail with error like 'Sender address rejected: User unknown in virtual mailbox table'.

*) How about create mail accounts on new server to avoid this error?
*) Or, alternatively, in /etc/postfix/main.cf, comment out 'smtpd_reject_unlisted_recipient=yes' and 'smtpd_reject_unlisted_sender=yes', remove 'reject_unlisted_recipient' and 'reject_unlisted_sender'. then restart Postfix. This is NOT recommended, and you'd better enable them after testing.