mailpost whoes about undefined $_

Harald Dunkel harald.dunkel at aixigo.de
Mon Dec 7 12:53:27 UTC 2009


Hi folks,

I've got an error message from mailpost telling me

------ pipe to |/usr/lib/news/bin/mailpost -b /var/tmp my.newsgroup
       generated by my.newsgroup at mailhost ------

Use of uninitialized value $_ in pattern match (m//) at /usr/lib/news/bin/mailpost line 204, <STDIN> line 2.

Most EMails are processed without this problem. Here is a
suggested patch:


--- a/frontends/mailpost.in	2009-05-21 22:08:33.000000000 +0200
+++ b/frontends/mailpost.in	2009-12-07 09:47:12.000000000 +0100
@@ -201,7 +201,7 @@
     ($_, $line) = ($line, $_) ; # Swap $line and $_.

     last if defined($_) && /^$/ ;
-    next if /^$/ ;		# Only on first header will this happen.
+    next unless defined($_) ;		# Only on first header will this happen.

     push @errorText, "($_)\n";



Would you mind to check?


Many thanx

Harri




More information about the inn-workers mailing list