From vd@datamax.bg  Thu Dec  7 10:42:50 2006
Return-Path: <vd@datamax.bg>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 61B9216A659;
	Thu,  7 Dec 2006 10:42:50 +0000 (UTC)
	(envelope-from vd@datamax.bg)
Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B811B43D55;
	Thu,  7 Dec 2006 10:40:55 +0000 (GMT)
	(envelope-from vd@datamax.bg)
Received: from qlovarnika.bg.datamax (qlovarnika.bg.datamax [192.168.10.2])
	by jengal.datamax.bg (Postfix) with SMTP id 74C76B864;
	Thu,  7 Dec 2006 12:41:45 +0200 (EET)
Received: (nullmailer pid 77500 invoked by uid 1002);
	Thu, 07 Dec 2006 10:41:45 -0000
Message-Id: <20061207104145.GA77430@qlovarnika.bg.datamax>
Date: Thu, 7 Dec 2006 12:41:45 +0200
From: Vasil Dimov <vd@FreeBSD.org>
Reply-To: vd@FreeBSD.org
To: FreeBSD-gnats-submit@freebsd.org
Cc: clive@FreeBSD.org
Subject: Update port: mail/nullmailer to 1.03
X-Send-Pr-Version: 3.113

>Number:         106440
>Category:       ports
>Synopsis:       Update port: mail/nullmailer to 1.03
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    clive
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 07 10:50:01 GMT 2006
>Closed-Date:    Mon Dec 11 14:24:31 GMT 2006
>Last-Modified:  Mon Dec 11 14:24:31 GMT 2006
>Originator:     Vasil Dimov
>Release:        FreeBSD 6.2-PRERELEASE amd64
>Organization:
N/A
>Environment:

>Description:

Update mail/nullmailer from 1.00 to 1.03, the 1.00 archive is not
fetchible anymore from the master site:

* Remove dead master site
* Add the URL with the old versions to master sites to prevent 1.04
  release rendering our port unfetchable
* Remove unnecessary -lstdc++ from CXXFLAGS
* Remove our implementation of SMTP authentication, since one has been
  implemented by the authors (remove files/patch-doc-nullmailer-send.8,
  files/patch-lib-list.h and files/patch-smtp_authentication)
* Add a note that the SMTP authentication option has been changed

>How-To-Repeat:

>Fix:

--- nullmailer_1.00-1.03.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/nullmailer/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile	5 Mar 2005 03:46:18 -0000	1.13
+++ Makefile	7 Dec 2006 10:30:49 -0000
@@ -7,10 +7,10 @@
 
 PORTNAME=	nullmailer
 PORTEPOCH=	1
-PORTVERSION=	1.00
+PORTVERSION=	1.03
 CATEGORIES=	mail
 MASTER_SITES=	http://untroubled.org/nullmailer/ \
-		ftp://mirrors.dataloss.nl/mirrors/bgware/nullmailer/%SUBDIR%/
+		http://untroubled.org/nullmailer/archive/
 MASTER_SITE_SUBDIR=	${PORTVERSION}
 
 MAINTAINER=	clive@FreeBSD.org
@@ -19,7 +19,7 @@
 HAS_CONFIGURE=	yes
 
 USE_SUBMAKE=	yes
-CXXFLAGS+=	-lstdc++
+
 MAN1=	nullmailer-inject.1 sendmail.1
 MAN7=	nullmailer.7
 MAN8=	nullmailer-queue.8 nullmailer-send.8
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/mail/nullmailer/distinfo,v
retrieving revision 1.4
diff -u -r1.4 distinfo
--- distinfo	22 Jan 2006 12:50:30 -0000	1.4
+++ distinfo	7 Dec 2006 10:30:49 -0000
@@ -1,3 +1,3 @@
-MD5 (nullmailer-1.00.tar.gz) = ead32b3543ef652891edf3856ec759dd
-SHA256 (nullmailer-1.00.tar.gz) = 1ebb63f010a46dce9559b1025f76e74741429071cd2d4f380a63a5ced3ce8340
-SIZE (nullmailer-1.00.tar.gz) = 170605
+MD5 (nullmailer-1.03.tar.gz) = 4e94a84f359571b0872f398f0859a22a
+SHA256 (nullmailer-1.03.tar.gz) = 1471ab6c0c6038d7df4d301734e9e7f93b75147a954b52cb95e669c503fb9479
+SIZE (nullmailer-1.03.tar.gz) = 172250
Index: files/patch-doc-nullmailer-send.8
===================================================================
RCS file: files/patch-doc-nullmailer-send.8
diff -N files/patch-doc-nullmailer-send.8
--- files/patch-doc-nullmailer-send.8	5 Mar 2005 03:46:18 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
---- doc/nullmailer-send.8~	Sat Mar  5 10:13:38 2005
-+++ doc/nullmailer-send.8	Sat Mar  5 10:16:51 2005
-@@ -57,10 +57,11 @@
- The protocol name defaults to
- .IR smtp ,
- and may be followed by command-line arguments for that module.
--For example, to connect to port 2525 on your SMTP smart host, use:
-+For example, to connect to port 2525 on your SMTP smart host,
-+which also requires SMTP authentication, use:
- 
- .EX
--    smarthost.dom smtp --port=2525
-+    smarthost.dom smtp --port=2525 --auth=user,pass
- .EE
- 
- Blank lines and lines starting with a pound are ignored.
Index: files/patch-lib-list.h
===================================================================
RCS file: files/patch-lib-list.h
diff -N files/patch-lib-list.h
--- files/patch-lib-list.h	5 Mar 2005 03:46:18 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
---- lib/list.h~	Sat Mar  5 01:16:28 2005
-+++ lib/list.h	Sat Mar  5 01:13:35 2005
-@@ -18,8 +18,8 @@
-   typedef list_node<T> node;
-   typedef list_iterator<T> iter;
-   typedef const_list_iterator<T> const_iter;
--  friend class iter;
--  friend class const_iter;
-+  friend class list_iterator<T>;;
-+  friend class const_list_iterator<T>;;
-   
-   list()
-     : head(0), tail(0), cnt(0)
Index: files/patch-smtp_authentication
===================================================================
RCS file: files/patch-smtp_authentication
diff -N files/patch-smtp_authentication
--- files/patch-smtp_authentication	5 Mar 2005 03:46:18 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,127 +0,0 @@
---- protocols/protocol.cc~	Sat Mar  5 09:38:23 2005
-+++ protocols/protocol.cc	Sat Mar  5 09:39:42 2005
-@@ -30,10 +30,12 @@
- const char* cli_help_suffix = "";
- const char* cli_args_usage = "remote-address < mail-file";
- const int cli_args_min = 1;
--const int cli_args_max = 1;
-+const int cli_args_max = 2;
- cli_option cli_options[] = {
-   { 'p', "port", cli_option::integer, 0, &port,
-     "Set the port number on the remote host to connect to", 0 },
-+  { 'a', "auth", cli_option::string, 0, &auth,
-+    "Set the user and password for authentication (user,pass)", 0 },
-   {0, 0, cli_option::flag, 0, 0, 0, 0}
- };
- 
---- protocols/protocol.h~	Sat Mar  5 09:40:15 2005
-+++ protocols/protocol.h	Sat Mar  5 09:40:46 2005
-@@ -8,6 +8,7 @@
- 
- // This must be provided by the protocol, but will be set by the lib.
- extern int port;
-+extern char* auth;
- 
- extern void protocol_prep(fdibuf* in);
- extern void protocol_send(fdibuf* in, int fd);
---- protocols/qmqp.cc~	Sat Mar  5 09:40:59 2005
-+++ protocols/qmqp.cc	Sat Mar  5 09:41:21 2005
-@@ -31,6 +31,7 @@
- #include "protocol.h"
- 
- int port = 628;
-+char* auth = "";
- const char* cli_program = "qmqp";
- const char* cli_help_prefix = "Send an emal message via QMQP\n";
- 
---- protocols/smtp.cc~	Sat Mar  5 09:41:31 2005
-+++ protocols/smtp.cc	Sat Mar  5 09:44:58 2005
-@@ -30,6 +30,7 @@
- #include "protocol.h"
- 
- int port = 25;
-+char* auth = "";
- const char* cli_program = "smtp";
- const char* cli_help_prefix = "Send an email message via SMTP\n";
- 
-@@ -136,6 +137,11 @@
- {
- }
- 
-+void to64(char* infile, char* outfile);
-+void to64(const mystring& infile, mystring& outfile);
-+void output64chunk(int c1, int c2, int c3, int pads, char** outfile);
-+void output64chunk(int c1, int c2, int c3, int pads, mystring& outfile);
-+
- void protocol_send(fdibuf* in, int fd)
- {
-   mystring hh = getenv("HELOHOST");
-@@ -143,5 +149,68 @@
-   smtp conn(fd);
-   conn.docmd("", 200);
-   conn.docmd("HELO " + hh, 200);
-+
-+  if ( strlen(auth) > 0 )
-+  {
-+    mystring authstr = auth;
-+    mystring uname = authstr.left(authstr.find_first(','));
-+    mystring pass = authstr.sub(authstr.find_first(',')+1,authstr.length());
-+    mystring plain = uname + "\1" + uname + "\1" + pass;
-+    mystring encoded = "AUTH PLAIN ";
-+    to64(plain,encoded);
-+    conn.docmd(encoded,200);
-+  }
-+
-   conn.send(in);
- }
-+
-+static char basis_64[] =
-+   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-+
-+void to64(const mystring& infile, mystring& outfile)
-+{
-+    int c1, c2, c3;
-+    size_t inpos = 0;
-+    while ((c1 = infile[inpos++])) {
-+	c2 = infile[inpos++];
-+	if (!c2) {
-+	    output64chunk(c1, 0, 0, 2, outfile);
-+	} else {
-+	    c3 = infile[inpos++];
-+	    if (!c3) {
-+		output64chunk(c1, c2, 0, 1, outfile);
-+	    } else {
-+		output64chunk(c1, c2, c3, 0, outfile);
-+	    }
-+	}
-+    }
-+}
-+
-+void output64chunk(int c1, int c2, int c3, int pads, mystring& outfile)
-+{
-+  if (c1==1) c1 = 0;
-+  if (c2==1) c2 = 0;
-+  if (c3==1) c3 = 0;
-+
-+  char out[5];
-+  out[0] = basis_64[c1>>2];
-+  out[1] = basis_64[((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4)];
-+  switch (pads)
-+  {
-+  case 0:
-+    out[2] = basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
-+    out[3] = basis_64[c3 & 0x3F];
-+    break;
-+  case 1:
-+    out[2] = basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
-+    out[3] = '=';
-+    break;
-+  case 2:
-+    out[2] = '=';
-+    out[3] = '=';
-+    break;
-+  }; 
-+  out[4] = 0;
-+  outfile += out;
-+}
-+
Index: files/pkg-message.proto
===================================================================
RCS file: /home/pcvs/ports/mail/nullmailer/files/pkg-message.proto,v
retrieving revision 1.1
diff -u -r1.1 pkg-message.proto
--- files/pkg-message.proto	13 Apr 2003 13:22:28 -0000	1.1
+++ files/pkg-message.proto	7 Dec 2006 10:30:49 -0000
@@ -13,4 +13,9 @@
 WARNING! It will cause problem in case delivering to local recipients.
 Also man nullmailer-send(8) for more details
 
+NOTE for the ones upgrading from 1.00:
+The smtp authentication option has been changed from
+--auth=joe,secret to --user=joe and --pass=secret, see nullmailer-send(8)
+for details.
+
 ==================================================================
--- nullmailer_1.00-1.03.diff ends here ---


-- 
Vasil Dimov
gro.DSBeerF@dv
%
Life should not be a journey to the grave with the intention
of arriving safely in a pretty and well preserved body, but
rather to skid in broadside, thoroughly used up, totally worn out,
and loudly proclaiming --WOW---What A RIDE!!
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->clive 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Dec 7 10:50:30 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106440 

From: Vasil Dimov <vd@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/106440: Update port: mail/nullmailer to 1.03
Date: Thu, 7 Dec 2006 13:10:57 +0200

 Additionally some rc-infrastructure simplifications can be made,
 please consider the following patch:
 
 --- patch begins here ---
 Index: Makefile
 ===================================================================
 RCS file: /home/pcvs/ports/mail/nullmailer/Makefile,v
 retrieving revision 1.13
 diff -u -r1.13 Makefile
 --- Makefile	5 Mar 2005 03:46:18 -0000	1.13
 +++ Makefile	7 Dec 2006 10:59:01 -0000
 @@ -6,11 +6,11 @@
  #
  
  PORTNAME=	nullmailer
 +PORTVERSION=	1.03
  PORTEPOCH=	1
 -PORTVERSION=	1.00
  CATEGORIES=	mail
  MASTER_SITES=	http://untroubled.org/nullmailer/ \
 -		ftp://mirrors.dataloss.nl/mirrors/bgware/nullmailer/%SUBDIR%/
 +		http://untroubled.org/nullmailer/archive/
  MASTER_SITE_SUBDIR=	${PORTVERSION}
  
  MAINTAINER=	clive@FreeBSD.org
 @@ -19,12 +19,12 @@
  HAS_CONFIGURE=	yes
  
  USE_SUBMAKE=	yes
 -CXXFLAGS+=	-lstdc++
 +
  MAN1=	nullmailer-inject.1 sendmail.1
  MAN7=	nullmailer.7
  MAN8=	nullmailer-queue.8 nullmailer-send.8
  
 -USE_RC_SUBR=	yes
 +USE_RC_SUBR=	nullmailer
  
  PKGMESSAGE=	${WRKDIR}/pkg-message
  
 @@ -47,8 +47,6 @@
  
  post-install:
  	@cd ${WRKSRC} && make install-root
 -	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${FILESDIR}/nullmail.sh > ${WRKDIR}/nullmail.sh
 -	@${INSTALL_SCRIPT} -c ${WRKDIR}/nullmail.sh ${PREFIX}/etc/rc.d/
  	@${INSTALL_DATA} -c ${FILESDIR}/remotes.sample ${PREFIX}/etc/nullmailer/
  	@BATCH="${BATCH}" NMH_PREFIX="${NMH_PREFIX}" PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
  	@${CAT} ${PKGMESSAGE}
 Index: distinfo
 ===================================================================
 RCS file: /home/pcvs/ports/mail/nullmailer/distinfo,v
 retrieving revision 1.4
 diff -u -r1.4 distinfo
 --- distinfo	22 Jan 2006 12:50:30 -0000	1.4
 +++ distinfo	7 Dec 2006 10:59:01 -0000
 @@ -1,3 +1,3 @@
 -MD5 (nullmailer-1.00.tar.gz) = ead32b3543ef652891edf3856ec759dd
 -SHA256 (nullmailer-1.00.tar.gz) = 1ebb63f010a46dce9559b1025f76e74741429071cd2d4f380a63a5ced3ce8340
 -SIZE (nullmailer-1.00.tar.gz) = 170605
 +MD5 (nullmailer-1.03.tar.gz) = 4e94a84f359571b0872f398f0859a22a
 +SHA256 (nullmailer-1.03.tar.gz) = 1471ab6c0c6038d7df4d301734e9e7f93b75147a954b52cb95e669c503fb9479
 +SIZE (nullmailer-1.03.tar.gz) = 172250
 Index: pkg-plist
 ===================================================================
 RCS file: /home/pcvs/ports/mail/nullmailer/pkg-plist,v
 retrieving revision 1.6
 diff -u -r1.6 pkg-plist
 --- pkg-plist	13 Apr 2003 13:22:28 -0000	1.6
 +++ pkg-plist	7 Dec 2006 10:59:01 -0000
 @@ -7,7 +7,6 @@
  sbin/nullmailer-send
  etc/nullmailer/me.sample
  etc/nullmailer/remotes.sample
 -etc/rc.d/nullmail.sh
  @exec mkdir -p %%LOCALSTATEDIR%%/nullmailer/queue
  @exec chmod 700 %%LOCALSTATEDIR%%/nullmailer/queue
  @exec mkdir -p %%LOCALSTATEDIR%%/nullmailer/tmp
 Index: files/nullmail.sh
 ===================================================================
 RCS file: files/nullmail.sh
 diff -N files/nullmail.sh
 --- files/nullmail.sh	20 Feb 2006 20:47:13 -0000	1.7
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,21 +0,0 @@
 -#!/bin/sh
 -# $FreeBSD: ports/mail/nullmailer/files/nullmail.sh,v 1.7 2006/02/20 20:47:13 dougb Exp $
 -#
 -# PROVIDE: nullmailer
 -# REQUIRE: DAEMON
 -#
 -# Add the following line to /etc/rc.conf to enable nullmailer:
 -#
 -# nullmailer_enable="YES"
 -#
 -
 -. %%RC_SUBR%%
 -
 -name=nullmailer
 -rcvar=`set_rcvar`
 -nullmailer_user=nullmail
 -command=%%PREFIX%%/sbin/nullmailer-send
 -command_args=" 2>&1 | /usr/bin/logger -i -p local5.info -t nullmail &"
 -load_rc_config $name
 -run_rc_command "$1"
 -
 Index: files/nullmailer.in
 ===================================================================
 RCS file: files/nullmailer.in
 diff -N files/nullmailer.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/nullmailer.in	7 Dec 2006 10:59:01 -0000
 @@ -0,0 +1,21 @@
 +#!/bin/sh
 +# $FreeBSD: ports/mail/nullmailer/files/nullmail.sh,v 1.7 2006/02/20 20:47:13 dougb Exp $
 +#
 +# PROVIDE: nullmailer
 +# REQUIRE: DAEMON
 +#
 +# Add the following line to /etc/rc.conf to enable nullmailer:
 +#
 +# nullmailer_enable="YES"
 +#
 +
 +. %%RC_SUBR%%
 +
 +name=nullmailer
 +rcvar=`set_rcvar`
 +nullmailer_user=nullmail
 +command=%%PREFIX%%/sbin/nullmailer-send
 +command_args=" 2>&1 | /usr/bin/logger -i -p local5.info -t nullmail &"
 +load_rc_config $name
 +run_rc_command "$1"
 +
 Index: files/patch-doc-nullmailer-send.8
 ===================================================================
 RCS file: files/patch-doc-nullmailer-send.8
 diff -N files/patch-doc-nullmailer-send.8
 --- files/patch-doc-nullmailer-send.8	5 Mar 2005 03:46:18 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,16 +0,0 @@
 ---- doc/nullmailer-send.8~	Sat Mar  5 10:13:38 2005
 -+++ doc/nullmailer-send.8	Sat Mar  5 10:16:51 2005
 -@@ -57,10 +57,11 @@
 - The protocol name defaults to
 - .IR smtp ,
 - and may be followed by command-line arguments for that module.
 --For example, to connect to port 2525 on your SMTP smart host, use:
 -+For example, to connect to port 2525 on your SMTP smart host,
 -+which also requires SMTP authentication, use:
 - 
 - .EX
 --    smarthost.dom smtp --port=2525
 -+    smarthost.dom smtp --port=2525 --auth=user,pass
 - .EE
 - 
 - Blank lines and lines starting with a pound are ignored.
 Index: files/patch-lib-list.h
 ===================================================================
 RCS file: files/patch-lib-list.h
 diff -N files/patch-lib-list.h
 --- files/patch-lib-list.h	5 Mar 2005 03:46:18 -0000	1.2
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,13 +0,0 @@
 ---- lib/list.h~	Sat Mar  5 01:16:28 2005
 -+++ lib/list.h	Sat Mar  5 01:13:35 2005
 -@@ -18,8 +18,8 @@
 -   typedef list_node<T> node;
 -   typedef list_iterator<T> iter;
 -   typedef const_list_iterator<T> const_iter;
 --  friend class iter;
 --  friend class const_iter;
 -+  friend class list_iterator<T>;;
 -+  friend class const_list_iterator<T>;;
 -   
 -   list()
 -     : head(0), tail(0), cnt(0)
 Index: files/patch-smtp_authentication
 ===================================================================
 RCS file: files/patch-smtp_authentication
 diff -N files/patch-smtp_authentication
 --- files/patch-smtp_authentication	5 Mar 2005 03:46:18 -0000	1.2
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,127 +0,0 @@
 ---- protocols/protocol.cc~	Sat Mar  5 09:38:23 2005
 -+++ protocols/protocol.cc	Sat Mar  5 09:39:42 2005
 -@@ -30,10 +30,12 @@
 - const char* cli_help_suffix = "";
 - const char* cli_args_usage = "remote-address < mail-file";
 - const int cli_args_min = 1;
 --const int cli_args_max = 1;
 -+const int cli_args_max = 2;
 - cli_option cli_options[] = {
 -   { 'p', "port", cli_option::integer, 0, &port,
 -     "Set the port number on the remote host to connect to", 0 },
 -+  { 'a', "auth", cli_option::string, 0, &auth,
 -+    "Set the user and password for authentication (user,pass)", 0 },
 -   {0, 0, cli_option::flag, 0, 0, 0, 0}
 - };
 - 
 ---- protocols/protocol.h~	Sat Mar  5 09:40:15 2005
 -+++ protocols/protocol.h	Sat Mar  5 09:40:46 2005
 -@@ -8,6 +8,7 @@
 - 
 - // This must be provided by the protocol, but will be set by the lib.
 - extern int port;
 -+extern char* auth;
 - 
 - extern void protocol_prep(fdibuf* in);
 - extern void protocol_send(fdibuf* in, int fd);
 ---- protocols/qmqp.cc~	Sat Mar  5 09:40:59 2005
 -+++ protocols/qmqp.cc	Sat Mar  5 09:41:21 2005
 -@@ -31,6 +31,7 @@
 - #include "protocol.h"
 - 
 - int port = 628;
 -+char* auth = "";
 - const char* cli_program = "qmqp";
 - const char* cli_help_prefix = "Send an emal message via QMQP\n";
 - 
 ---- protocols/smtp.cc~	Sat Mar  5 09:41:31 2005
 -+++ protocols/smtp.cc	Sat Mar  5 09:44:58 2005
 -@@ -30,6 +30,7 @@
 - #include "protocol.h"
 - 
 - int port = 25;
 -+char* auth = "";
 - const char* cli_program = "smtp";
 - const char* cli_help_prefix = "Send an email message via SMTP\n";
 - 
 -@@ -136,6 +137,11 @@
 - {
 - }
 - 
 -+void to64(char* infile, char* outfile);
 -+void to64(const mystring& infile, mystring& outfile);
 -+void output64chunk(int c1, int c2, int c3, int pads, char** outfile);
 -+void output64chunk(int c1, int c2, int c3, int pads, mystring& outfile);
 -+
 - void protocol_send(fdibuf* in, int fd)
 - {
 -   mystring hh = getenv("HELOHOST");
 -@@ -143,5 +149,68 @@
 -   smtp conn(fd);
 -   conn.docmd("", 200);
 -   conn.docmd("HELO " + hh, 200);
 -+
 -+  if ( strlen(auth) > 0 )
 -+  {
 -+    mystring authstr = auth;
 -+    mystring uname = authstr.left(authstr.find_first(','));
 -+    mystring pass = authstr.sub(authstr.find_first(',')+1,authstr.length());
 -+    mystring plain = uname + "\1" + uname + "\1" + pass;
 -+    mystring encoded = "AUTH PLAIN ";
 -+    to64(plain,encoded);
 -+    conn.docmd(encoded,200);
 -+  }
 -+
 -   conn.send(in);
 - }
 -+
 -+static char basis_64[] =
 -+   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 -+
 -+void to64(const mystring& infile, mystring& outfile)
 -+{
 -+    int c1, c2, c3;
 -+    size_t inpos = 0;
 -+    while ((c1 = infile[inpos++])) {
 -+	c2 = infile[inpos++];
 -+	if (!c2) {
 -+	    output64chunk(c1, 0, 0, 2, outfile);
 -+	} else {
 -+	    c3 = infile[inpos++];
 -+	    if (!c3) {
 -+		output64chunk(c1, c2, 0, 1, outfile);
 -+	    } else {
 -+		output64chunk(c1, c2, c3, 0, outfile);
 -+	    }
 -+	}
 -+    }
 -+}
 -+
 -+void output64chunk(int c1, int c2, int c3, int pads, mystring& outfile)
 -+{
 -+  if (c1==1) c1 = 0;
 -+  if (c2==1) c2 = 0;
 -+  if (c3==1) c3 = 0;
 -+
 -+  char out[5];
 -+  out[0] = basis_64[c1>>2];
 -+  out[1] = basis_64[((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4)];
 -+  switch (pads)
 -+  {
 -+  case 0:
 -+    out[2] = basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
 -+    out[3] = basis_64[c3 & 0x3F];
 -+    break;
 -+  case 1:
 -+    out[2] = basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
 -+    out[3] = '=';
 -+    break;
 -+  case 2:
 -+    out[2] = '=';
 -+    out[3] = '=';
 -+    break;
 -+  }; 
 -+  out[4] = 0;
 -+  outfile += out;
 -+}
 -+
 Index: files/pkg-message.proto
 ===================================================================
 RCS file: /home/pcvs/ports/mail/nullmailer/files/pkg-message.proto,v
 retrieving revision 1.1
 diff -u -r1.1 pkg-message.proto
 --- files/pkg-message.proto	13 Apr 2003 13:22:28 -0000	1.1
 +++ files/pkg-message.proto	7 Dec 2006 10:59:01 -0000
 @@ -13,4 +13,9 @@
  WARNING! It will cause problem in case delivering to local recipients.
  Also man nullmailer-send(8) for more details
  
 +NOTE for the ones upgrading from 1.00:
 +The smtp authentication option has been changed from
 +--auth=joe,secret to --user=joe and --pass=secret, see nullmailer-send(8)
 +for details.
 +
  ==================================================================
 --- patch ends here ---
 
 -- 
 Vasil Dimov
 gro.DSBeerF@dv
 %
 Sometimes I really think people ought to have to pass a proper exam
 before they're allowed to be parents. Not just the practical, I mean.
     -- (Terry Pratchett, Thief of Time)
State-Changed-From-To: open->closed 
State-Changed-By: clive 
State-Changed-When: Mon Dec 11 14:24:08 UTC 2006 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106440 
>Unformatted:
