Forum Moderators: coopster
$text = system("grep -Rl unsubscribe /var/qmail/mailnames/yourdomain.com/unsubscribe/Maildir/*");
The contents of text will then be a \n seperated list of direct file names for all emails containing the word "unsubscribe" that are within your "unsubscribe@yourdomain.com" email account.
You can then parse out (preg_match) or similar the email address and other particulars you may want, before deleting the files.