From owner-freebsd-ports@FreeBSD.ORG Fri Jun 11 06:23:43 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0CD916A4CE; Fri, 11 Jun 2004 06:23:43 +0000 (GMT) Received: from pscgate.progress.com (pscgate.progress.com [192.77.186.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5903D43D48; Fri, 11 Jun 2004 06:23:43 +0000 (GMT) (envelope-from regism@progress.com) Received: from elvirus.progress.com (elvirus [192.77.186.100]) i5B6NXH5009900; Fri, 11 Jun 2004 02:23:34 -0400 (EDT) Received: from progress.com (localhost [127.0.0.1])i5B6NXc14004; Fri, 11 Jun 2004 02:23:33 -0400 (EDT) Received: from NTEXFE02.bedford.progress.com (ntexfe02 [172.16.2.62]) by progress.com (8.11.6/8.11.6) with ESMTP id i5B6NXA09688; Fri, 11 Jun 2004 02:23:33 -0400 (EDT) Received: from MAIL01.bedford.progress.com ([172.16.2.56]) by NTEXFE02.bedford.progress.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 11 Jun 2004 02:23:18 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Fri, 11 Jun 2004 02:23:24 -0400 Message-ID: <591FDCF98D5E3E418F3B8041902E17F0386AA2@MAIL01.bedford.progress.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: FreeBSD Port: milter-regex-1.5 Thread-Index: AcRPfJmlY9kte8OsQ3m1cyGjT4BBpg== From: "Regis McEwen" To: X-OriginalArrivalTime: 11 Jun 2004 06:23:18.0215 (UTC) FILETIME=[95DE9D70:01C44F7C] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: ports@FreeBSD.org cc: Regis McEwen Subject: FreeBSD Port: milter-regex-1.5 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2004 06:23:43 -0000 Hi, =20 I can't, unfortunately, get this to work (I even tried the developers version) =20 I compiled milter-regex with sendmail 8.12.11 (with MILTER support compiled in) =20 I used the following /etc/mail/milter-regexp.conf: =20 reject "Rejected, spamvertised website cyberpromo.com" body ,http://[^/]*cyberpromo\.com/,i =20 =20 It does not get rejected, but gets delivered and I see the following in my /var/log/syslog file: =20 Jun 11 02:14:38 elvirus2 milter-regexp: [ID 308449 mail.error] bad config line: "reject "Rejected, spamvertised website cyberpromo.com"" Jun 11 02:14:38 elvirus2 milter-regexp: [ID 646957 mail.info] error in new confi g file: /etc/mail/milter-regexp.conf Jun 11 02:14:38 elvirus2 sm-mta[20623]: [ID 801593 mail.error] i5B6EcCZ020623: m ilter_read(milter-regex): cmd read returned 0, expecting 5 =20 I get this error whether or not I use double quotes (") around the MESSAGE. =20 What is the error "cmd read returned 0, expecting 5" mean? =20 I also got a core file dumped. (I don't have gdb on this machine yet so I don't have a stack trace available, unfortunately). =20 I put an unrelated milter to see if MILTER in sendmail was working independent of milter-regex.=20 =20 Here's what I got: =20 =20 connect_callback localhost helo_callback elvirus2.progress.com envfrom_callback envrcpt_callback header_callback 'Received: (from root@localhost) by elvirus2.progress.com (8.12.11/8.12.11/Submit) id i5B6Dv5o020589; Fri, 11 Jun 2004 02:13:57 -0400 (EDT)' header_callback 'Date: Fri, 11 Jun 2004 02:13:57 -0400 (EDT)' header_callback 'Message-Id: <200406110613.i5B6Dv5o020589@elvirus2.progress.com>' header_callback 'From: ' header_callback 'To: ' header_callback 'Subject: Testing milter-regex' eoh_callback body_callback: http://www.cyberpromo.com =20 eom_callback close_callback =20 =20 Once I can get this working, what I really want to do is to scan the body for a specific pattern and if found, change the "Subject:" line to: [Likely Junk] =20 either directly or by having milter-regex put in an X-header and then having another milter search for that X-header and then calling the routine smfi_chgheader to change the subject (unless there is a better way to do make this change). =20 =20 Can you help me to figure this out? =20 I am on Solaris 9 using gcc 2.95.2 =20 Thanks for your assistance. =20 =20 -Regis =20 =20