From wmperry@megalith.bp.aventail.com  Fri Dec  1 13:21:36 2000
Return-Path: <wmperry@megalith.bp.aventail.com>
Received: from mail.rdc1.tn.home.com (ha1.rdc1.tn.home.com [24.2.7.66])
	by hub.freebsd.org (Postfix) with ESMTP id C864A37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  1 Dec 2000 13:21:35 -0800 (PST)
Received: from megalith.bp.aventail.com ([24.12.70.142])
          by mail.rdc1.tn.home.com (InterMail vM.4.01.02.00 201-229-116)
          with ESMTP
          id <20001201212134.GJJC13852.mail.rdc1.tn.home.com@megalith.bp.aventail.com>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Fri, 1 Dec 2000 13:21:34 -0800
Received: (from wmperry@localhost)
	by megalith.bp.aventail.com (8.11.1/8.9.3) id eB1LLT502023;
	Fri, 1 Dec 2000 16:21:29 -0500 (EST)
	(envelope-from wmperry)
Message-Id: <200012012121.eB1LLT502023@megalith.bp.aventail.com>
Date: Fri, 1 Dec 2000 16:21:29 -0500 (EST)
From: "William M. Perry" <wmperry@aventail.com>
Sender: wmperry@megalith.bp.aventail.com
Reply-To: wmperry@aventail.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: NTLM support for ports/mail/fetchmail
X-Send-Pr-Version: 3.2

>Number:         23214
>Category:       ports
>Synopsis:       Fetchmail currently builds without NTLM auth support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    roam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 01 13:30:01 PST 2000
>Closed-Date:    Sat Dec 2 08:20:27 PST 2000
>Last-Modified:  Sat Dec 02 08:23:25 PST 2000
>Originator:     William M. Perry
>Release:        FreeBSD 4.2-RELEASE i386
>Organization:
>Environment:

	

>Description:

	Currently there is no way to make the fetchmail port build
    	with support for NTLM authentication.  This is required to
	authenticate against MS Exchange servers using IMAP without
	exposing your password in the clear.

>How-To-Repeat:

	Configure fetchmail to talk to an Exchange server using imap.
	My configuration looks like:

poll mail.in.aventail.com
  proto	 imap
  plugin '/usr/local/aventail/bin/s5connect %h %p'
  user   wmperry@aventail
  pass   LA-DEE-DAH-YEAH-RIGHT

	Replace your exchange server, username, and password of
	course.  You need to specify the username with 'user@domain'
	though.  Currently this will just fail the authentication
	because no NTLM support is available.


>Fix:

	Need to add --enable-NTLM to CONFIGURE_ARGS.  There are no
	external dependencies that I could find.  Patch follows:


Index: mail/fetchmail/Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/fetchmail/Makefile,v
retrieving revision 1.111
diff -c -w -r1.111 Makefile
*** mail/fetchmail/Makefile     2000/11/30 08:51:48     1.111
--- mail/fetchmail/Makefile     2000/12/01 21:19:00
***************
*** 50,55 ****
--- 50,59 ----
  CONFIGURE_ARGS += --with-kerberos5=${KRB5_HOME}
  .endif
  
+ .if defined(USE_NTLM)
+ CONFIGURE_ARGS += --enable-NTLM
+ .endif
+ 
  FDOC= ${PREFIX}/share/doc/fetchmail
  
  pre-patch:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->roam 
Responsible-Changed-By: roam 
Responsible-Changed-When: Sat Dec 2 05:40:48 PST 2000 
Responsible-Changed-Why:  
I'll look into that.. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23214 
State-Changed-From-To: open->feedback 
State-Changed-By: roam 
State-Changed-When: Sat Dec 2 06:08:51 PST 2000 
State-Changed-Why:  
Awaiting maintainer approval for a patch sent in a separate mail message. 

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

From: Peter Pentchev <roam@orbitel.bg>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/23214: Fetchmail currently builds without NTLM auth support
Date: Sat, 2 Dec 2000 16:05:31 +0200

 I've sent the following to the port maintainer; awaiting approval :)
 
 G'luck,
 Peter
 
 -- 
 This sentence contradicts itself - or rather - well, no, actually it doesn't!
 
 ----- Forwarded message from Peter Pentchev <roam@orbitel.bg> -----
 
 Date: Sat, 2 Dec 2000 16:01:53 +0200
 From: Peter Pentchev <roam@orbitel.bg>
 To: Ville Eerola <ve@sci.fi>
 Subject: mail/fetchmail FreeBSD proposed port update - enable NTLM auth
 User-Agent: Mutt/1.2.5i
 
 Hi,
 
 What do you think about the attached patch:
 - add WITH_NTLM option to enable NTLM auth (partly PR ports/23214);
 - change MAKE_KERBEROS4 to WITH_KERBEROS4 for consistency;
 - bump PORTREVISION to reflect the changes :)
 
 G'luck,
 Peter
 
 -- 
 If I were you, who would be reading this sentence?
 
 Index: ports/mail/fetchmail/Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/mail/fetchmail/Makefile,v
 retrieving revision 1.111
 diff -u -r1.111 Makefile
 --- ports/mail/fetchmail/Makefile	2000/11/30 08:51:48	1.111
 +++ ports/mail/fetchmail/Makefile	2000/12/02 14:00:29
 @@ -11,6 +11,7 @@
  
  PORTNAME=	fetchmail
  PORTVERSION=	5.6.0
 +PORTREVISION=	1
  CATEGORIES=	mail ipv6
  MASTER_SITES=	http://www.tuxedo.org/~esr/fetchmail/ \
  		ftp://ftp.ccil.org/pub/esr/fetchmail/
 @@ -42,12 +43,16 @@
  CONFIGURE_ARGS+=-with-includes=${LOCALBASE}/include/openssl --with-ssl=${LOCALBASE}
  .endif
  
 -.if exists(/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4)
 +.if exists(/usr/lib/libkrb.a) && defined(WITH_KERBEROS4)
  CONFIGURE_ARGS += --with-kerberos=/usr/include
  .endif
  
  .if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libkrb5.a)
  CONFIGURE_ARGS += --with-kerberos5=${KRB5_HOME}
 +.endif
 +
 +.if defined(WITH_NTLM)
 +CONFIGURE_ARGS += --enable-NTLM
  .endif
  
  FDOC=	${PREFIX}/share/doc/fetchmail
 
 ----- End forwarded message -----
 

From: Peter Pentchev <roam@orbitel.bg>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/23214: Fetchmail currently builds without NTLM auth support
Date: Sat, 2 Dec 2000 16:23:43 +0200

 Instant replay :(
 
 G'luck,
 Peter
 
 -- 
 I am the thought you are now thinking.
 
 ----- Forwarded message from Peter Pentchev <roam@orbitel.bg> -----
 
 Date: Sat, 2 Dec 2000 16:22:25 +0200
 From: Peter Pentchev <roam@orbitel.bg>
 To: Ville Eerola <ve@sci.fi>
 Subject: Re: mail/fetchmail FreeBSD proposed port update - enable NTLM auth
 User-Agent: Mutt/1.2.5i
 In-Reply-To: <20001202160153.D1968@ringworld.oblivion.bg>; from roam@orbitel.bg on Sat, Dec 02, 2000 at 04:01:53PM +0200
 
 Erm.  Please disregard the previous patch.  See the attached one:
 - check for WITH_NTLM and enable NTLM auth if requested (PR 23214);
 - bump PORTREVISION;
 - do NOT change the check for MAKE_KERBEROS4; MAKE_KERBEROS4 is a toggle
   set in /etc/make.conf, NOT a user-settable port-compile-time thing :((
 
 All right, so I need more sleep..
 
 G'luck,
 Peter
 
 -- 
 No language can express every thought unambiguously, least of all this one.
 
 Index: ports/mail/fetchmail//Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/mail/fetchmail/Makefile,v
 retrieving revision 1.111
 diff -u -r1.111 Makefile
 --- ports/mail/fetchmail//Makefile	2000/11/30 08:51:48	1.111
 +++ ports/mail/fetchmail//Makefile	2000/12/02 14:19:34
 @@ -11,6 +11,7 @@
  
  PORTNAME=	fetchmail
  PORTVERSION=	5.6.0
 +PORTREVISION=	1
  CATEGORIES=	mail ipv6
  MASTER_SITES=	http://www.tuxedo.org/~esr/fetchmail/ \
  		ftp://ftp.ccil.org/pub/esr/fetchmail/
 @@ -48,6 +49,10 @@
  
  .if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libkrb5.a)
  CONFIGURE_ARGS += --with-kerberos5=${KRB5_HOME}
 +.endif
 +
 +.if defined(WITH_NTLM)
 +CONFIGURE_ARGS += --enable-NTLM
  .endif
  
  FDOC=	${PREFIX}/share/doc/fetchmail
 
 ----- End forwarded message -----
 
State-Changed-From-To: feedback->closed 
State-Changed-By: roam 
State-Changed-When: Sat Dec 2 08:20:27 PST 2000 
State-Changed-Why:  
Committed with a slight modification - USE_* make variables are reserved 
for internal Ports system usage; user-serviceable toggles are prefixed 
with WITH_. 

Thanks for the patch! 

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