aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortakeda <takeda@takeda.tk>2024-09-13 13:31:12 +0000
committerVladimir Druzenko <vvd@FreeBSD.org>2024-09-13 13:31:12 +0000
commite575205acabbd1b1fcc8766e78bdeabbf87a69b1 (patch)
tree7b812432fd0cbfd78615138400947a8dd4b4224f
parentc94e4ced329298efb06189d1c6db26e3d6ff3eef (diff)
mail/p5-Sendmail-PMilter: New port: Perl bindings for Sendmail/Postfix milter interface
The original Sendmail::Milter (mail/p5-Sendmail-Milter) is not really maintained, there's more up to date module Sendmail::PMilter: https://metacpan.org/dist/Sendmail-PMilter Latest version of bogofilter-milter require it: https://stuff.mit.edu/~jik/software/bogofilter-milter/ PR: 281354
-rw-r--r--mail/Makefile1
-rw-r--r--mail/p5-Sendmail-PMilter/Makefile19
-rw-r--r--mail/p5-Sendmail-PMilter/distinfo3
-rw-r--r--mail/p5-Sendmail-PMilter/files/patch-Makefile.PL45
-rw-r--r--mail/p5-Sendmail-PMilter/pkg-descr9
-rw-r--r--mail/p5-Sendmail-PMilter/pkg-plist4
6 files changed, 81 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index efa897a0b22b..4bedae148209 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -429,6 +429,7 @@
SUBDIR += p5-SES
SUBDIR += p5-Sendmail-AccessDB
SUBDIR += p5-Sendmail-Milter
+ SUBDIR += p5-Sendmail-PMilter
SUBDIR += p5-Sisimai
SUBDIR += p5-Test-Email
SUBDIR += p5-URI-imap
diff --git a/mail/p5-Sendmail-PMilter/Makefile b/mail/p5-Sendmail-PMilter/Makefile
new file mode 100644
index 000000000000..84ac1cf0ef96
--- /dev/null
+++ b/mail/p5-Sendmail-PMilter/Makefile
@@ -0,0 +1,19 @@
+PORTNAME= Sendmail-PMilter
+DISTVERSION= 1.27
+CATEGORIES= mail perl5
+MASTER_SITES= CPAN
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= takeda@takeda.tk
+COMMENT= Perl bindings for Sendmail/Postfix milter interface
+WWW= https://metacpan.org/dist/Sendmail-PMilter
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= perl5
+USE_PERL5= configure
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/mail/p5-Sendmail-PMilter/distinfo b/mail/p5-Sendmail-PMilter/distinfo
new file mode 100644
index 000000000000..5b2edbf67ea5
--- /dev/null
+++ b/mail/p5-Sendmail-PMilter/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1725761565
+SHA256 (Sendmail-PMilter-1.27.tar.gz) = bb5265360d3c00b312e5ede02484ec2200a5252e48bebb4978420711d8d49b66
+SIZE (Sendmail-PMilter-1.27.tar.gz) = 39605
diff --git a/mail/p5-Sendmail-PMilter/files/patch-Makefile.PL b/mail/p5-Sendmail-PMilter/files/patch-Makefile.PL
new file mode 100644
index 000000000000..5a37c772bd3b
--- /dev/null
+++ b/mail/p5-Sendmail-PMilter/files/patch-Makefile.PL
@@ -0,0 +1,45 @@
+--- Makefile.PL.orig 2024-02-03 16:33:42 UTC
++++ Makefile.PL
+@@ -1,42 +1,6 @@ use ExtUtils::MakeMaker;
+ use 5.008004;
+ use ExtUtils::MakeMaker;
+
+-my $install = ( ExtUtils::MakeMaker::prompt(<<EOT . 'Do you wish to install the Sendmail::PMilter package?' => 'yes' ) );
+-
+-Sendmail::PMilter provides access to the message processing hooks in a
+-running Mail Transfer Agent (Sendmail or Postfix), so that filters
+-('milters') which process mail can be written entirely in Perl. Mail
+-processing according to SMTP takes place at a number of well-defined
+-stages ('connect', 'helo', etc.) during the exchange of the message
+-between client and server. At each stage, the sets of data available
+-(the connecting IP, sender address etc.) and the permissible actions
+-(rewrite a message header, ACCEPT a message, REJECT it etc.) are also
+-well-defined and are to some extent configurable.
+-
+-Filters built to use Sendmail::PMilter can examine all the information
+-made available by the MTA and can take any of the permitted actions at
+-any stage of mail processing. Filters can be implemented much more
+-quickly in Perl than in a low-level language like C, and the Perl code
+-does not necessarily need to be thread-safe. All mail is essentially
+-text, and Perl is a very powerful tool for text processing. A milter
+-coded in Perl has full access to all Perl library functions, system
+-utilities, standard modules, modules installed from CPAN, modules of
+-your own; a Perl milter can do with a message more or less anything
+-that you might reasonably want to do.
+-
+-The interface to the running MTA follows the 'milter protocol'. This
+-protocol is driven by the MTA. It is effected by messages of a simple
+-structure which are passed between the MTA and the milter via a socket
+-connection. Over the years the Milter Protocol has progressed through
+-several versions, and seems (February 2024) to be extremely stable at
+-Milter Protocol Version 6.
+-
+-Choose "yes" below to install Sendmail::PMilter from this package.
+-
+-EOT
+-
+-if( $install ne 'yes' ) { print "Not installing.\n"; exit; }
+-
+ my %PM = (
+ 'lib/Sendmail/PMilter.pm' => '$(INST_LIBDIR)/PMilter.pm',
+ 'lib/Sendmail/PMilter/Context.pm' => '$(INST_LIBDIR)/PMilter/Context.pm'
diff --git a/mail/p5-Sendmail-PMilter/pkg-descr b/mail/p5-Sendmail-PMilter/pkg-descr
new file mode 100644
index 000000000000..de854058c468
--- /dev/null
+++ b/mail/p5-Sendmail-PMilter/pkg-descr
@@ -0,0 +1,9 @@
+Sendmail::PMilter provides access to the message processing hooks in a
+running Mail Transfer Agent (Sendmail or Postfix), so that filters
+('milters') which process mail can be written entirely in Perl. Mail
+processing according to SMTP takes place at a number of well-defined
+stages ('connect', 'helo', etc.) during the exchange of the message
+between client and server. At each stage, the sets of data available
+(the connecting IP, sender address etc.) and the permissible actions
+(rewrite a message header, ACCEPT a message, REJECT it etc.) are also
+well-defined and are to some extent configurable.
diff --git a/mail/p5-Sendmail-PMilter/pkg-plist b/mail/p5-Sendmail-PMilter/pkg-plist
new file mode 100644
index 000000000000..54068099ddcd
--- /dev/null
+++ b/mail/p5-Sendmail-PMilter/pkg-plist
@@ -0,0 +1,4 @@
+%%SITE_PERL%%/Sendmail/PMilter.pm
+%%SITE_PERL%%/Sendmail/PMilter/Context.pm
+%%PERL5_MAN3%%/Sendmail::PMilter.3.gz
+%%PERL5_MAN3%%/Sendmail::PMilter::Context.3.gz