Overview
There may be a requirement to disable mailboxes without deleting the mailbox information from the database. This is particularly useful when upgrading the installation since you would want to stop pulling mail from the mailboxes. Yet, you would want to import the configuration.
Prerequisites
Direct Access to the Database.
Solution
Run the following queries against the FogBugz database:
- Save the
ixMailbox
values for later:
SELECT ixMailbox
FROM Mailbox
WHERE fDeleted = 0;Note: Save these values. If you are migrating to on-Demand, please get in touch with us send to these values. - Disable all active mailboxes:
UPDATE Mailbox
The flag
SET fEnabled = 0
WHERE fDeleted = 0;fEnabled = 0
will mark the mailbox as disabled, but will retain the configuration in case you later want to continue importing mail from those (now disabled) mailboxes.
The disabled mailboxes will appear grey on the Mailboxes page. To remove a mailbox from the list, set fDeleted = 1
. If queried via SQL, the system will still list disabled and deleted mailboxes.
<supportagent>
Note: setting fEnabled = 0
on the default cases@subdomain.fogbugz.com email address in FogBugz On Demand will not prevent incoming emails to that mailbox from creating new cases.
To stop the default email address from creating new cases, you need to set fDeleted = 1
. This will also remove the default mailbox from the list of mailboxes on the Mailboxes page.
</supportagent>
Rollback the Changes
- Re-enable all inactive mailboxes:
UPDATE Mailbox
The flag
SET fEnabled = 1
WHERE fDeleted = 0;fEnabled = 1
will mark the mailbox as enabled again.
Deleted mailboxes can also be retrieved by setting fDeleted = 0
.
Related Article
Handling Incoming Customer Email in FogBugz