1

Topic: where is file create_mail_user_SQL.sh located?

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

I am running iRedMail v0.9.5-1 where can I find "create_mail_user_SQL.sh"??
No such tool under /root/iRedAdmin-0.6/tools

----

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

2 (edited by Cthulhu 2023-03-04 05:01:16)

Re: where is file create_mail_user_SQL.sh located?

well, maybe this file did not exist at this time yet

0.9.5-1 is very very old (May 10, 2016), why didn't you keep your installation up to date? it's nearly 7 years old

I don't even know if the script would work due to all the changes to database structure, but you can find all files in the github repo:

https://github.com/iredmail/iRedMail/bl … ser_SQL.sh

3

Re: where is file create_mail_user_SQL.sh located?

Update:

if you don't plan to keep your system up to date, you should try this instead:

https://github.com/iredmail/iRedMail/tree/1.5.1/tools

4

Re: where is file create_mail_user_SQL.sh located?

It was working just fine all those years, why change it? smile
Now I am planning to install newer iredmail version and move emails there using imapsync.

How can I change/reset the password for all accounts on current mail server?

If I have understood it correctly,
In mysql use database "vmail" and then update "password" column in "mailbox" table, right?

5 (edited by Cthulhu 2023-03-08 01:18:23)

Re: where is file create_mail_user_SQL.sh located?

you can't you need to do it one by one

but i created a script for that:

#!/usr/bin/env bash
if [ X"$#" != X'2' ]; then
    echo "Ungültige Argumente"
    echo "bash ./mailboxpw.sh user@domain.tld password"
    exit 255
fi

# Read input
mailbox="$1"
password="$2"

#Crypt Password
CRYPT_PASSWD="$(doveadm pw -s 'ssha512' -p ${password})"

cat <<EOF

UPDATE mailbox SET password = '${CRYPT_PASSWD}' WHERE username = '${mailbox,,}';

EOF