bugzilla_email_append.pl calls processmail.pl after writing out the changes.
fixes many problems.
+See bugzilla.procmailrc for a sample procmailrc that works for me (SML) and
+also deals with bugzilla_email_append.pl
+
Customation:
There are some values inside the script which need to be customized for your
02/2000 - Klaas Freitag, SuSE GmbH <freitag@suse.de>
03/2000 - Seth M. Landsman <seth@cs.brandeis.edu>
bug_email.pl now lives out of bugzilla/contrib
- added line about formail
\ No newline at end of file
+ added line about formail
--- /dev/null
+:0 fhw
+| formail -I "From " -a "From "
+
+BUGZILLA_HOME=/home/bugzilla/WEB/bugzilla/contrib
+
+:0
+* ^Subject: .*\[Bug .*\]
+RESULT=|(cd $BUGZILLA_HOME && ./bugzilla_email_append.pl)
+
+
+# Feed mail to stdin of bug_email.pl
+:0 Ec
+#* !^Subject: .*[Bug .*]
+RESULT=|(cd $BUGZILLA_HOME && ./bug_email.pl )
+
+# write result to a logfile
+:0 c
+|echo `date '+%d.%m.%y %H:%M: '` $RESULT >> $HOME/bug_email.log
+
+
+:0 c
+|echo "----------------------------------" >> $HOME/bug_email.log
+
+:0 c
+$HOME/bug_email.log
+
+# Move mail to the inbox
+:0
+$HOME/Mail/INBOX
+
# Contributor : Seth M. Landsman <seth@dworkin.net>
# 03/15/00 : Initial version by SML
+# 03/15/00 : processmail gets called
# Email subject must be of format :
# .* Bug ### .*
# TODO :
# 1. better way to get the body text (I don't know what dump_entity() is
# actually doing
-# 2. response emails
use diagnostics;
use strict;
my $long_desc_query = "INSERT INTO longdescs SET bug_id=$found_id, who=$userid, bug_when=NOW(), thetext=" . SqlQuote($Body) . ";";
SendSQL($long_desc_query);
+system("cd .. ; ./processmail $found_id '$SenderShort'");
+
sub DealWithError {
my ($reason) = @_;
print $reason . "\n";