How to get a complete email list
Hello
I need a complete list of email used by my users . This list should include
pop, forwarders, and also an email like this mailing-owner@domain.com[/EMAIL] .
I have seen that
cpapi2 --user=username Email listforwards
list all email forwards of an user .
and
cpapi2 --user=username Email listlists
list all email used by mailman.
But how to list all various email like this (used by mailman) using cpapi2 from console ?
BTW there is a fast way to get all email in a server, really ALL and of any type/kind ? Thank you!
mailing-admin@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman admin mailing_domain.com"
mailing-bounces@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman bounces mailing_domain.com"
mailing-confirm@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman confirm mailing_domain.com"
mailing-join@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman join mailing_domain.com"
mailing-leave@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman leave mailing_domain.com"
mailing-owner@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman owner mailing_domain.com"
mailing-request@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman request mailing_domain.com"
mailing-subscribe@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman subscribe mailing_domain.com"
mailing-unsubscribe@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman unsubscribe mailing_domain.com"
mailing@domain.com: "|/usr/local/cpanel/3rdparty/mailman/mail/mailman post mailing_domain.com"
BTW there is a fast way to get all email in a server, really ALL and of any type/kind ? Thank you!
-
Hello, I don't believe it's possible to list those entries via an API command, but you can find them listed in the following file: /etc/valiases/$domain.tld
Thank you.0 -
indeed it's not possible, hoping to have this possibility in API3 :(;) 0 -
I encourage you to open a feature request if you'd like to see an additional API function added: Submit A Feature Request Thank you. 0 -
Was searching for similar solution as well as I need to populate all my emails for a specific domain to an ldap server in order to outsource spam filtering. If you have shell/server access this works: uapi --user=account_name Email list_pops | grep email | sed 's/email://' uapi --user=account_name Email list_forwarders | grep dest | sed '/html/d' | sed '/uri/d' | sed 's/dest://' | grep '@' Replace "account_name" with the cPanel account you need to collect email addresses from. Those two commands will produce a list of all valid email accounts for the domain. The one exception is the email for the "Main Account" which is basically the account_name gets listed too (last one in the list_pops command), but it's listed without an "@" so the last "grep '@'" removes that too. This produces a list of all email and forwarders for an account that can then be further processed as needed. For mailman stuff, doesn't it basically use all the same email formats for a particular list? If you can get a list of lists, you can from that infer the email aliases it creates. You can get your lists using: uapi --user=account_name Email list_lists | grep 'list:' | sed 's/list://' Again, assuming you have shell access. 0 -
@SactoBob - Nice work. Thank you. 0
Please sign in to leave a comment.
Comments
5 comments