Subject: pkg/16831: p5-MailTools incorrectly uses mailx
To: None <gnats-bugs@gnats.netbsd.org>
From: None <collver@linuxfreemail.com>
List: netbsd-bugs
Date: 05/15/2002 08:12:01
>Number:         16831
>Category:       pkg
>Synopsis:       p5-MailTools incorrectly uses mailx
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 15 08:13:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.5.2
>Organization:
>Environment:
System: NetBSD glen 1.5.2 NetBSD 1.5.2 (GLEN) #7: Sat Mar 23 06:47:58 PST 2002 root@glen:/usr/src/sys/arch/i386/compile/GLEN i386


>Description:
	Try using Mail::Mailer or Mail::Send with the default delivery
	method (mailx).  The mail headers will be mangled because Mail::Mailer
	uses the OS name to determine how to invoke mailx, and then uses
	interactive mailx commands that on NetBSD require mailx to be invoked
	correctly (either from a terminal, or with the right argument).

	This results in the Subject line coming through as:
		~s This here spiffy subject
>How-To-Repeat:
	#!/usr/pkg/bin/perl
	use Mail::Mailer;
	$mailer = Mail::Mailer->new();
	$mailer->open({From => 'collver@linuxfreemail.com',
		To => 'devnull@elsewhere.com',
		Subject => 'There here spiffy subject'})) or die "Oh no $!\n";
	print $mailer "This here spiffy content.\n";
	$mailer->close();
>Fix:
	mail/p5-MailTools/patches/patch-aa

$NetBSD$

--- Mail/Mailer.pm.orig Fri Feb  8 00:22:17 2002
+++ Mail/Mailer.pm
@@ -161,7 +161,7 @@
     if($osname =~ /(?:dgux)|(?:solaris)/io) {
        $cmd .= " -~";
     }
-    elsif($osname =~ /(?:linux)|(?:bsdos)|(?:freebsd)/io) {
+    elsif($osname =~ /(?:linux)|(?:bsdos)|(?:freebsd)|(?:netbsd)/io) {
        $cmd .= " -I";
     }
     push @Mailers, 'mail', $cmd;
>Release-Note:
>Audit-Trail:
>Unformatted: