--- imp/lib/Spam.php    2005-09-04 04:06:07.000000000 +0400
+++ imp-/lib/Spam.php   2005-09-19 19:15:33.000000000 +0400
@@ -90,7 +90,9 @@
                     $raw_msg = $imp_contents->fullMessageText();
                     /* Use a pipe to write the message contents. This should
                      * be secure. */
-                    $pipe = popen($GLOBALS['conf'][$action]['program'], 'w');
+                    $user = Auth::getAuth();
+                    $prog = str_replace('%u', $user, $GLOBALS['conf'][$action]['program']);
+                    $pipe = popen($prog, 'w');
                     fwrite($pipe, $raw_msg);
                     pclose($pipe);
                     $report_msg_count++;
