i would like to know to what addresses a certain user is sending mails...is there any way to know it? it's on a SME server 7.3
I use the following script to find all emails sent TO and FROM a specific user:
egrep -A 1 -B 1 "userofinterest@mydomain.com" /var/log/qmail/current | mail -sUserofinterestEmailScan myuserid@mydomain.com
Basically finds any instance of
userofinterest and prints the line before and after which normally contains the from or to party. In my case I then send the output to my email address.
If you only want to find out who it was sent to then try the following:
egrep -A 1 "from <userofinterest@mydomain.com" /var/log/qmail/current | mail -sUserofinterestEmailScan myuserid@mydomain.com
Of course this is run from the command line and deals with recent history. For older logs you can also include seaching the files starting with "@" in the same directory.
Christian