esackbauer
Finally, the migration worked for me. When I set the master user and password in the configuration, it gives me an error. However, when I leave them blank, it automatically generates an account on each restart. By running cat /etc/sogo/sieve.creds, I can obtain those credentials and then synchronize using them. But when I set a master user and password in the .conf file, it doesn’t work.
`#!/bin/bash
INPUT_FILE=“user_list.txt”
Chek if user exist
if [[ ! -f “$INPUT_FILE” ]]; then
echo “the file $INPUT_FILE no exist.”
exit 1
fi
get username and passwd
output=$(cat /etc/sogo/sieve.creds)
master_user=$(echo “$output” | awk -F’:‘ ’{print $1}')
master_pwd=$(echo “$output” | awk -F’:‘ ’{print $2}')
echo “Starting sync from $INPUT_FILE…”
while IFS= read -r EMAIL; do
if [[ -z “$EMAIL” ]]; then
continue
fi
echo "Processing: $EMAIL"
/usr/local/bin/imapsync \
--tmpdir /tmp \
--nofoldersizes \
--addheader \
--delete2duplicates \
--subscribeall \
--automap \
--host1 ******* \
--user1 "$EMAIL" \
--authuser1 admin \
--password1 "*******" \
--port1 143 \
--host2 localhost \
--user2 "${EMAIL}*${master_user}" \
--password2 "${master_pwd}" \
--authmech2 LOGIN \
--nossl2 \
--notls2 \
--no-modulesversion \
--noreleasecheck \
done < “$INPUT_FILE”`
In the end, I made a script, and it ran perfectly without errors.
thanks !!