X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/41ea64f4271cd90b8dc99b4b9d8308aa317b2439..ac1820e72ec14b31fc751fb2482a0d31caed21ba:/procmail/msgid-index diff --git a/procmail/msgid-index b/procmail/msgid-index index 67606fa..0f300a2 100644 --- a/procmail/msgid-index +++ b/procmail/msgid-index @@ -14,8 +14,10 @@ DATA="$FROM,$NL$ORIGINAL_TO,$NL$SUBJECT,$NL$MSGID" INCLUDERC=$PMDIR/sql-escape QUERY="insert into messages (sender, recipient, subject, msgid, filename, dest) values ( - $DATA, '\\'$THISLOGFILE_REL\\'', '\\'\$DESTFILE\\'')" -TRAP="$TRAP; $DO_QUERY '$QUERY'" + $DATA, '\\'$THISLOGFILE_REL\\'', '\\'\$DESTFILE\\''); + select * from messages where filename = '\\'$THISLOGFILE_REL\\''" +TRAP="$TRAP; case \"$($DO_QUERY '$QUERY')\" in '') + echo 'msgid-index: failed to insert reference into database';; esac" QUERY DATA