JojiiOfficial / Matrix-EmailBridge

A bridge written in Golang to receive and write emails in matrix
BSD 2-Clause "Simplified" License
122 stars 14 forks source link

Command to remove email account from database #24

Closed bpcurse closed 4 years ago

bpcurse commented 4 years ago

After issueing the !help command, it seems there is no way to delete a an already configured account.

I have experimented with the Bridge in a test room and wanted to setup the same account in another live room. As Matrix-EmailBridge does not let you setup the same account in two rooms, the only way would be to delete it in the other room.

Is there a workaround for the moment?

JojiiOfficial commented 4 years ago

Yes you are right, currently there is no way to remove an account from database inside the matrix rooms. The only way to do this right now without deleting the room would be to remove the row(s) in the Database manually. The table for the SMTP acconuts is smtpAccounts and for IMAP imapAccounts.

First get the ID of your account(s) and replace the ID in the rooms table with -1. After that remove the row in the table smtpAccounts and imapAccounts. This is a bit tricky but if you delete the right rows it will work. Afterwards restart the bridge.

I'll add a !logout command in the next few days.

bpcurse commented 4 years ago

Thank you for the quick command addition and this very helpful email bridge. Great work!