Password change and mailbox deletion from shell

How can i reset password for a mailbox and delete a mailbox from shell instead of admin panel

Run tools/mail.py. When run without arguments it will give you instructions.

2 Likes

Hi Josh

when executed command " python mail.py " from mailinabox/tools, got the below

File “mail.py”, line 20
print(“The management daemon refused access. The API key file may be out of sync. Try ‘service mailinabox restart’.”
, file=sys.stderr)

  ^

SyntaxError: invalid syntax

Don’t write python. Just type tools/mail.py (run from the main Mail-in-a-Box directory).

thanks, Josh it worked

Josh
how do we remove mail folders from shell, mail.py shows that deletion of mail doesnt mean that it will delete mail folders

To delete a mailbox for bob@example.com from the filesystem, locate the folder named bob in /home/user-data/mail/mailboxes/example.com and delete it. Make sure you delete the user from MIAB first. If you need to archive mailboxes you can delete them from MIAB but leave them on the filesystem. If a mailbox exists for a user you’re creating, it will use the mailbox data, so for example employees who had once departed can have their old inbox restored.

Josh

Can we change display for an user in shell

I don’t understand the question.

Hi,

Do you mean the display name of the user? I think you cannot change them within the shell or the admin panel. You can only change them directly in your Mailclient (Outlook, Thunderbird,…) or in the Webmailer (Roundcube) :wink:

Hi Josh, can you please respond to the below

Is it possible to take a particular user mailbox backup or archived ??

can we restore the server using duplicity backup instead of encrypted backups?

The box backs up everything.

can we restore the server using duplicity backup instead of encrypted backups?

The only backup is encrypted. There isn’t any other backup to restore from.

so You say I cant backup a single mailbox?

The functionality the box offers is to backup everything.

We don’t have a way to do that, but we should fix that.