1

Topic: Moving domain to another server, mail still gets delivered locally

I recently moved a domain (@domain.com) to google apps, but will retain the mailbox archive on the iredmail server.
What's happening is that, when users from other domains on my iredmail server try to send messages to users from @domain.com, it gets delivered locally, even with the domain marked as disabled on the advanced domain config (iredmail pro)

==== Required information ====
- iRedMail version: 0.8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): ldap
- Linux/BSD distribution name and version: centos 5
- Related log if you're reporting an issue:
====

----

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

2

Re: Moving domain to another server, mail still gets delivered locally

*) If mail domain is hosted on localhost, Postfix will deliver all emails sent to this domain locally.
*) Could you please show us output of below commands? Of course you must replace "domain.com" below by the real domain name.

# cd /etc/postfix/ldap/
# for cf in $(ls *.cf); do echo ${cf}; postmap -q domain.com ldap:./${cf}; done

3

Re: Moving domain to another server, mail still gets delivered locally

I've temporarily added !domain.com to virtual_mailbox_domains on main.cf to fix the issue, output follows

catchall_maps.cf
recipient_bcc_maps_domain.cf
recipient_bcc_maps_user.cf
relay_domains.cf
sender_bcc_maps_domain.cf
sender_bcc_maps_user.cf
sender_login_maps.cf
transport_maps_domain.cf
dovecot
transport_maps_user.cf
virtual_alias_maps.cf
virtual_group_maps.cf
virtual_group_members_maps.cf
virtual_mailbox_domains.cf
domain.com
virtual_mailbox_maps.cf

4

Re: Moving domain to another server, mail still gets delivered locally

Could you please show me output of below command:

# cd /etc/postfix/ldap/
# postmap -v -q domain.com ldap:./virtual_mailbox_domains.cf

NOTE: please check output before pasting here, make sure it doesn't contain password.