Bug 1099 - [tracker] VMS porting
[tracker] VMS porting
Status: RESOLVED LATER
Product: Spamassassin
Classification: Unclassified
Component: spamassassin
SVN Trunk (Latest Devel Version)
DEC OpenVMS
: P4 minor
: Undefined
Assigned To: SpamAssassin Developer Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2002-10-11 08:31 UTC by David Webb
Modified: 2004-09-02 15:04 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
Patch to make file paths portable patch None Michael Lemke [NoCLA]
DESCRIP.MMS from makefile.pl (KZ) text/plain None Karol E. Zielonko Jr [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description David Webb 2002-10-11 08:31:16 UTC
Myself and others have been trying to build spamassassin 2.42 on VMS with Perl
5.6 and perl 5.8 without success.
I posted to the vmsperl mailing list and received the following response from
Craig Berry (craigberry@mac.com) one of the VMS perl Gurus :-

"
I took a quick look at the Makefile.PL and the postamble section is a
non-portable mess.  There is UNIX file name syntax, UNIX Makefile
syntax, UNIX compiler syntax, and even UNIX commands all over the
place.  The author has essentially treated MakeMaker as a hook upon
which to hang a custom UNIX Makefile.  The first step would be to
rewrite the Makefile.PL more or less from scratch.

On the other hand, we've seen recently on the list that someone did
manage to get the extension built, though I don't know how:

<http://www.xray.mpe.mpg.de/mailing-lists/vmsperl/2002-10/msg00017.html>

On the *other* other hand, there were problems with a waitpid() call
once he got it built.  I'm sure the port is doable, it just looks
like it has not yet been done ant it's not something that can be done
in an hour or two.

"

It turns out the person referred to above hadn't built spamassassin but had
somehow got spamassassin.raw and spamd.raw running but with problems :-

From: Attila.Nohl@eth.ericsson.se

"
In fact, I didn't build it, because on the machine where I tried to
build, I couldn't run mms (there is a security hole in xlib, so the
system administrators removed the exec right from it, and mms is linked
with xlib). What I did was that I ran spamassassin.raw and spamd.raw.
spamassassin.raw worked fine (it complains about some filenames in UNIX
syntax, but that's all), but unfortunately, spamd.raw wants to fork,
and it does not work on VMS.
"

Could someone look at rewriting Makefile.PL to be more portable to non-unix
perl systems and contact Craig or Attila to see how we can workaround the 
waitpid / fork problem.

These problems currently mean that Spamassassin is unusable on VMS.


David Webb
VMS and Unix team leader
CCSS
Middlesex University
Comment 1 Malte S. Stretz 2002-10-11 08:52:42 UTC
I'm currently hacking on Makefile.PL, trying to clean it up a (great) bit. The 
solution for the file name syntax is probably using File::Spec. But I don't 
know anything about the difference between the VMS and the Unix (Gnu?) 
Makefile syntax and which Unix commands Craig talks about (we almost 
everywhere use the Makefile.PL $()s). (And I don't have a VMS box to test on.) 
Could you point me in the right direction? 
Comment 2 Craig A. Berry 2002-10-11 10:16:41 UTC
The File::Spec route sounds good -- banish all slashes.  Be sure to use catdir when the result should be a directory and catfile when the result should be a file.  As far as the unixy stuff in the Makefile.PL, here are a couple of examples:

This is running an external shell script; can it be rewritten in Perl?

binaries.mk: configure
        ./configure

The for -> do -> done stuff is talking to the UNIX shell, not the make utility, as is the $$file variable interpolation.  If this can be done as a Perl one-liner, that would be great, but otherwise an external Perl script should do it:

inst_cfs: $(DEF_RULES_DIR) $(LOCAL_RULES_DIR) $(LOCAL_RULES_DIR)/local.cf
        $(RM_F) $(DEF_RULES_DIR)/*; \
        for file in $(RULES) ; do \
          $(PERL) build/preprocessor $(FIXVARS) <rules/$$file >$(DEF_RULES_DIR)/$$file; \
        done
        $(CHMOD) $(PERM_RW) $(DEF_RULES_DIR)/*

Other things to note.  Continuation lines don't use backslashes on other OS's, so you can't say

target : source
   $(PERL) foo.pl \
                   bar.dat

You have to put it all on one line or (preferably) break it up into multiple one-liners.  You can, however, use backslashes for continuation lines when they are only seen by the make utility and not the shell:

target : source1 \ 
               source2


The directive

    @foo

tells VMS to run a shell script called foo.com.  What you want is a space after the '@':
  
    @ foo

which will tell it to silently execute foo, but of course foo would still have to be a meaningful command to the shell.  And you should really use $(NOECHO) instead of @ anyway.  Be sure to look at the list of basic commands that MakeMaker provides macros for and use them, such as $(TOUCH) instead of touch.

If you can get the Makefile.PL to work properly on Win32 and UNIX without any special case code, then it will probably work on VMS or pretty close to it.  HTH.
Comment 3 Justin Mason 2002-10-18 09:34:45 UTC
I've just checked in some changes to Makefile.PL and the
build tools as suggested.  I've also added an "INSTALL.VMS"
doc, which reads:

Notes on building SpamAssassin on VMS
-------------------------------------

  - Firstly, do not do a default build; this will build a set of C components
    which currently use Autoconf to determine their dependencies, to build
    "spamc".

    Instead, run

        perl Makefile.PL
        make spamassassin

    If you want "spamc" I suggest you provide a replacement header and
    binaries.mk we can use, then we can special-case VMS in Makefile.PL to use
    those instead of running autoconf.

  - The generated Makefile.PL no longer relies on UNIX input/output
    redirection; /bin/sh "for" loops; @foo "silent" directives; backslashed
    continuations; or [ -f foo ] || somecommand conditionals.  At least, not in
    our code any more ;)

  - There are still some UNIX paths inside the generated Makefile:
    "rules/local.cf" for example.  Suggestions on how to work around this
    neatly inside the Makefile syntax while gaining VMS compatibility would be
    welcome!

  - "make test" will probably rely heavily on UNIX-style input and output
    redirection, so will probably still fail.

  - bug 1099 in the SA Bugzilla is being used to track progress.

        http://www.hughes-family.org/bugzilla/show_bug.cgi?id=1099
Comment 4 Justin Mason 2002-10-23 14:48:39 UTC
downgrading and retitling to suit new status as a work-tracker
instead of a bug.
Comment 5 David Webb 2002-10-30 08:40:57 UTC
Subject: Re:  Unable to build Spamassassin 2.42 on VMS

> http://www.hughes-family.org/bugzilla/show_bug.cgi?id=1099

Finally got around to downloading MAIL-SPAMASSASSIN-2_50 and trying to build it
as per the new instructions.

Here is a log of the build this is with Perl v5.6.0 on Alpha VMS 7.3-1.

ALPHA2 System: perl Makefile.PL
Checking if your kit is complete...
Looks good
'PM_FILTER' is not a known MakeMaker parameter name.
Writing Descrip.MMS for Mail::SpamAssassin
ALPHA2 System: mms spamassassin


        made-doc-stamp : doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)
%MMS-W-DRVPARSERR, Parser error: "syntax error" in file
PERL_ROOT:[000000.MAIL-S
PAMASSASSIN-2_50]DESCRIP.MMS;1, line 853.
%MMS-F-DRVBADPARSE, Parser detected a fatal syntax error in the description
file
.
ALPHA2 System:
  

the  makefile  descrip.mms generated was :-



# This Makefile is for the Mail::SpamAssassin extension to perl.
#
# It was generated automatically by MakeMaker version
# 5.45 (Revision: 1.222) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
#	ANY CHANGES MADE HERE WILL BE LOST!
#
#   MakeMaker ARGV: ()
#
#   MakeMaker Parameters:

#	ABSTRACT => q[identify spam mail using text analysis]
#	AUTHOR => q[Justin Mason <jm@jmason.org>]
#	EXE_FILES => [q[spamassassin], q[spamd/spamc$(EXE_EXT)], q[spamd/spamd], q[sa-learn-spam], q[sa-learn-nonspam], q[sa-forget]]
#	MAN1PODS => { sa-learn-nonspam=>q[$(INST_MAN1DIR)/sa-learn-nonspam.$(MAN1EXT)], spamd/spamd=>q[$(INST_MAN1DIR)/spamd.$(MAN1EXT)], sa-forget=>q[$(INST_MAN1DIR)/sa-forget.$(MAN1EXT)], sa-learn-spam=>q[$(INST_MAN1DIR)/sa-learn-spam.$(MAN1EXT)], spamassassin=>q[$(INST_MAN1DIR)/spamassassin.$(MAN1EXT)], spamd/spamc.pod=>q[$(INST_MAN1DIR)/spamc.$(MAN1EXT)] }
#	NAME => q[Mail::SpamAssassin]
#	PL_FILES => {  }
#	PMLIBDIRS => [q[lib]]
#	PM_FILTER => q[$(PERL) build/preprocessor -Mconditional -Mvars -DVERSION=$(VERSION) -DPREFIX="$(PREFIX)"]
#	PREREQ_PM => { Text::Wrap=>q[0], Pod::Usage=>q[0], Errno=>q[0], HTML::Parser=>q[3], File::Spec=>q[0.8], ExtUtils::MakeMaker=>q[5.45], Time::Local=>q[0], File::Copy=>q[0] }
#	VERSION_FROM => q[lib/Mail/SpamAssassin.pm]
#	clean => { FILES=>q[pod2htm* spamassassin sa-forget sa-learn-spam sa-learn-nonspam spamd/spamc$(EXE_EXT) spamd/libspamc.so spamd/spamd doc binaries.mk config.h config.status config.cache config.log] }
#	dist => { DIST_DEFAULT=>q[tardist], COMPRESS=>q[gzip -9f], SUFFIX=>q[gz] }
#	macro => { RULES=>q[10_misc.cf 20_anti_ratware.cf 20_body_tests.cf 20_compensate.cf 20_head_tests.cf 20_meta_tests.cf 20_ratware.cf 20_uri_tests.cf 23_bayes.cf 25_body_tests_es.cf 25_body_tests_pl.cf 25_head_tests_es.cf 25_head_tests_pl.cf 30_text_de.cf 30_text_es.cf 30_text_fr.cf 30_text_pl.cf 40_spam_phrases.cf 50_scores.cf 60_whitelist.cf user_prefs.template triplets.txt languages] }

# --- MakeMaker post_initialize section:


# --- MakeMaker const_config section:

# These definitions are from config.sh (via /perl_root/lib/VMS_AXP/5_6_0/Config.pm)

# They may have been overridden via Makefile.PL or on the command line
AR = 
CC = CC/DECC
CCCDLFLAGS = 
CCDLFLAGS = 
DLEXT = exe
DLSRC = dl_vms.c
LD = Link
LDDLFLAGS = /Share
LDFLAGS = /Debug/Trace/NoMap
LIBC = (DECCRTL)
LIB_EXT = .olb
OBJ_EXT = .obj
OSNAME = VMS
OSVERS = V7.1
RANLIB = 
SO = exe
EXE_EXT = .exe
FULL_AR = 


# --- MakeMaker constants section:
AR_STATIC_ARGS = cr
NAME = Mail::SpamAssassin
DISTNAME = Mail-SpamAssassin
NAME_SYM = Mail_SpamAssassin
VERSION = 2.50
VERSION_SYM = 2_50
XS_VERSION = 2.50
INST_BIN = [.blib.bin]
INST_EXE = [.blib.script]
INST_LIB = [.blib.lib]
INST_ARCHLIB = [.blib.arch]
INST_SCRIPT = [.blib.script]
PREFIX = perl_root
INSTALLDIRS = site
INSTALLPRIVLIB = perl_root:[lib]
INSTALLARCHLIB = perl_root:[lib.VMS_AXP.5_6_0]
INSTALLSITELIB = perl_root:[lib.site_perl]
INSTALLSITEARCH = perl_root:[lib.site_perl.VMS_AXP]
INSTALLBIN = perl_root:[000000]
INSTALLSCRIPT = perl_root:[utils]
PERL_LIB = [-.lib]
PERL_ARCHLIB = [-.lib]
SITELIBEXP = perl_root:[lib.site_perl]
SITEARCHEXP = perl_root:[lib.site_perl.VMS_AXP]
LIBPERL_A = libperl.olb
FIRST_MAKEFILE = Descrip.MMS
MAKE_APERL_FILE = Makeaperl.MMS
PERLMAINCC = $(CC)
PERL_SRC = [-]
PERL_VMS = [-.VMS]
PERL_INC = [-]
PERL = MCR $255$dkb5:[perl-5_6_0]ndbgperl.exe
FULLPERL = MCR $255$dkb5:[perl-5_6_0]ndbgperl.exe

VERSION_MACRO = VERSION
DEFINE_VERSION = "$(VERSION_MACRO)=""$(VERSION)"""
XS_VERSION_MACRO = XS_VERSION
XS_DEFINE_VERSION = "$(XS_VERSION_MACRO)=""$(XS_VERSION)"""

MAKEMAKER = [-.lib.ExtUtils]MakeMaker.pm
MM_VERSION = 5.45
MM_REVISION = 1.222
MM_VMS_REVISION = 5.56 (27-Apr-1999)

# FULLEXT = Pathname for extension directory (eg DBD/Oracle).
# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
# DLBASE  = Basename part of dynamic library. May be just equal BASEEXT.
FULLEXT = [.Mail.SpamAssassin]
VERSION_FROM = [.lib.Mail]SpamAssassin.pm
OBJECT = 
LDFROM = $(OBJECT)
BASEEXT = SpamAssassin
PARENT_NAME = Mail
DLBASE = $(BASEEXT)
LINKTYPE = dynamic


# Handy lists of source code files :
XS_FILES = 
C_FILES  = 
O_FILES  = 
H_FILES  = acconfig.h
MAN1PODS = [.spamd]spamc.pod [.spamd]spamd sa-forget sa-learn-nonspam sa-learn-spam spamassassin
MAN3PODS = [.lib.mail.spamassassin]bayes.pm [.lib.mail.spamassassin]conf.pm [.lib.mail.spamassassin]permsglearner.pm \
	[.lib.mail.spamassassin]permsgstatus.pm [.lib.mail.spamassassin]persistentaddrlist.pm \
	[.lib.mail]spamassassin.pm

INST_MAN1DIR = [.blib.man1]
INSTALLMAN1DIR = perl_root:[man.man1]
MAN1EXT = rno
INST_MAN3DIR = [.blib.man3]
INSTALLMAN3DIR = perl_root:[man.man3]
MAN3EXT = rno

.SUFFIXES :
.SUFFIXES : $(OBJ_EXT) .c .cpp .cxx .xs

# Here is the Config.pm that we are using/depend on
CONFIGDEP = $(PERL_ARCHLIB)Config.pm, $(PERL_INC)config.h $(VERSION_FROM)

# Where to put things :
INST_LIBDIR      = [.blib.lib.Mail]
INST_ARCHLIBDIR  = [.blib.arch.Mail]

INST_AUTODIR     = [.blib.lib.auto.Mail.SpamAssassin]
INST_ARCHAUTODIR = [.blib.arch.auto.Mail.SpamAssassin]

INST_STATIC =
INST_DYNAMIC =
INST_BOOT =
EXPORT_LIST = $(BASEEXT).opt
PERL_ARCHIVE = PERL_ROOT:[000000]DBGPERLSHR.EXE

TO_INST_PM = [.lib.mail.spamassassin]archiveiterator.pm [.lib.mail.spamassassin]auditmessage.pm \
	[.lib.mail.spamassassin]autowhitelist.pm [.lib.mail.spamassassin]bayes.pm [.lib.mail.spamassassin]cmdlearn.pm \
	[.lib.mail.spamassassin]conf.pm [.lib.mail.spamassassin]confsourcesql.pm [.lib.mail.spamassassin]dbbasedaddrlist.pm \
	[.lib.mail.spamassassin]dns.pm [.lib.mail.spamassassin]encappedmessage.pm [.lib.mail.spamassassin]encappedmime.pm \
	[.lib.mail.spamassassin]evaltests.pm [.lib.mail.spamassassin]exposedmessage.pm \
	[.lib.mail.spamassassin]html.pm [.lib.mail.spamassassin]locales.pm [.lib.mail.spamassassin]mailinglist.pm \
	[.lib.mail.spamassassin]message.pm [.lib.mail.spamassassin]nomailaudit.pm [.lib.mail.spamassassin]permsglearner.pm \
	[.lib.mail.spamassassin]permsgstatus.pm [.lib.mail.spamassassin]persistentaddrlist.pm \
	[.lib.mail.spamassassin]phrasefreqs.pm [.lib.mail.spamassassin]replier.pm [.lib.mail.spamassassin]reporter.pm \
	[.lib.mail.spamassassin]sha1.pm [.lib.mail.spamassassin]textcat.pm [.lib.mail]spamassassin.pm

PM_TO_BLIB = [.lib.mail.spamassassin]nomailaudit.pm [.blib.lib.mail.spamassassin]nomailaudit.pm \
	[.lib.mail.spamassassin]phrasefreqs.pm [.blib.lib.mail.spamassassin]phrasefreqs.pm \
	[.lib.mail.spamassassin]sha1.pm [.blib.lib.mail.spamassassin]sha1.pm [.lib.mail.spamassassin]dbbasedaddrlist.pm \
	[.blib.lib.mail.spamassassin]dbbasedaddrlist.pm [.lib.mail.spamassassin]permsgstatus.pm \
	[.blib.lib.mail.spamassassin]permsgstatus.pm [.lib.mail.spamassassin]permsglearner.pm \
	[.blib.lib.mail.spamassassin]permsglearner.pm [.lib.mail.spamassassin]html.pm [.blib.lib.mail.spamassassin]html.pm \
	[.lib.mail.spamassassin]autowhitelist.pm [.blib.lib.mail.spamassassin]autowhitelist.pm \
	[.lib.mail.spamassassin]auditmessage.pm [.blib.lib.mail.spamassassin]auditmessage.pm \
	[.lib.mail.spamassassin]bayes.pm [.blib.lib.mail.spamassassin]bayes.pm [.lib.mail.spamassassin]textcat.pm \
	[.blib.lib.mail.spamassassin]textcat.pm [.lib.mail.spamassassin]archiveiterator.pm \
	[.blib.lib.mail.spamassassin]archiveiterator.pm [.lib.mail.spamassassin]message.pm \
	[.blib.lib.mail.spamassassin]message.pm [.lib.mail.spamassassin]locales.pm [.blib.lib.mail.spamassassin]locales.pm \
	[.lib.mail.spamassassin]replier.pm [.blib.lib.mail.spamassassin]replier.pm [.lib.mail.spamassassin]persistentaddrlist.pm \
	[.blib.lib.mail.spamassassin]persistentaddrlist.pm [.lib.mail.spamassassin]conf.pm \
	[.blib.lib.mail.spamassassin]conf.pm [.lib.mail.spamassassin]reporter.pm [.blib.lib.mail.spamassassin]reporter.pm \
	[.lib.mail.spamassassin]encappedmime.pm [.blib.lib.mail.spamassassin]encappedmime.pm \
	[.lib.mail]spamassassin.pm [.blib.lib.mail]spamassassin.pm [.lib.mail.spamassassin]mailinglist.pm \
	[.blib.lib.mail.spamassassin]mailinglist.pm [.lib.mail.spamassassin]encappedmessage.pm \
	[.blib.lib.mail.spamassassin]encappedmessage.pm [.lib.mail.spamassassin]confsourcesql.pm \
	[.blib.lib.mail.spamassassin]confsourcesql.pm [.lib.mail.spamassassin]exposedmessage.pm \
	[.blib.lib.mail.spamassassin]exposedmessage.pm [.lib.mail.spamassassin]evaltests.pm \
	[.blib.lib.mail.spamassassin]evaltests.pm [.lib.mail.spamassassin]dns.pm [.blib.lib.mail.spamassassin]dns.pm \
	[.lib.mail.spamassassin]cmdlearn.pm [.blib.lib.mail.spamassassin]cmdlearn.pm


# --- MakeMaker tool_autosplit section:

# Usage : $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
AUTOSPLITFILE = $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use AutoSplit; AutoSplit::autosplit($ARGV[0], $ARGV[1], 0, 1, 1) ;"


# --- MakeMaker tool_xsubpp section:


# --- MakeMaker tools_other section:

# Assumes $(MMS) invokes MMS or MMK
# (It is assumed in some cases later that the default makefile name
# (Descrip.MMS for MM[SK]) is used.)
USEMAKEFILE = /Descrip=
USEMACROS = /Macro=(
MACROEND = )
MAKEFILE = Descrip.MMS
SHELL = Posix
TOUCH = $(PERL) -e "$t=time; foreach (@ARGV) { -e $_ ? utime($t,$t,@ARGV) : (open(F,qq(>$_)),close F)}"
CHMOD = $(PERL) -e "chmod @ARGV"
CP = Copy/NoConfirm
MV = Rename/NoConfirm
RM_F  = $(PERL) -e "foreach (@ARGV) { 1 while ( -d $_ ? rmdir $_ : unlink $_)}"
RM_RF = $(PERL) "-I$(PERL_LIB)" -e "use File::Path; @dirs = map(VMS::Filespec::unixify($_),@ARGV); rmtree(\@dirs,0,0)"
SAY = Write Sys$Output
UMASK_NULL = ! 
NOOP = Continue
NOECHO = @ 
MKPATH = Create/Directory
EQUALIZE_TIMESTAMP = $(PERL) -we "open F,qq{>$ARGV[1]};close F;utime(0,(stat($ARGV[0]))[9]+1,$ARGV[1])"
WARN_IF_OLD_PACKLIST = $(PERL) -e "if (-f $ARGV[0]){print qq[WARNING : Old package found ($ARGV[0]); please check for collisions\n]}"
MOD_INSTALL = $(PERL) "-I$(PERL_LIB)" "-MExtUtils::Install" -e "install({split(' ',<STDIN>)},1);"
DOC_INSTALL = $(PERL) -e "@ARGV=split(/\|/,<STDIN>);print '=head2 ',scalar(localtime),' : C<',shift,qq[>\n\n=over 4\n\n];while($key=shift && $val=shift){print qq[=item *\n\nC<$key : $val>\n\n];}print qq[=back\n\n]"
UNINSTALL = $(PERL) "-I$(PERL_LIB)" "-MExtUtils::Install" -e "uninstall($ARGV[0],1,1);"


# --- MakeMaker dist section:

DISTVNAME = Mail-SpamAssassin-2_50
TAR  = tar
TARFLAGS = cvf
ZIP  = zip
ZIPFLAGS = -Vu
COMPRESS = gzip -9f
SUFFIX = gz
SHAR = vms_share
PREOP = @ $(NOOP)
POSTOP = @ $(NOOP)
TO_UNIX = @ $(NOOP)
CI = ci -u
RCS_LABEL = rcs -Nv$(VERSION_SYM) : -q
DIST_CP = best
DIST_DEFAULT = tardist


# --- MakeMaker macro section:
RULES = 10_misc.cf 20_anti_ratware.cf 20_body_tests.cf 20_compensate.cf 20_head_tests.cf 20_meta_tests.cf 20_ratware.cf 20_uri_tests.cf 23_bayes.cf 25_body_tests_es.cf 25_body_tests_pl.cf 25_head_tests_es.cf 25_head_tests_pl.cf 30_text_de.cf 30_text_es.cf 30_text_fr.cf 30_text_pl.cf 40_spam_phrases.cf 50_scores.cf 60_whitelist.cf user_prefs.template triplets.txt languages


# --- MakeMaker depend section:


# --- MakeMaker cflags section:

CCFLAGS = /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/Define=($(DEFINE_VERSION),$(XS_DEFINE_VERSION))/Include=($(PERL_INC))
OPTIMIZE = /Debug/NoOpt
PERLTYPE = 
SPLIT =
LARGE =


# --- MakeMaker const_loadlibs section:


# --- MakeMaker const_cccmd section:


# --- MakeMaker post_constants section:


# --- MakeMaker pasthru section:

PASTHRU = LIB="$(LIB)",\
	LIBPERL_A="$(LIBPERL_A)",\
	LINKTYPE="$(LINKTYPE)",\
	PREFIX="$(PREFIX)",\
	OPTIMIZE="$(OPTIMIZE)"


# --- MakeMaker c_o section:


# --- MakeMaker xs_c section:


# --- MakeMaker xs_o section:


# --- MakeMaker top_targets section:

all :: pure_all manifypods
	$(NOECHO) $(NOOP)

pure_all :: config pm_to_blib subdirs linkext
	$(NOECHO) $(NOOP)

subdirs :: $(MYEXTLIB)
	$(NOECHO) $(NOOP)

config :: $(MAKEFILE) $(INST_LIBDIR).exists
	$(NOECHO) $(NOOP)

config :: $(INST_ARCHAUTODIR).exists
	$(NOECHO) $(NOOP)

config :: $(INST_AUTODIR).exists
	$(NOECHO) $(NOOP)

$(INST_AUTODIR).exists :: [-]perl.h
	@ $(MKPATH) $(INST_AUTODIR)
	@ $(EQUALIZE_TIMESTAMP) [-]perl.h $(INST_AUTODIR).exists

$(INST_LIBDIR).exists :: [-]perl.h
	@ $(MKPATH) $(INST_LIBDIR)
	@ $(EQUALIZE_TIMESTAMP) [-]perl.h $(INST_LIBDIR).exists

$(INST_ARCHAUTODIR).exists :: [-]perl.h
	@ $(MKPATH) $(INST_ARCHAUTODIR)
	@ $(EQUALIZE_TIMESTAMP) [-]perl.h $(INST_ARCHAUTODIR).exists

config :: $(INST_MAN1DIR).exists
	$(NOECHO) $(NOOP)

$(INST_MAN1DIR).exists :: [-]perl.h
	@ $(MKPATH) $(INST_MAN1DIR)
	@ $(EQUALIZE_TIMESTAMP) [-]perl.h $(INST_MAN1DIR).exists

config :: $(INST_MAN3DIR).exists
	$(NOECHO) $(NOOP)

$(INST_MAN3DIR).exists :: [-]perl.h
	@ $(MKPATH) $(INST_MAN3DIR)
	@ $(EQUALIZE_TIMESTAMP) [-]perl.h $(INST_MAN3DIR).exists

help :
	perldoc ExtUtils::MakeMaker

Version_check :
	$(NOECHO) $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -
	"-MExtUtils::MakeMaker=Version_check" -e "&Version_check('$(MM_VERSION)')"


# --- MakeMaker linkext section:

linkext :: $(LINKTYPE)
	@ $(NOOP)


# --- MakeMaker dlsyms section:


# --- MakeMaker dynamic section:

## $(INST_PM) has been moved to the all : target.
## It remains here for awhile to allow for old usage : "make dynamic"
#dynamic :: Descrip.MMS $(INST_DYNAMIC) $(INST_BOOT) $(INST_PM)
dynamic :: Descrip.MMS $(INST_DYNAMIC) $(INST_BOOT)
	@ $(NOOP)


# --- MakeMaker dynamic_bs section:

BOOTSTRAP =


# --- MakeMaker dynamic_lib section:


# --- MakeMaker static section:

## $(INST_PM) has been moved to the all : target.
## It remains here for awhile to allow for old usage : "make static"
#static :: Descrip.MMS $(INST_STATIC) $(INST_PM)
static :: Descrip.MMS $(INST_STATIC)
	@ $(NOOP)


# --- MakeMaker static_lib section:


# --- MakeMaker htmlifypods section:

htmlifypods : pure_all
	@ $(NOOP)


# --- MakeMaker manifypods section:
POD2MAN_EXE = [-.pod]pod2man.com
POD2MAN = $(PERL) -we "%m=@ARGV;for (keys %m){" -
-e "system(""MCR $^X $(POD2MAN_EXE) $_ >$m{$_}"");}"

manifypods : $(MAN1PODS) $(MAN3PODS)
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) [.spamd]spamc.pod [.blib.man1]spamc.rno
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) [.spamd]spamd [.blib.man1]spamd.rno
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) sa-forget [.blib.man1]sa-forget.rno
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) sa-learn-nonspam [.blib.man1]sa-learn-nonspam.rno
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) sa-learn-spam [.blib.man1]sa-learn-spam.rno
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) spamassassin [.blib.man1]spamassassin.rno
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) [.lib.mail.spamassassin]bayes.pm [.blib.man3]mail__spamassassin__bayes.$(MAN3EXT)
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) [.lib.mail.spamassassin]conf.pm [.blib.man3]mail__spamassassin__conf.$(MAN3EXT)
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) [.lib.mail.spamassassin]permsglearner.pm [.blib.man3]mail__spamassassin__permsglearner.$(MAN3EXT)
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) [.lib.mail.spamassassin]permsgstatus.pm [.blib.man3]mail__spamassassin__permsgstatus.$(MAN3EXT)
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) [.lib.mail.spamassassin]persistentaddrlist.pm [.blib.man3]mail__spamassassin__persistentaddrlist.$(MAN3EXT)
	@- If F$Search("$(POD2MAN_EXE)").nes."" Then $(POD2MAN) [.lib.mail]spamassassin.pm [.blib.man3]mail__spamassassin.$(MAN3EXT)


# --- MakeMaker processPL section:


# --- MakeMaker installbin section:

EXE_FILES = spamassassin [.spamd]spamc$(EXE_EXT) [.spamd]spamd sa-learn-spam sa-learn-nonspam sa-forget

all :: $(INST_SCRIPT)sa-learn-nonspam $(INST_SCRIPT)spamd $(INST_SCRIPT)spamc$(EXE_EXT) $(INST_SCRIPT)sa-forget $(INST_SCRIPT)sa-learn-spam $(INST_SCRIPT)spamassassin
	$(NOECHO) $(NOOP)

realclean ::
	$(RM_F)  $(INST_SCRIPT)sa-learn-nonspam $(INST_SCRIPT)spamd $(INST_SCRIPT)spamc$(EXE_EXT)
	$(RM_F) $(INST_SCRIPT)sa-forget $(INST_SCRIPT)sa-learn-spam $(INST_SCRIPT)spamassassin


$(INST_SCRIPT)sa-learn-nonspam : sa-learn-nonspam $(MAKEFILE) [.blib.script].exists
	$(CP) sa-learn-nonspam $(INST_SCRIPT)sa-learn-nonspam


[.blib.script].exists :: [-]perl.h
	@ $(MKPATH) [.blib.script]
	@ $(EQUALIZE_TIMESTAMP) [-]perl.h [.blib.script].exists

$(INST_SCRIPT)spamd : [.spamd]spamd $(MAKEFILE) [.blib.script].exists
	$(CP) [.spamd]spamd $(INST_SCRIPT)spamd


$(INST_SCRIPT)spamc$(EXE_EXT) : [.spamd]spamc$(EXE_EXT) $(MAKEFILE) [.blib.script.spamc$(EXE_EXT)].exists
	$(CP) [.spamd]spamc$(EXE_EXT) $(INST_SCRIPT)spamc$(EXE_EXT)


[.blib.script.spamc_exe].exists :: [-]perl.h
	@ $(MKPATH) [.blib.script.spamc_exe]
	@ $(EQUALIZE_TIMESTAMP) [-]perl.h [.blib.script.spamc_exe].exists

$(INST_SCRIPT)sa-forget : sa-forget $(MAKEFILE) [.blib.script].exists
	$(CP) sa-forget $(INST_SCRIPT)sa-forget


$(INST_SCRIPT)sa-learn-spam : sa-learn-spam $(MAKEFILE) [.blib.script].exists
	$(CP) sa-learn-spam $(INST_SCRIPT)sa-learn-spam


$(INST_SCRIPT)spamassassin : spamassassin $(MAKEFILE) [.blib.script].exists
	$(CP) spamassassin $(INST_SCRIPT)spamassassin



# --- MakeMaker subdirs section:

# none

# --- MakeMaker clean section:

# Delete temporary files but do not touch installed files. We don't delete
# the Descrip.MMS here so that a later make realclean still has it to use.
clean ::
	$(RM_F) *.Map *.Dmp *.Lis *.cpp *.$(DLEXT) *$(OBJ_EXT) *$(LIB_EXT) *.Opt $(BOOTSTRAP) $(BASEEXT).bso .MM_Tmp
	$(RM_RF)  binaries.mk pm_to_blib.ts extralibs.ld [.spamd]spamc.exe sa-learn-spam
	$(RM_RF) spamassassin config.h [.blib.arch.auto.Mail.SpamAssassin]extralibs.all blib
	$(RM_RF) config.cache [.spamd]libspamc.so sa-learn-nonspam perlmain.c pod2htm* sa-forget
	$(RM_RF) Makeaperl.MMS doc config.log config.status [.spamd]spamd


# --- MakeMaker realclean section:

# Delete temporary files (via clean) and also delete installed files
realclean :: clean
	$(RM_RF) $(INST_AUTODIR) $(INST_ARCHAUTODIR)
	$(RM_F)  [.blib.lib.mail]spamassassin.pm
	$(RM_F) [.blib.lib.mail.spamassassin]conf.pm [.blib.lib.mail.spamassassin]dns.pm
	$(RM_F) [.blib.lib.mail.spamassassin]bayes.pm
	$(RM_F) [.blib.lib.mail.spamassassin]persistentaddrlist.pm
	$(RM_F) [.blib.lib.mail.spamassassin]confsourcesql.pm
	$(RM_F) [.blib.lib.mail.spamassassin]cmdlearn.pm
	$(RM_F) [.blib.lib.mail.spamassassin]archiveiterator.pm
	$(RM_F) [.blib.lib.mail.spamassassin]permsgstatus.pm
	$(RM_F) [.blib.lib.mail.spamassassin]evaltests.pm
	$(RM_F) [.blib.lib.mail.spamassassin]exposedmessage.pm Descrip.MMS_old
	$(RM_F) [.blib.lib.mail.spamassassin]sha1.pm [.blib.lib.mail.spamassassin]auditmessage.pm
	$(RM_F) Descrip.MMS [.blib.lib.mail.spamassassin]textcat.pm
	$(RM_F) [.blib.lib.mail.spamassassin]message.pm
	$(RM_F) [.blib.lib.mail.spamassassin]encappedmessage.pm
	$(RM_F) [.blib.lib.mail.spamassassin]permsglearner.pm
	$(RM_F) [.blib.lib.mail.spamassassin]locales.pm [.blib.lib.mail.spamassassin]html.pm
	$(RM_F) [.blib.lib.mail.spamassassin]autowhitelist.pm
	$(RM_F) [.blib.lib.mail.spamassassin]replier.pm
	$(RM_F) [.blib.lib.mail.spamassassin]mailinglist.pm
	$(RM_F) [.blib.lib.mail.spamassassin]encappedmime.pm
	$(RM_F) [.blib.lib.mail.spamassassin]reporter.pm
	$(RM_F) [.blib.lib.mail.spamassassin]phrasefreqs.pm
	$(RM_F) [.blib.lib.mail.spamassassin]nomailaudit.pm
	$(RM_F) [.blib.lib.mail.spamassassin]dbbasedaddrlist.pm


# --- MakeMaker dist_basics section:

distclean :: realclean distcheck
	$(NOECHO) $(NOOP)

distcheck :
	$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Manifest '&fullcheck'; fullcheck()"

skipcheck :
	$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Manifest '&skipcheck'; skipcheck()"

manifest :
	$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Manifest '&mkmanifest'; mkmanifest()"


# --- MakeMaker dist_core section:

dist : $(DIST_DEFAULT)
	$(NOECHO) $(PERL) -le "print 'Warning : $m older than $vf' if -e ($vf = '$(VERSION_FROM)') && -M $vf < -M ($m = '$(MAKEFILE)')"

zipdist : $(DISTVNAME).zip
	$(NOECHO) $(NOOP)

tardist : $(DISTVNAME).tar$(SUFFIX)
	$(NOECHO) $(NOOP)

$(DISTVNAME).zip : distdir
	$(PREOP)
	$(ZIP) "$(ZIPFLAGS)" $(MMS$TARGET) [.$(DISTVNAME)...]*.*;
	$(RM_RF) $(DISTVNAME)
	$(POSTOP)

$(DISTVNAME).tar$(SUFFIX) : distdir
	$(PREOP)
	$(TO_UNIX)
        $(TAR) "$(TARFLAGS)" $(DISTVNAME).tar [.$(DISTVNAME)...]
	$(RM_RF) $(DISTVNAME)
	$(COMPRESS) $(DISTVNAME).tar
	$(POSTOP)

shdist : distdir
	$(PREOP)
	$(SHAR) [.$(DISTVNAME...]*.*; $(DISTVNAME).share
	$(RM_RF) $(DISTVNAME)
	$(POSTOP)


# --- MakeMaker dist_dir section:

distdir :
	$(RM_RF) $(DISTVNAME)
	$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::Manifest '/mani/';" \
	-e "manicopy(maniread(),'$(DISTVNAME)','$(DIST_CP)');"


# --- MakeMaker dist_test section:

disttest : distdir
	startdir = F$Environment("Default")
	Set Default [.$(DISTVNAME)]
	$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" Makefile.PL
	$(MMS)$(MMSQUALIFIERS)
	$(MMS)$(MMSQUALIFIERS) test
	Set Default 'startdir'


# --- MakeMaker dist_ci section:

ci :
	$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=maniread \
		-e "@all = keys %{ maniread() };" \
		-e 'print("Executing $(CI) @all\n"); system("$(CI) @all");' \
		-e 'print("Executing $(RCS_LABEL) ...\n"); system("$(RCS_LABEL) @all");'


# --- MakeMaker install section:

install :: all pure_install doc_install inst_cfs
	$(NOECHO) $(NOOP)

install_perl :: all pure_perl_install doc_perl_install
	$(NOECHO) $(NOOP)

install_site :: all pure_site_install doc_site_install
	$(NOECHO) $(NOOP)

install_ :: install_site
	$(NOECHO) $(SAY) "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"

pure_install :: pure_$(INSTALLDIRS)_install
	$(NOECHO) $(NOOP)

doc_install :: doc_$(INSTALLDIRS)_install
	$(NOECHO) $(SAY) "Appending installation info to $(INSTALLARCHLIB)perllocal.pod"

pure__install : pure_site_install
	$(NOECHO) $(SAY) "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"

doc__install : doc_site_install
	$(NOECHO) $(SAY) "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"

# This hack brought to you by DCL's 255-character command line limit
pure_perl_install ::
	$(NOECHO) $(PERL) -e "print 'read [-.lib.auto.Mail.SpamAssassin].packlist '" >.MM_tmp
	$(NOECHO) $(PERL) -e "print 'write perl_root:[lib.VMS_AXP.5_6_0.auto.Mail.SpamAssassin].packlist '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_LIB) $(INSTALLPRIVLIB) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_ARCHLIB) $(INSTALLARCHLIB) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_BIN) $(INSTALLBIN) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_SCRIPT) $(INSTALLSCRIPT) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_MAN1DIR) $(INSTALLMAN1DIR) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_MAN3DIR) $(INSTALLMAN3DIR) '" >>.MM_tmp
	$(MOD_INSTALL) <.MM_tmp
	$(NOECHO) Delete/NoLog/NoConfirm .MM_tmp;
	$(NOECHO) $(WARN_IF_OLD_PACKLIST) perl_root:[lib.site_perl.VMS_AXP.auto.Mail.SpamAssassin].packlist

# Likewise
pure_site_install ::
	$(NOECHO) $(PERL) -e "print 'read perl_root:[lib.site_perl.VMS_AXP.auto.Mail.SpamAssassin].packlist '" >.MM_tmp
	$(NOECHO) $(PERL) -e "print 'write perl_root:[lib.site_perl.VMS_AXP.auto.Mail.SpamAssassin].packlist '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_LIB) $(INSTALLSITELIB) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_ARCHLIB) $(INSTALLSITEARCH) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_BIN) $(INSTALLBIN) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_SCRIPT) $(INSTALLSCRIPT) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_MAN1DIR) $(INSTALLMAN1DIR) '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print '$(INST_MAN3DIR) $(INSTALLMAN3DIR) '" >>.MM_tmp
	$(MOD_INSTALL) <.MM_tmp
	$(NOECHO) Delete/NoLog/NoConfirm .MM_tmp;
	$(NOECHO) $(WARN_IF_OLD_PACKLIST) [-.lib.auto.Mail.SpamAssassin].packlist

# Ditto
doc_perl_install ::
	$(NOECHO) $(PERL) -e "print 'Module $(NAME)|installed into|$(INSTALLPRIVLIB)|'" >.MM_tmp
	$(NOECHO) $(PERL) -e "print 'LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|$(EXE_FILES)|'" >>.MM_tmp
	$(PERL) -e "print 'spamassassin spamd/spamc$(EXE_EXT) spamd/spamd sa-learn-spam sa-learn-nonspam sa-forget '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print q[@ARGV=split(/\|/,<STDIN>);]" >.MM2_tmp
	$(NOECHO) $(PERL) -e "print q[print '=head2 ',scalar(localtime),' : C<',shift,qq[>\n\n=over 4\n\n];]" >>.MM2_tmp
	$(NOECHO) $(PERL) -e "print q[while(($key=shift) && ($val=shift)) ]" >>.MM2_tmp
	$(NOECHO) $(PERL) -e "print q[{print qq[=item *\n\nC<$key : $val>\n\n];}print qq[=back\n\n];]" >>.MM2_tmp
	$(NOECHO) $(PERL) .MM2_tmp <.MM_tmp >>$(INSTALLARCHLIB)perllocal.pod
	$(NOECHO) Delete/NoLog/NoConfirm .MM_tmp;,.MM2_tmp;

# And again
doc_site_install ::
	$(NOECHO) $(PERL) -e "print 'Module $(NAME)|installed into|$(INSTALLSITELIB)|'" >.MM_tmp
	$(NOECHO) $(PERL) -e "print 'LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|$(EXE_FILES)|'" >>.MM_tmp
	$(PERL) -e "print 'spamassassin spamd/spamc$(EXE_EXT) spamd/spamd sa-learn-spam sa-learn-nonspam sa-forget '" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print q[@ARGV=split(/\|/,<STDIN>);]" >.MM2_tmp
	$(NOECHO) $(PERL) -e "print q[print '=head2 ',scalar(localtime),' : C<',shift,qq[>\n\n=over 4\n\n];]" >>.MM2_tmp
	$(NOECHO) $(PERL) -e "print q[while(($key=shift) && ($val=shift)) ]" >>.MM2_tmp
	$(NOECHO) $(PERL) -e "print q[{print qq[=item *\n\nC<$key : $val>\n\n];}print qq[=back\n\n];]" >>.MM2_tmp
	$(NOECHO) $(PERL) .MM2_tmp <.MM_tmp >>$(INSTALLARCHLIB)perllocal.pod
	$(NOECHO) Delete/NoLog/NoConfirm .MM_tmp;,.MM2_tmp;


uninstall :: uninstall_from_$(INSTALLDIRS)dirs
	$(NOECHO) $(NOOP)

uninstall_from_perldirs ::
	$(NOECHO) $(UNINSTALL) [-.lib.auto.Mail.SpamAssassin].packlist
	$(NOECHO) $(SAY) "Uninstall is now deprecated and makes no actual changes."
	$(NOECHO) $(SAY) "Please check the list above carefully for errors, and manually remove"
	$(NOECHO) $(SAY) "the appropriate files.  Sorry for the inconvenience."

uninstall_from_sitedirs ::
	$(NOECHO) $(UNINSTALL) perl_root:[lib.site_perl.VMS_AXP.auto.Mail.SpamAssassin].packlist

	$(NOECHO) $(SAY) "Uninstall is now deprecated and makes no actual changes."
	$(NOECHO) $(SAY) "Please check the list above carefully for errors, and manually remove"
	$(NOECHO) $(SAY) "the appropriate files.  Sorry for the inconvenience."


# --- MakeMaker force section:
# Phony target to force checking subdirectories.
FORCE :
	@ $(NOOP)


# --- MakeMaker perldepend section:

# Check for unpropagated config.sh changes. Should never happen.
# We do NOT just update config.h because that is not sufficient.
# An out of date config.h is not fatal but complains loudly!
$(PERL_INC)config.h : $(PERL_SRC)config.sh

$(PERL_ARCHLIB)Config.pm : $(PERL_SRC)config.sh
	$(NOECHO) Write Sys$Error "$(PERL_ARCHLIB)Config.pm may be out of date with config.h or genconfig.pl"
	olddef = F$Environment("Default")
	Set Default $(PERL_SRC)
	$(MMS)$(USEMAKEFILE)[.vms]$(MAKEFILE)$(USEMACROS)DECC=1,"CC=CC/DECC"$(MACROEND) [.lib]Config.pm
	Set Default 'olddef'


# --- MakeMaker makefile section:

# We take a very conservative approach here, but it\'s worth it.
# We move $(MAKEFILE) to $(MAKEFILE)_old here to avoid gnu make looping.
$(MAKEFILE) : Makefile.PL $(CONFIGDEP)
	$(NOECHO) $(SAY) "$(MAKEFILE) out-of-date with respect to $(MMS$SOURCE_LIST)"
	$(NOECHO) $(SAY) "Cleaning current config before rebuilding $(MAKEFILE) ..."
	- $(MV) $(MAKEFILE) $(MAKEFILE)_old
	- $(MMS)$(MMSQUALIFIERS) $(USEMAKEFILE)$(MAKEFILE)_old clean
	$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" Makefile.PL 
	$(NOECHO) $(SAY) "$(MAKEFILE) has been rebuilt."
	$(NOECHO) $(SAY) "Please run $(MMS) to build the extension."
	$(NOECHO) spawn/nolog/nonotify exit 44


# --- MakeMaker staticmake section:

# --- MakeMaker makeaperl section ---
MAP_TARGET    = perl

$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
	$(NOECHO) $(SAY) "Writing ""$(MMS$TARGET)"" for this $(MAP_TARGET)"
	$(NOECHO) $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" \
		Makefile.PL DIR= \
		MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
		MAKEAPERL=1 NORECURS=1 

$(MAP_TARGET) :: $(MAKE_APERL_FILE)
	$(MMS)$(MMSQUALIFIERS)$(USEMAKEFILE)$(MAKE_APERL_FILE) static $(MMS$TARGET)



# --- MakeMaker test section:

TEST_VERBOSE = 0
TEST_TYPE = test_$(LINKTYPE)
TEST_FILE = test.pl
TESTDB_SW = -d

test :: $(TEST_TYPE)
	$(NOECHO) $(NOOP)

testdb :: testdb_$(LINKTYPE)
	$(NOECHO) $(NOOP)


test_dynamic :: pure_all
	$(FULLPERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)" \
	-e "use Test::Harness qw(&runtests $verbose); $verbose=$(TEST_VERBOSE); runtests @ARGV;" \
	t/*.t

testdb_dynamic :: pure_all
	$(FULLPERL) "$(TESTDB_SW)" "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" $(TEST_FILE)

test_ : test_dynamic

test_static :: test_dynamic
	$(NOECHO) $(NOOP)

testdb_static :: testdb_dynamic
	$(NOECHO) $(NOOP)


# --- MakeMaker ppd section:
# Creates a PPD (Perl Package Description) for a binary distribution.
ppd :
	@$(PERL) -e "print qq{<SOFTPKG NAME=\"Mail-SpamAssassin\" VERSION=\"2,50,0,0\">\n}. qq{\t<TITLE>Mail-SpamAssassin</TITLE>\n}. qq{\t<ABSTRACT>identify spam mail using text analysis</ABSTRACT>\n}. qq{\t<AUTHOR>Justin Mason &lt;jm\@jmason.org&gt;</AUTHOR>\n}. qq{\t<IMPLEMENTATION>\n}. qq{\t\t<DEPENDENCY NAME=\"Errno\" VERSION=\"0,0,0,0\" />\n}. qq{\t\t<DEPENDENCY NAME=\"ExtUtils-MakeMaker\" VERSION=\"5,45,0,0\" />\n}. qq{\t\t<DEPENDENCY NAME=\"File-Copy\" VERSION=\"0,0,0,0\" />\n}. qq{\t\t<DEPENDENCY NAME=\"File-Spec\" VERSION=\"0,8,0,0\" />\n}. qq{\t\t<DEPENDENCY NAME=\"HTML-Parser\" VERSION=\"3,0,0,0\" />\n}. qq{\t\t<DEPENDENCY NAME=\"Pod-Usage\" VERSION=\"0,0,0,0\" />\n}. qq{\t\t<DEPENDENCY NAME=\"Text-Wrap\" VERSION=\"0,0,0,0\" />\n}. qq{\t\t<DEPENDENCY NAME=\"Time-Local\" VERSION=\"0,0,0,0\" />\n}. qq{\t\t<OS NAME=\"$(OSNAME)\" />\n}. qq{\t\t<ARCHITECTURE NAME=\"VMS_AXP\" />\n}. qq{\t\t<CODEBASE HREF=\"\" />\n}. qq{\t</IMPLEMENTATION>\n}. qq{</SOFTPKG>\n}" > Mail-SpamAssassin.ppd

# --- MakeMaker pm_to_blib section:


# Dummy target to match Unix target name; we use pm_to_blib.ts as
# timestamp file to avoid repeated invocations under VMS
pm_to_blib : pm_to_blib.ts
	$(NOECHO) $(NOOP)

# As always, keep under DCL's 255-char limit
pm_to_blib.ts : $(TO_INST_PM)
	$(NOECHO) $(PERL) -e "print '[.lib.mail.spamassassin]nomailaudit.pm [.blib.lib.mail.spamassassin]nomailaudit.pm'" >.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]phrasefreqs.pm [.blib.lib.mail.spamassassin]phrasefreqs.pm [.lib.mail.spamassassin]sha1.pm [.blib.lib.mail.spamassassin]sha1.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]dbbasedaddrlist.pm [.blib.lib.mail.spamassassin]dbbasedaddrlist.pm [.lib.mail.spamassassin]permsgstatus.pm [.blib.lib.mail.spamassassin]permsgstatus.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]permsglearner.pm [.blib.lib.mail.spamassassin]permsglearner.pm [.lib.mail.spamassassin]html.pm [.blib.lib.mail.spamassassin]html.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]autowhitelist.pm [.blib.lib.mail.spamassassin]autowhitelist.pm [.lib.mail.spamassassin]auditmessage.pm [.blib.lib.mail.spamassassin]auditmessage.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]bayes.pm [.blib.lib.mail.spamassassin]bayes.pm [.lib.mail.spamassassin]textcat.pm [.blib.lib.mail.spamassassin]textcat.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]archiveiterator.pm [.blib.lib.mail.spamassassin]archiveiterator.pm [.lib.mail.spamassassin]message.pm [.blib.lib.mail.spamassassin]message.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]locales.pm [.blib.lib.mail.spamassassin]locales.pm [.lib.mail.spamassassin]replier.pm [.blib.lib.mail.spamassassin]replier.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]persistentaddrlist.pm [.blib.lib.mail.spamassassin]persistentaddrlist.pm [.lib.mail.spamassassin]conf.pm [.blib.lib.mail.spamassassin]conf.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]reporter.pm [.blib.lib.mail.spamassassin]reporter.pm [.lib.mail.spamassassin]encappedmime.pm [.blib.lib.mail.spamassassin]encappedmime.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail]spamassassin.pm [.blib.lib.mail]spamassassin.pm [.lib.mail.spamassassin]mailinglist.pm [.blib.lib.mail.spamassassin]mailinglist.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]encappedmessage.pm [.blib.lib.mail.spamassassin]encappedmessage.pm [.lib.mail.spamassassin]confsourcesql.pm [.blib.lib.mail.spamassassin]confsourcesql.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]exposedmessage.pm [.blib.lib.mail.spamassassin]exposedmessage.pm [.lib.mail.spamassassin]evaltests.pm [.blib.lib.mail.spamassassin]evaltests.pm'" >>.MM_tmp
	$(NOECHO) $(PERL) -e "print ' [.lib.mail.spamassassin]dns.pm [.blib.lib.mail.spamassassin]dns.pm [.lib.mail.spamassassin]cmdlearn.pm [.blib.lib.mail.spamassassin]cmdlearn.pm'" >>.MM_tmp
	$(PERL) "-I$(PERL_LIB)" "-MExtUtils::Install" -e "pm_to_blib({split(' ',<STDIN>)},'[.blib.lib.auto]')" <.MM_tmp
	$(NOECHO) Delete/NoLog/NoConfirm .MM_tmp;
	$(NOECHO) $(TOUCH) pm_to_blib.ts


# --- MakeMaker selfdocument section:


# --- MakeMaker postamble section:

SYSCONFDIR      = /etc
DEF_RULES_DIR	= $(PREFIX)/share/spamassassin
LOCAL_RULES_DIR	= $(SYSCONFDIR)/mail/spamassassin


FIXVARS		= -Mvars \
		  -DVERSION="$(VERSION)" \
		  -DPREFIX="$(PREFIX)" \
		  -DDEF_RULES_DIR="$(DEF_RULES_DIR)" \
		  -DLOCAL_RULES_DIR="$(LOCAL_RULES_DIR)" \
		  -DINSTALLSITELIB="$(INSTALLSITELIB)"



spamassassin : spamassassin.raw
	$(PERL) build/preprocessor $(FIXVARS) -Msharpbang -i$? -o$@
	$(CHMOD) $(PERM_RWX) $@

sa-learn-spam : sa-learn-spam.raw
	$(PERL) build/preprocessor $(FIXVARS) -Msharpbang -i$? -o$@
	$(CHMOD) $(PERM_RWX) $@

sa-learn-nonspam : sa-learn-nonspam.raw
	$(PERL) build/preprocessor $(FIXVARS) -Msharpbang -i$? -o$@
	$(CHMOD) $(PERM_RWX) $@

sa-forget : sa-forget.raw
	$(PERL) build/preprocessor $(FIXVARS) -Msharpbang -i$? -o$@
	$(CHMOD) $(PERM_RWX) $@

spamd/spamd : spamd/spamd.raw
	$(PERL) build/preprocessor $(FIXVARS) -Msharpbang -i$? -o$@
	$(CHMOD) $(PERM_RWX) $@

spamd/libspamc.so : binaries.mk
	$(MAKE) -f binaries.mk $@

spamd/spamc$(EXE_EXT) : binaries.mk
	$(MAKE) -f binaries.mk $@

binaries.mk : configure
	./configure

inst_cfs : $(LOCAL_RULES_DIR) $(LOCAL_RULES_DIR)/local.cf
	$(RM_RF) $(DEF_RULES_DIR)
	$(MKPATH) $(DEF_RULES_DIR)
	$(PERL) build/preprocessor $(FIXVARS) -Irules -O$(DEF_RULES_DIR) $(RULES)
	$(CHMOD) $(PERM_RWX) $(DEF_RULES_DIR)

$(LOCAL_RULES_DIR) :
	$(MKPATH) $@

$(LOCAL_RULES_DIR)/local.cf : rules/local.cf
	$(PERL) -e 'use File::Copy; (-f "$@") or copy ("$?", "$@");'

text_html_doc : made-doc-stamp
	$(NOOP)

doc :
	$(MKPATH) $@

made-doc-stamp : doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)
        $(PERL) build/convert_pods_to_doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)

        $(TOUCH) made-doc-stamp
        $(RM_F) pod2htm*



# End.

Since it was complaining about the last section which just seemed to be about 
documentation I tried just deleting the

made-doc-stamp : doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)
        $(PERL) build/convert_pods_to_doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)

        $(TOUCH) made-doc-stamp
        $(RM_F) pod2htm*

lines and rerunning the make 

With the following results :-

ALPHA2 System: mms spamassassin

MCR $255$dkb5:[perl-5_6_0]ndbgperl.exe build/preprocessor -Mvars
  -DVERSION="2.50"                -DPREFIX="perl_root"           
-DDEF_RULES_DIR="perl_root/share/spamassassin"                 
-DLOCAL_RULES_DIR="/etc/mail/spamassassin"              -DINSTALLSITELIB=-
"perl_root:[lib.site_perl]" -Msharpbang -iSPAMASSASSIN.RAW -oSPAMASSASSIN
%DCL-W-TKNOVF, command element is too long - shorten
 \$255$DKB5:[PERL-5_6_0]NDBGPERL.EXE BUILD/PREPROCESSOR -MVARS -DVERSION="2.50"
-DPREFIX="perl_root" -DDEF_RULES_DIR="perl_root/share/spamassassin"
-DLOCAL_RULES_DIR="/etc/mail/spamassassin" -DINSTALLSITELIB="perl_root:[lib.site_perl]"
-MSHARPBANG -ISPAMA
%MMS-F-ABORT, For target SPAMASSASSIN, CLI returned abort status: %X000382A0.
-CLI-W-TKNOVF, command element is too long - shorten

Unfortunately I know almost nothing about Makefile/MMS syntax.

David Webb
VMS and Unix team leader
CCSS
Middlesex University


> ------- Additional Comments From jm@jmason.org  2002-10-18 09:34 -------
> I've just checked in some changes to Makefile.PL and the
> build tools as suggested.  I've also added an "INSTALL.VMS"
> doc, which reads:

> Notes on building SpamAssassin on VMS
> -------------------------------------

>   - Firstly, do not do a default build; this will build a set of C components
>     which currently use Autoconf to determine their dependencies, to build
>     "spamc".

>     Instead, run

>         perl Makefile.PL
>         make spamassassin

>     If you want "spamc" I suggest you provide a replacement header and
>     binaries.mk we can use, then we can special-case VMS in Makefile.PL to use
>     those instead of running autoconf.

>   - The generated Makefile.PL no longer relies on UNIX input/output
>     redirection; /bin/sh "for" loops; @foo "silent" directives; backslashed
>     continuations; or [ -f foo ] || somecommand conditionals.  At least, not in
>     our code any more ;)

>   - There are still some UNIX paths inside the generated Makefile:
>     "rules/local.cf" for example.  Suggestions on how to work around this
>     neatly inside the Makefile syntax while gaining VMS compatibility would be
>     welcome!

>   - "make test" will probably rely heavily on UNIX-style input and output
>     redirection, so will probably still fail.

>   - bug 1099 in the SA Bugzilla is being used to track progress.

>         http://www.hughes-family.org/bugzilla/show_bug.cgi?id=1099



> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.

Comment 6 David Webb 2002-11-14 06:49:45 UTC
Subject: Re:  Unable to build Spamassassin 2.42 on VMS

> > http://www.hughes-family.org/bugzilla/show_bug.cgi?id=1099

Tried this again and have got it to build correctly.
I had to get rid of the 

made-doc-stamp : doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)
         $(PERL) build/convert_pods_to_doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)

         $(TOUCH) made-doc-stamp
         $(RM_F) pod2htm*

lines. I also replaced the 

 PERL = MCR $255$dkb5:[perl-5_6_0]ndbgperl.exe
 FULLPERL = MCR $255$dkb5:[perl-5_6_0]ndbgperl.exe

with

 PERL = PERL
 FULLPERL = PERL

which works because the PERL symbol is setup on logging in anyway.

This overcame the problem of commandlines being too long.

The next problem was getting the user_prefs file copied across.

In spamassasin.pm I altered the line 


@default_prefs_path = (
        '__local_rules_dir__/user_prefs.template',
        '__prefix__/etc/mail/spamassassin/user_prefs.template',
        '__prefix__/share/spamassassin/user_prefs.template',
        '/etc/spamassassin/user_prefs.template',
        '/etc/mail/spamassassin/user_prefs.template',
        '/usr/local/share/spamassassin/user_prefs.template',
        '/usr/share/spamassassin/user_prefs.template',
 
to

@default_prefs_path = (
        '__local_rules_dir__/user_prefs.template',
        '__prefix__/etc/mail/spamassassin/user_prefs.template',
        '__prefix__/share/spamassassin/user_prefs.template',
        '/etc/spamassassin/user_prefs.template',
        '/etc/mail/spamassassin/user_prefs.template',
        '/usr/local/share/spamassassin/user_prefs.template',
        '/usr/share/spamassassin/user_prefs.template',
        '/perl_root/mail-SPAMASSASSIN-2_50/rules/user_prefs.template',

to give it somewhere to copy the files from.



I then altered the 

@default_userprefs_path = (
@default_userstate_dir = (

lines

to

@default_userprefs_path = (
        'sys$login_root:[spamassassin]user_prefs',
);

@default_userstate_dir = (
        'sys$login_root:[spamassassin]',
);


Where sys$login_root is something I setup in sylogin.com so that it is defined
everytime a user logs in using

$! setup a rooted logical corresponding to the user's login directory
$ a = f$parse("sys$login",,,,"no_conceal") - "][" - "].;" + ".]"
$ define/job/tran=(conc,term) sys$login_root "''a'"

Unfortunately VMS doesn't provide a default rooted logical like this pointing
at each user's home directory so I had to created one. (using a rooted logical
allows you to create sub-directories).
There is probably a much neater way of doing this.

I also added a line to

@default_rules_path = (

to give

@default_rules_path = (
        './rules',              # REMOVEFORINST
        '../rules',             # REMOVEFORINST
        '__def_rules_dir__',
        '__prefix__/share/spamassassin',
        '/usr/local/share/spamassassin',
        '/usr/share/spamassassin',
        '/perl_root/mail-SPAMASSASSIN-2_50/rules',
);
  
To allow it to find the rules if I'm not running it form the spamassasin
directory.


This works if I am in the 
perl_root:[mail-SPAMASSASSIN-2_50] directory and run

perl spamassassin < sample-spam.txt

However if I am working from my home directory and type

perl perl_root:[mail-SPAMASSASSIN-2_50]spamassassin <
PERL_ROOT:[MAIL-SPAMASSASSIN-2_50]sample-spam.txt 

I get 

"
Use of uninitialized value in concatenation (.) at
/perl_root/lib/File/Spec/VMS.pm line 363.
"

it then seems to run correctly.

Same happens if I copy the sample-spam.txt file to my home directory and then
run from my home directory

perl perl_root:[mail-SPAMASSASSIN-2_50]spamassassin < SAMPLE-SPAM.TXT

This suggests there is some other file spamassasin needs a path to which is OK
when I'm in the spamassassin directory but not found if I am elsewhere.



David Webb
VMS and Unix team leader
CCSS
Middlesex University

Comment 7 Michael Lemke 2003-06-09 06:45:27 UTC
I am making some progress of getting this to work.
Current problem for which I'd like some 
input:

On VMS a directory can't have a dot in its name.  Therefore, ~/.spamassassin
can't 
be used.  What is the best way to change this to, say, ~/_spamassassin?
The most obvious to me is 
spamassassin.pm but I found several places where
it is used.  The worst I found is $ENV{'HOME'} 
. '.spamassassin' (somewhere
with bayes filters).  That doesn't work at all as HOME evaluates 
to DISK:[USER]
and you get a mixed path.

Is there some other configuartion place where it 
can be set?

Thanks,
Michael
Comment 8 Michael Lemke 2003-07-29 12:51:34 UTC
Created attachment 1191 [details]
Patch to make file paths portable

Attached is a patch for spamassassin.raw against SA 2.55.  It uses
File::Spec for all paths.  This is required for VMS but not VMS specific.

This is first step at making SA run on VMS.  I have it working now but still
needs a lot of clean up and fixing things I missed.  spamc/spamd I don't have
yet and probably I never will.

I have a working Makefile.PL but it's still a mess.  All tests except
spamc/spamd work.

I'll send more as time and work permits.

Michael
Comment 9 Karol E. Zielonko Jr 2003-09-18 12:15:19 UTC
Hi,

I am trying to get SA working on an AXP running VMS 7.2-2

I fetched SA 2.55 from:

http://us.spamassassin.org/released/Mail-SpamAssassin-2.55.zip

I have Perl 5.6.1 installed which I got from:

  ftp://ftp.sidhe.org/perl-5_6_1-vmsaxp-7_2-1.zip

After unpacking the SA kit I did PERL MAKEFILE.PL as directed by INSTALL.VMS.
Its output follows:

begin snippet ----------------------------------------
KZAXP> perl Makefile.PL
Checking if your kit is complete...
Warning: the following files are missing in your kit:
        binaries.mk_in
        config.h_in
        contrib/snp.tar_gz
        lib/mail/spamassassin/persistentaddrlist.pm
        old/changes.before-2002-06-18_gz
Please inform the author.

Warning: I could not locate your pod2man program.  As a last choice,
         I will look for the file to which the logical name POD2MAN
         points when MMK is invoked.

Writing Descrip.MMS for Mail::SpamAssassin
KZAXP>
end snippet ----------------------------------------
*******************************************************************************
*

Regarding the missing files:

I believe the missing files (except for persistentaddrlist.pm) are cases of
jumbled expectations of the proper handling of Unix-style filenames with
multiple dots. As you all probably know VMS doesn't allow a dot in a filename.
It seems the check in makefile.pl expects the VMS UNZIP to preserve the first 
of
multiple dots in a file name and change the rest to underbars but the unzip I
have preserves the last dot and changes the rest to underbars. For example the
check in makefile.pl is looking for binaries.mk_in but UNZIP created
binaries_mk.in. I fixed this problem by renaming the files in question.

For the record the UNZIP variant I have installed is:

  KZAXP> unzip -h
  UnZip:  Zipfile Extract v5.0 of 21 August 1992;  (c) 1989 S.H.Smith and 
others
  Versions 3.0 and later by Info-ZIP.  Bug reports ONLY to zip-bugs@cs.ucla.edu
  ...snip...

I suppose if there are differing expectations of how to handle replacement of
dots with underbars the check could be changed to look for one and then the
other and use the one it actually finds or rename the file to the file name it
expects.

Regarding persistentaddrlist.pm. The UNZIP yielded the following error for this
file:

invalid argument
mapame:  unable to process [Mail-SpamAssassin-
2.55/lib/Mail/SpamAssassin/PersistentAddrList.pm]

However an unzip -t shows it as "OK". I then went back and specifically
extracted the file as follows and it worked:

  unzip MAIL-SPAMASSASSIN-2_55.ZIP "Mail-SpamAssassin-
2.55/lib/Mail/SpamAssassin/PersistentAddrList.pm"

It was a good idea to make the kit check to see if files are missing.
*******************************************************************************
*

Regarding the missing pod2man that was, I believe, due to my not having set up
the pod2man program's symbols and logicals. I did it in SYLOGIN.COM this way:

  $       DEFINE/NOLOG POD2MAN PERL_ROOT:[UTILS]POD2MAN.COM
  $       POD2MAN :== $PERL_ROOT:[000000]PERL.EXE POD2MAN

as instructed at http://www.sidhe.org/vmsperl/prebuilt_perl_5_005_readme.txt.

Once I set pod2man up this way the perl makefile.pl worked without throwing
errors.

*******************************************************************************
*

However now when I run the descrip.mms file output from "perl makefile.pl" it
dies very soon on.

The MAKE I use identifies itself as:

  MAKE/VMS V3.4-2 (C)1986,1989 by Todd Aven, the Software Sweatshop, NY

LASSIE> make/in=descrip/debug/verif spamassassin
**************** Parsing rules file(s) ********************
****************** Making target(s) ***********************
Making spamassassin
try_default("spamassassin")
new_file("spamassassin")
File date check, filename = spamassassin.
Module spamassassin revision time: Thu Jan  1 00:00:00 1970
Object doesn't exist: "spamassassin"
%MAKE, spamassassin doesn't exist and couldn't be made.
%NONAME-E-NOMSG, Message number 00000002

The descrip.mms file does contain the lines:

spamassassin : spamassassin.raw
        $(PERL) build/preprocessor $(FIXBYTES) $(FIXVARS) $(FIXBANG) -i$? -o$@
        $(CHMOD) $(PERM_RWX) $@

which looks like a spamassassin target to me. I will attach the full
descrip.mms. Can anyone make any suggestions as to how I should proceed?

--------------------------------------------------------------------------

If I invoke the spamassassin.raw I get:

LASSIE> perl spamassassin.raw
Too late for "-T" option at spamassassin.raw line 1.
%SYSTEM-F-ABORT, abort

OK. So I make this simple change:

LASSIE> dif spamassassin.raw
************
File UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]SPAMASSASSIN.RAW;2
    1   #!/usr/bin/perl
    2
******
File UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]SPAMASSASSIN.RAW;1
    1   #!/usr/bin/perl -w -T
    2
************

Number of difference sections found: 1
Number of difference records found: 1

I removed the "-w -T". Am I doing something wrong that this edit is required 
or should this code be changed, made compatible with VMS?

Once I make that small change I run it again and it kinda works. First it 
throws a slew of errors which seem to be connected to the absence of Michael
Lemke's patch (See below) but then it spits out the MIME message with the 
outer headers being the SA created SPAM report and the orginal SPAM being 
encoded as an attachment. This part looks good!

LASSIE> perl spamassassin.raw < SAMPLE-SPAM.TXT
security: cannot untaint path: "WORK10$:[ZIELONKO]/.spamassassin"
security: cannot untaint path: "WORK10$:[ZIELONKO]/.spamassassin/user_prefs"
security: cannot untaint path: "WORK10$:[ZIELONKO]/.spamassassin"
Cannot open /usr/share/spamassassin/user_prefs.template: file specification 
syntax error
Failed to create default user preference file WORK10$:
[ZIELONKO]/.spamassassin/user_prefs
security: cannot untaint path: "WORK10$:[ZIELONKO]/.spamassassin"
security: cannot untaint path: "WORK10$:[ZIELONKO]/.spamassassin/bayes"
Received: from localhost [127.0.0.1] by lassie.ucx.lkg.dec.com
        with SpamAssassin (2.55 1.174.2.19-2003-05-19-exp);
        Thu, 18 Sep 2003 15:02:22 -0400
From: xl6Ety00V@fismat1.fcfm.buap.mx
To: undisclosed-recipients: ;
Subject: Home Based Business for Grownups
Date: 21 Jan 01 8:24:27 PM
Message-Id: <N1msdrbJXNPfV4wg9>
X-Spam-Flag: YES
X-Spam-Status: Yes, hits=6.9 required=5.0
        tests=DATE_IN_PAST_12_24,DRASTIC_REDUCED,HOME_EMPLOYMENT,
              INVALID_DATE,INVALID_MSGID,NO_REAL_NAME,ONCE_IN_LIFETIME,
              REMOVE_SUBJ,UNDISC_RECIPS
        version=2.55
X-Spam-Level: ******
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_3F6A013E.3A2FB604"

...snip...

-------------------------------------------------------------------------------
-
One more question. Pardon my ignorance. Michael Lemke posted a "patch to
spamassassin.raw as:

  http://bugzilla-new.spamassassin.org//attachment.cgi?id=1191&action=view

which appears to be a seqeuence of edits required on the spamassassin.raw file.
Is it expected that to "apply" the patch we must manually make those edits or 
is
the new spamassassin.raw available or perhaps there is a tool that can read
this "patch" file and make the edits? 
--------------------------------------------------------------------------

The last issue I had was around how folks are tying SA into their VMS mail
environment. There are no "builtins" that allow this to happen unless maybe 
the third party tool PMDF is being used. Maybe it has them.

I should say that I am the engineer who works on the SMTP code of the TCP/IP
Services for OpenVMS product and can create some sort of plug in capability in
that code because I own it. ;^) I am open to suggestions.

For the Unix-to-VMS port of majordomo I implemented a
feature for VMS mail not unlike Unix's aliases file capability where a mail is
piped into a program. It's called PIPE MAILSHR and is the means used to pipe a
mail for the list or for majordomo into the associated perl script. PIPE 
MAILSHR is a general purpose lego block for this type of thing and may be one 
way to pipe incoming mail for a given user into the SA script.

Other (not mutually exclusive BTW) options would be to put hooks in our SMTP
receiver, the SMTP symbiont or maybe move it off to the POP or IMAP servers.

Thanks in advance,

Karol Zielonko
Comment 10 Karol E. Zielonko Jr 2003-09-19 05:23:20 UTC
Created attachment 1402 [details]
DESCRIP.MMS from makefile.pl (KZ)

Here is the DESCRIP.MMS file produced by the PERL MAKEFILE.PL command
on my VMS 7.2-2 system.
Comment 11 Karol E. Zielonko Jr 2003-09-19 16:43:18 UTC
I manually edited in the changes from Michael Lemke's patch:

  http://bugzilla-new.spamassassin.org//attachment.cgi?id=1191&action=view

but when I re-ran spamassassin.raw it had no discernable affect.

I have also found that I must be SET DEF'd to the SA top level directory in
order for "perl spamassassin < sample-spam.txt" If I set the default directory
elsewhere I have the same problem described by David Webb in comment #6.

*******************************************************************************
*
QUESTION: Is it advisable to make my SA top level directory a sub directory of
my VMS PERL_ROOT directory? I see that is what David Webb has done. Is this
required? Advisable? Up to this point I haven't done it that way. I have Perl
and SA set up like this:

LASSIE> dir *perl*.dir

Directory UCXAXP$DKB0:[000000]

PERL-5_6_1.DIR;1           1  17-SEP-2003 13:51:37.49

Total of 1 file, 1 block.
LASSIE> dir *spam*.dir

Directory UCXAXP$DKB0:[000000]

MAIL-SPAMASSASSIN-2_55.DIR;1
                           4  17-SEP-2003 13:11:45.41

Total of 1 file, 4 blocks.
*******************************************************************************
*

Next I started work on trying to get the DESCRIP.MMS file to do whatever it is
supposed to be doing. I saw that David Webb qwas running a straight VMS MMS
command on it and tried it and got farther there than with MAKE.

First I got the syntax error that David Webb saw with the made-doc-stamp 
target.
This was caused by an extraneous blank line after a $(PERL) command and before 
a
$(TOUCH) command:

made-doc-stamp : doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)
        $(PERL) build/convert_pods_to_doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)

        $(TOUCH) made-doc-stamp
        $(RM_F) pod2htm*

Perhaps this part of makefile.pl is the possible source of this problem.
Maybe this cryptic line below starting with "# : ''"

made-doc-stamp: doc#. ($gotpods ? q# $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)
        $(PERL) build/convert_pods_to_doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)
        # : '') . q#                    <<<---this stufF, KZ???
        $(TOUCH) made-doc-stamp
        $(RM_F) pod2htm*

--------------------
I tested the above with mms/noaction/log /verify made-doc-stamp and then got a
problem with a missing file:

LASSIE>  mms/noaction/log /verify made-doc-stamp
%MMS-I-DRVOUTFIL, Using output file SYS$OUTPUT:.;
%MMS-I-DRVDEPFIL, Using description file
UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]DESCRIP.MMS;2
%MMS-I-DRVNOFMSSUP, MMS is installed without support for FMS.
%MMS-I-DRVSUBCLI, Using DCL for the subprocess CLI.
%MMS-I-DRVQUALIF, Using non-defaulted qualifiers /NoAction/Log
%MMS-I-GWKBEGWLK, Starting the build at target MADE-DOC-STAMP
%MMS-I-GMTIMFND, Time for DOC is 17-NOV-1858 00:00:00.00
%MMS-I-GWKWILLEX, MMS will try executing action line to update target DOC

Create/Directory DOC
%MMS-I-GWKUPDONE, Completed update for target DOC
%MMS-I-GMTIMFND, Time for [.SPAMD]SPAMC.POD is 17-SEP-2003 13:21:29.71
%MMS-I-GMTIMFND, Time for [.SPAMD]SPAMD is 17-NOV-1858 00:00:00.00
%MMS-F-GWKNOPRN, There are no known sources for the current target [.SPAMD]
SPAMD

In MMS you get "There are no known sources for the current target" when the 
file
it's looking for is not there.

I looked in descrip.mms and it seems like this is caused by an expansion of the
$(MAN1PODS) macro which is set up like this:

...snip...
MAN1PODS = [.spamd]spamc.pod [.spamd]spamd sa-learn spamassassin
MAN3PODS = [.lib.mail.spamassassin]autowhitelist.pm [.lib.mail.spamassassin]
bayes.pm [.lib.mail.spamassassin]conf.pm \
        [.lib.mail.spamassassin]confsourcesql.pm [.lib.mail.spamassassin]
permsglearner.pm \
        [.lib.mail.spamassassin]permsgstatus.pm [.lib.mail.spamassassin]
persistentaddrlist.pm \
        [.lib.mail]spamassassin.pm
...snip...
MAN1EXT = rno
...snip...
made-doc-stamp : doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)
        $(PERL) build/convert_pods_to_doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS)
        $(TOUCH) made-doc-stamp
        $(RM_F) pod2htm*

In the definition of MAN1PODS there are three files without file extensions -
[.spamd]spamd, sa-learn and spamassassin. I noticed that files in these
directories by these names all exist with the .RAW extension. Eg. there is no
[.spamd]spamd file but there is a [.spamd]spamd.raw file.

----
In makefile.pl there is

    'MAN1PODS' => {
        'spamassassin'    => '$(INST_MAN1DIR)/spamassassin.$(MAN1EXT)',
        'sa-learn'        => '$(INST_MAN1DIR)/sa-learn.$(MAN1EXT)',
        'spamd/spamc.pod' => '$(INST_MAN1DIR)/spamc.$(MAN1EXT)',
        'spamd/spamd'     => '$(INST_MAN1DIR)/spamd.$(MAN1EXT)',
    },

but the string "MAN1EXT" doesn't appear anywhere else in the file.
Strangely somehow as I showed above the DESCRIP.MMS file does contain a
definition of MAN1EXT = rno. Of course descrip.mms has no references to this
MAN1EXT string anywhere and why is it .rno when the files we seem to want are
.raw?

Regardless of that I manually changed this line in descrip.mms:

MAN1PODS = [.spamd]spamc.pod [.spamd]spamd sa-learn spamassassin

to this:

MAN1PODS = [.spamd]spamc.pod [.spamd]spamd.raw sa-learn.raw spamassassin.raw

*******************************************************************************
*

Then I tried mms/noaction/log /verify spamassassin but I saw these strange
references to "/BRIANA$DKA0/CRAIG/PERLBUILD/PERL" in some crazy long command it
was trying to issue. Trace them to this in descrip.mms:

PREFIX = /BRIANA$DKA0/CRAIG/PERLBUILD/PERL/
INST_PREFIX             = /BRIANA$DKA0/CRAIG/PERLBUILD/PERL/

I went through a few iterations then re-running perl makefile.pl passing it
command line values for various symbols like PREFIX, pointing them to my SA top
level directory in different ways but the end result was always the same - DCL
error because the DCL command the MMS file was trying to issue was too long.
(BTW> Each time I did this and generated a new descrip.mms I had to manually
re-edit it to remove the extraneous blank line and changes the MAN1PODS line.)

For example:

  $ def/sys/tran=conc spama_root common_sysdisk:[MAIL-SPAMASSASSIN-2_55.]
  $ def/sys sa spama_root:[000000]
  $ def/sys sc spama_root:[ETC]
  $ def/sys sd spama_root:[SHARE.SPAMASSASSIN]
  $ def/sys sl spama_root:[MAIL.SPAMASSASSIN]
  $ perl makefile.pl PREFIX=sa SYSCONFDIR=sc DEF_RULES_DIR=sd 
LOCAL_RULES_DIR=sl
  Checking if your kit is complete...
  Looks good
  Writing Descrip.MMS for Mail::SpamAssassin

But when I try to MMS the resulting MMS file it is generating a huge perl
command to run  build/preprocessor:
LASSIE> mms/log/verify spamassassin/noact
%MMS-I-DRVOUTFIL, Using output file SYS$OUTPUT:.;
%MMS-I-DRVDEPFIL, Using description file UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]
DESCRIP.MMS;2
%MMS-I-DRVNOFMSSUP, MMS is installed without support for FMS.
%MMS-I-DRVSUBCLI, Using DCL for the subprocess CLI.
%MMS-I-DRVQUALIF, Using non-defaulted qualifiers /NoAction/Log
%MMS-I-GWKBEGWLK, Starting the build at target SPAMASSASSIN
%MMS-I-GMTIMFND, Time for SPAMASSASSIN.RAW is 19-SEP-2003 08:36:27.03
%MMS-I-GMTIMFND, Time for SPAMASSASSIN is 17-NOV-1858 00:00:00.00
%MMS-I-GWKOLDNOD, Target SPAMASSASSIN is older than SPAMASSASSIN.RAW
%MMS-I-GWKWILLEX, MMS will try executing action line to update target 
SPAMASSASSIN

perl build/preprocessor -Mbytes                   -DPERL_VERSION="this" -
Mvars            -DVERSION="2.55"                -DPREFIX="
sa"               -DDEF_RULES_DIR="sd"            -
DLOCAL_RULES_DIR="sl"                  -DINSTALLSITELIB="perl_root:
[lib.site_perl
]" -Msharpbang            -DPERL_BIN="this"               --
DPERL_WARN="auto" -iSPAMASSASSIN.RAW -oSPAMASSASSIN
perl -e "chmod @ARGV"  SPAMASSASSIN
%MMS-I-GWKUPDONE, Completed update for target SPAMASSASSIN


That first perl command is way too long even though I've made the logical names
very short to try to squeeze under the limit.

David Webb thought he solved this problem but I suspect that was only because 
he
had an earlier version of SA. The new version creates a much longer command
line. (I checked his DESCRIP.MMS file.)

Any ideas as to how I can work around this and perhaps how the base kit can be
modified to solve this?

Comment 12 Karol E. Zielonko Jr 2003-09-22 04:38:58 UTC
Hi,

More progress made. The build/preprocessor script, which is what we're trying 
to
invoke on one, too-long-for-VMS long command line, can be invoked multiple 
times
each time with the output of the previous run being the input to the current
run. This string of invocations yields the same overall affect as passing all
the command line options with the one invocation.

There are certain of the options that must be grouped together but fortunately
none requiring so many characters as to overflow VMS's 255 character command
line limit. As I understand it the -Mbytes must come along with -DPERL_VERSION
and -Msharpbang must come with -DPERL_BIN and -DPERL_WARN. Please correct me
anyone if I got that wrong. The rest of the symbol definitions come with the
-Mvars.

I first did these commands in a .COM file:

$ perl build/preprocessor "-Mbytes" "-DPERL_VERSION=this" -iSPAMASSASSIN.RAW -
oSPAMASSASSIN.RAW1
$ perl build/preprocessor "-Msharpbang"  "-DPERL_BIN=this" "-DPERL_WARN=auto" -
iSPAMASSASSIN.RAW1 -oSPAMASSASSIN.RAW2
$ perl build/preprocessor "-Mvars" "-DVERSION=2.55" "-DPREFIX=sa" "-
DDEF_RULES_DIR=sd" "-DLOCAL_RULES_DIR=sl" -
"-DINSTALLSITELIB=perl_root:[lib.site_perl]" -iSPAMASSASSIN.RAW2 -oSPAMASSASSIN
$DIR/FULL SPAMASSASSIN.
$ perl -e "chmod @ARGV"  SPAMASSASSIN

On the first invocation we pass the output to .RAW1 and then RAW1 is the input
to the second invocations and raw2 is the output...

Note that the change was not simply to break the single invocation of
build/preprocessor into multiple lines but also to monkey around with the use 
of
double quotes. On VMS invoking something from the command line in this fashion
causes the data being passed to the invoked program to be down cased. (Actually
I'm not dead certain sure in this case if it's VMS or VMS Perl doing this.) 
This
means that if you did:

  $ perl build/preprocessor -Mbytes -DPERL_VERSION="this" -iSPAMASSASSIN.RAW -
oSPAMASSASSIN.RAW1

The preprocessor perl script would actually see:

  -mbytes -dperl_version="this" -ispamassassin.raw -ospamassassin.raw1

If you want case to be preserved  you need to do this as I have done above:

  $ perl build/preprocessor "-Mbytes" "-DPERL_VERSION=this" -
iSPAMASSASSIN.RAW -oSPAMASSASSIN.RAW1

Note: I originally tried to do it like this (note the handling of
-DPERL_VERSION):

  $ perl build/preprocessor "-Mbytes" "-DPERL_VERSION=""this""" -
iSPAMASSASSIN.RAW -oSPAMASSASSIN.RAW1
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^
thinking that I needed to have the script see -DPERL_VERSION="this", ie.
thinking it needed this in double quotes. I found that just passing it like
"-DPERL_VERSION=this" also worked (apparently) and doing it that way saves four
bytes per symbol in the command line.

I didn't bother enclosing the -i and -o in double quotes because those options
are already lower case so lose nothing when down cased. Since VMS's file names
are not case-sensitive the fact that we see "-ispamassassin.raw" is just the
same functionaly as -iSPAMASSASSIN.RAW. Skipping the double quotes here allows
us to save four bytes.

--------------------
I then manually edited the DESCRIP.MMS file to do the same thing I did in my
test .COM procedure. For the record here is a screen shot of the run of the new
DESCRIP.MMS file:

LASSIE> reca mms
LASSIE> mms/log /verify spamassassin
%MMS-I-DRVOUTFIL, Using output file SYS$OUTPUT:.;
%MMS-I-DRVDEPFIL, Using description file UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]
DESCRIP.MMS;6
%MMS-I-DRVNOFMSSUP, MMS is installed without support for FMS.
%MMS-I-DRVSUBCLI, Using DCL for the subprocess CLI.
%MMS-I-DRVQUALIF, Using non-defaulted qualifiers /Log
%MMS-I-GWKBEGWLK, Starting the build at target SPAMASSASSIN
%MMS-I-GMTIMFND, Time for SPAMASSASSIN.RAW is 19-SEP-2003 08:36:27.03
%MMS-I-GMTIMFND, Time for SPAMASSASSIN is 17-NOV-1858 00:00:00.00
%MMS-I-GWKOLDNOD, Target SPAMASSASSIN is older than SPAMASSASSIN.RAW
%MMS-I-GWKWILLEX, MMS will try executing action line to update target 
SPAMASSASSIN

perl build/preprocessor "-Mbytes"                 "-DPERL_VERSION=this" -
iSPAMASSASSIN.RAW -oSPAMASSASSIN.raw1
%MMS-I-EXEPROCID, PID of created subprocess is %X2D60AF34.
%MMS-I-GWKEXESTS, Status of executed command is %X00000001.
-SYSTEM-S-NORMAL, normal successful completion

perl build/preprocessor "-Msharpbang"             "-
DPERL_BIN=this"               "-DPERL_WARN=auto" -iSPAMASSASSIN.RAW1 -
oSPAMASSAS
SIN.raw2
Use of uninitialized value in concatenation (.) or string at 
build/preprocessor line 148, <STDIN> line 1.
%MMS-I-GWKEXESTS, Status of executed command is %X00000001.
-SYSTEM-S-NORMAL, normal successful completion

perl build/preprocessor "-Mvars"                  "-
DVERSION=2.55"                "-DPREFIX=sa"                   "-
DDEF_RULES_DIR=s
d"                "-DLOCAL_RULES_DIR=sl"                  "-
DINSTALLSITELIB=perl_root:[lib.site_perl]" -iSPAMASSASSIN.RAW2 -oSPAMASS
ASSIN
%MMS-I-GWKEXESTS, Status of executed command is %X00000001.
-SYSTEM-S-NORMAL, normal successful completion

perl -e "chmod @ARGV"  SPAMASSASSIN
%MMS-I-GWKEXESTS, Status of executed command is %X00000001.
-SYSTEM-S-NORMAL, normal successful completion
%MMS-I-GWKUPDONE, Completed update for target SPAMASSASSIN
LASSIE>
*******************************************************************************
*


And here are the differences from the edits to DESCRIP.MMS from a VMS DIFF
command. The new file is DESCRIP.MMS;6 and the old is DESCRIP.MMS;2:

begin differences 
**************************************************************
************
File UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]DESCRIP.MMS;6
  794   FIXVARS         = "-Mvars" \
  795                     "-DVERSION=$(VERSION)" \
  796                     "-DPREFIX=$(INST_PREFIX)" \
  797                     "-DDEF_RULES_DIR=$(DEF_RULES_DIR)" \
  798                     "-DLOCAL_RULES_DIR=$(LOCAL_RULES_DIR)" \
  799                     "-DINSTALLSITELIB=$(INST_SITELIB)"
  800
  801   FIXBYTES        = "-Mbytes" \
  802                     "-DPERL_VERSION=$(PERL_VERSION)"
  803
  804   FIXBANG         = "-Msharpbang" \
  805                     "-DPERL_BIN=$(PERL_BIN)" \
  806                     "-DPERL_WARN=$(PERL_WARN)"
  807
******
File UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]DESCRIP.MMS;2
  794   FIXVARS         = -Mvars \
  795                     -DVERSION="$(VERSION)" \
  796                     -DPREFIX="$(INST_PREFIX)" \
  797                     -DDEF_RULES_DIR="$(DEF_RULES_DIR)" \
  798                     -DLOCAL_RULES_DIR="$(LOCAL_RULES_DIR)" \
  799                     -DINSTALLSITELIB="$(INST_SITELIB)"
  800
  801   FIXBYTES        = -Mbytes \
  802                     -DPERL_VERSION="$(PERL_VERSION)"
  803
  804   FIXBANG         = -Msharpbang \
  805                     -DPERL_BIN="$(PERL_BIN)" \
  806                     -DPERL_WARN="$(PERL_WARN)"
  807
************
************
File UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]DESCRIP.MMS;6
  813           $(PERL) build/preprocessor $(FIXBYTES) -i$? -o$@.raw1
  814           $(PERL) build/preprocessor $(FIXBANG) -i$?1 -o$@.raw2
  815           $(PERL) build/preprocessor $(FIXVARS) -i$?2 -o$@
  816           $(CHMOD) $(PERM_RWX) $@
******
File UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]DESCRIP.MMS;2
  813           $(PERL) build/preprocessor $(FIXBYTES) $(FIXVARS) $(FIXBANG) -
i$? -o$@
  814           $(CHMOD) $(PERM_RWX) $@
************

Number of difference sections found: 2
Number of difference records found: 16

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]
DESCRIP.DIF;2-
    UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]DESCRIP.MMS;6-
    UCXAXP$DKB0:[MAIL-SPAMASSASSIN-2_55]DESCRIP.MMS;2
end 
differences*****************************************************************

So another request for an enhancement to the makefile.pl script for VMS
compatiblility - to produce a DESCRIP.MMS that reflects the changes I made 
here.
I would have taken this change all the way back to makefile.pl myself (and the
other makefile.pl changes too) except that I don't understand how that thing
works.

*******************************************************************************
*

Next I will look more at running the spamassassin file output by the
preprocessor. I need to figure out where all these symbols (eg. DEF_RULES_DIR)
are being used so I can determine if the Perl code in spamsassassin is actually
finding the files in those directories or if there are still syntax errors. 
Also
need to solve these:

  security: cannot untaint path: "WORK10$:[ZIELONKO]/.spamassassin"

etc... errors.

Karol Zielonko
Comment 13 Malte S. Stretz 2003-09-22 10:43:09 UTC
Karol, I will have a look at the Makefile.PL stuff. But it might take a few 
days :)  
 
You don't accidently have a VMS box available where I could get a shell 
account? 
Comment 14 Karol E. Zielonko Jr 2003-09-22 11:04:50 UTC
Malte,

Thanks for spending the time!

Unfortunately I don't have a VMS system I can let you get access to. If you 
like I can be go-between and you can float version sof the file to me and i'll 
give 'em a try. Email if interested.

Karol
Comment 15 Karol E. Zielonko Jr 2003-10-14 04:06:23 UTC
Hi,

First I'd like to ask if anyone would be interested if I set up a little
email list or something for those interested in VMS port of spamassassin. I
have been working it and yet I'm no Perl expert and could use some help
without bogging down this case with tons of detail. Further it makes sense
not to have multiple folks all doing the same work at the same time.

Since I last posted here I have found a few more glitches in the build and
made a few more corresponding local hacks to push it along farther. I'll
spare you all the details. The last build road block I hit was the
descrip.mms file exiting with an error trying to execute a
strictly-for-unix shell script called "configure".

I exchanged email with Malte Stretz regarding logistics and the possibility
that he can back-port changes into SPAMassassin to fix the VMS bugs I've
found and which I am manually hacking around at the present. I have figured
out how to allow him access to my personal AXP system at home and also have
found a fellow in Germany who offers free access to anyone to his basement
VMS system. As far as I know though no work has been done yet.

Having hit the road block in the build I decided to try get the main
spamassassin script running. Between the suggestions in this thread and my
own explorations I've had it running simply for a week or so. By "running
simply" I mean that I don't think I'm running any where near all the code
paths that could be run, no spamd or bayes or razor for example.

But I can do this:

 $ perl spama_root:spamassassin. < infile.txt > outfile.txt

and it seems to be working. The file infile.txt contains an email to
process and outfile.txt is the SA output.

So how to get some use out of it?

At this time we have no generic hooks in VMS mail that allow a mail message
to be passed through some external processor like SA. Nor does our SMTP
server code have any such hooks. Creating those is another issue. I've got
some ideas (and am open to suggestions) and will work this as a separate
issue.

For our users here I wrote a 'C' program which I called spamsweep and which
sits on top of spamassassin.  It invokes SPAMassassin for all mail in a
source folder and moves each message thought by SPAMassassin to be SPAM to
a destination folder. By default the source folder is NEWMAIL (which is
where VMS mail puts all new mail when it is initially  delivered) and the
destination folder is SPAM. The folder names are setable from the command
line. I've been using it and it is working quite nicely.

The user must run the spamsweep tool manually from the $ prompt which makes
sense since the whole point of writing a standalone, manual tool like this
is because we don't have the automatic hooks built in yet.

I'm playing with this bayes thing now by doing

  $ perl spamassassin "-rLD" < file.txt

It's dying when trying to create a lock file in the UNIXLOCKER module. The
lock file has multiple dots in the name:

lock: 624953212 cannot create tmp lockfile
/sys$login_root/spamassassin/bayes.lock.lassie.ucx.lkg.dec.com.624953212
for /sys$login_root/spamassassin/bayes.lock: file specification syntax error

This is a typical Unix to VMS port problem. I'll hack up a fix for it.

Karol Zielonko
Comment 16 Theo Van Dinter 2004-03-11 15:00:06 UTC
has anything happened with this in the last 6 months?  seems like it's stalled.
Comment 17 Daniel Quinlan 2004-09-02 23:04:53 UTC
Hi folks.  This bug seems a bit dead, so I'm going to close it.  I'm not
saying we don't want to support VMS, but that this bug is so outdated that
a "[tracker]" bug does not seem to be the way.  Please open new bugs against
SVN trunk as you come up with updated fixes.  Thanks.

Closing as LATER.