Mail sending through smtp does not shows in sent items

roy_subhasis

Registered
Nov 14, 2019
1
0
1
India
cPanel Access Level
Root Administrator
Is there have any cpanel plugin or process through which we can track or saved the mails in sent items which is delivering from other client devices or service authnticating by the specific cpanel smtp ? If any customization required please let me know.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,286
313
Houston
Mail sent via a script will not be shown in the user's sent email, technically because it's not actually sent using the user's email. These emails are tracked via the exim logs and running something like the following would get you all email sent from a script:

Code:
grep "cwd=/home/" /var/log/exim_mainlog
You could take it a bit further and make the output look really nice with something like this one-liner I just wrote:

Code:
grep "cwd=/home/" /var/log/exim_mainlog |awk '{print $3,$14}'|sed 's/cwd=//' |sort |uniq -c |sort -n
Which will output the number of emails sent and the directory location they were sent from, sorted into ascending numerical order