1

Topic: [bug] Mails to disabled domains should not only be handled locally

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? downloaded
- Linux/BSD distribution name and version: debian 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): pgsql
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? pro
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

i am currently migrating users to the mailserver. so i create all user domains and users on the new mailserver but disable them.
after i sent the users the info about the new mailserver i switch enable the domain on the new server and change the dns mx record.
the problem is, even if i disable the domain on the new server, my mail to the user gets handled by the new server which results in a "user unknown"

to mail users from the old server which are already created on the new server (but disabled) i need to:

- delete the already created domain on the new server
- send from a different mailserver/domain


to make it short: if a domain is disabled is should also be disabled for local delivery and the mx record for the domain should be queried for the correct mailserver to deliver to.

----

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

2

Re: [bug] Mails to disabled domains should not only be handled locally

c33s wrote:

to make it short: if a domain is disabled is should also be disabled for local delivery and the mx record for the domain should be queried for the correct mailserver to deliver to.

This is default behaviour.

3

Re: [bug] Mails to disabled domains should not only be handled locally

not for me. i haven't changed any mailer specifc config and i have the behavior mentioned above. just happend before i opened this thread.

domain is disabled -> mail to a user from this domain -> getting  Undelivered Mail Returned to Sender "user unknown"  back from the new server.

4

Re: [bug] Mails to disabled domains should not only be handled locally

- How did you disable a domain on new server?
- How did you send testing email and get "user unknown" error?
- Could you please send one more testing email, and show us relevant Postfix log of this email? We need full log related to this email for troubleshooting.
- Please run commands below on your new server and show us full output on console (Note: replace "user@domain.com" by the real email address, and the domain name must be the disabled one):

cd /etc/postfix/pgsql/
for cf in $(ls); do echo $cf; postmap -q 'user@domain.com' pgsql:./$cf; done