I'm sorry, the last patch for rt-mailgate was wrong...this one works fine.<div>Best regards.</div><div>Andres.</div><div><br><br><div class="gmail_quote"><div class="gmail_quote">--- rt-mailgate.orig 2010-07-12 11:13:10.000000000 +0200</div>
<div class="gmail_quote">+++ rt-mailgate 2010-07-12 21:54:14.000000000 +0200</div><div class="gmail_quote">@@ -61,6 +61,7 @@</div><div class="gmail_quote"> $DYNAMIC_FILE_UPLOAD = 1;</div><div class="gmail_quote"><br></div>
<div class="gmail_quote"> use constant EX_TEMPFAIL => 75;</div><div class="gmail_quote">+use constant EX_UNKNOWERR => 76;</div><div class="gmail_quote"> use constant BUFFER_SIZE => 8192;</div><div class="gmail_quote">
<br></div><div class="gmail_quote"> my %opts;</div><div class="gmail_quote">@@ -131,7 +132,9 @@</div><div class="gmail_quote"> my $content = $r->content;</div><div class="gmail_quote"> print STDERR $content ."\n" if $opts{'debug'};</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">-if ( $content !~ /^(ok|not ok)/ ) {</div><div class="gmail_quote">+if ( $content =~ /^(ok)/ ) {</div><div class="gmail_quote">+ exit;</div><div class="gmail_quote">
+} elsif ( $content =~ /^(not ok)/ ) {</div><div class="gmail_quote"><br></div><div class="gmail_quote"> # It's not the server's fault if the mail is bogus. We just want to know that</div><div class="gmail_quote">
# *something* came out of the server.</div><div class="gmail_quote">@@ -145,9 +148,16 @@</div><div class="gmail_quote"> EOF</div><div class="gmail_quote"><br></div><div class="gmail_quote"> exit EX_TEMPFAIL;</div>
<div class="gmail_quote">-}</div><div class="gmail_quote">+} else {</div><div class="gmail_quote">+</div><div class="gmail_quote">+ print STDERR <<EOF;</div><div class="gmail_quote">+RT server error.</div><div class="gmail_quote">
+</div><div class="gmail_quote">+The RT server sends an unexpected error.</div><div class="gmail_quote">+EOF</div><div class="gmail_quote"><br></div><div class="gmail_quote">-exit;</div><div class="gmail_quote">+ exit EX_UNKNOWERR;</div>
<div class="gmail_quote">+}</div><div class="gmail_quote"><br></div><div class="gmail_quote"> END {</div><div class="gmail_quote"> unlink $message{'filename'} if $message{'filename'};</div></div></div>