Plesk for Linux
kb: how-to
ABT: Group B
Applicable to:
- Plesk for Linux
Question
How to list all email accounts with their forwarding email addresses via a command-line interface?
Answer
-
Connect to a Plesk server via SSH.
-
Run the following command to list all email accounts that have the forwarding feature enabled:
# for i in $(plesk bin mail -l | awk '{print $NF}'); do r=$(plesk bin mail -i $i | grep "Group member(s):") && echo "$i $r"; done | grep 'Group member(s):'
In the example below, john_doe@example.com forwards emails to sales@example.com.
CONFIG_TEXT: john_doe@example.com Group member(s): sales@example.com
Comments
0 comments
Please sign in to leave a comment.