With /usr/local/psa/admin/bin/mail_auth_view I can get all the e-mail passwords, but that still leaves me with the FTP / user and SQL-accounts....
BTW..... mail_auth_view also shows the aliases and implies that way one is able to login with an alias-account.
I tested this and that's not possible.
I therefore don't understand why it is giving these accounts.
I altered my script to handle it and am now only getting the real accounts.....
BTW..... mail_auth_view also shows the aliases and implies that way one is able to login with an alias-account.
I tested this and that's not possible.
I therefore don't understand why it is giving these accounts.
I altered my script to handle it and am now only getting the real accounts.....
Code:
.
.
.
mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -e 'select CONCAT(mail_name,"@",name) as email_address from mail left join domains on domains.id=mail.dom_id left join accounts on accounts.id=mail.account_id;' | grep "@${domein}" >${TMP2}
/usr/local/psa/admin/bin/mail_auth_view | grep "@${domein}" | awk -F\| '{print $2"\t\t"$4}' >${TMP3}
while read maillogin ; do
echo -e "\t`grep "${maillogin}" ${TMP3}`"
/usr/local/psa/bin/mail --info ${maillogin} | grep ^Alias | awk -F: '{print $2}' | egrep -o '[A-Za-z0-9-]+' | sed "s/.*/&@${domein}/g" >${TMP4}
while read ALIAS ; do
echo -e "\t\t\t\t\t\t(${ALIAS})"
done<${TMP4}
done<${TMP2}
.
.
.