Extract senders and receivers email addresses from my server

psytanium

Well-Known Member
Jun 6, 2014
297
16
68
Lebanon
cPanel Access Level
Root Administrator
Hi,

Is it possible to extract any email address used in my VPS server, senders and recipients ?

This way maybe I can create a list of emails to use for my marketing campaigns created with Mailchimp.

Thanks :)
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,273
313
Houston
Hi,

Is it possible to extract any email address used in my VPS server, senders and recipients ?

This way maybe I can create a list of emails to use for my marketing campaigns created with Mailchimp.

Thanks :)
You would most likely want to query the exim logs for this data I used the following successfully:

Code:
grep -i -o '[A-Z0-9._%+-]\[email protected][A-Z0-9.-]\+\.[A-Z]\{2,4\}' /var/log/exim_mainlog
 

psytanium

Well-Known Member
Jun 6, 2014
297
16
68
Lebanon
cPanel Access Level
Root Administrator
Thank you for the query.
But I think the command extracted only the outgoing emails, because almost all emails belong to users on my server. is there a way extract global addresses ? incoming is more important.

Thanks :)
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,273
313
Houston
Hello @psytanium

This is definitely pulling incoming and outgoing mail I confirmed this on my own server by pulling a few of the addresses I didn't recognize out and searching through the exim logs for them.
 
  • Like
Reactions: psytanium