Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add p5-Mail-Qmail-Filter: Modules for filtering between qmail-smtpd a…
…nd qmail-queue Mail::Qmail::Filter and its submodules are designed to help you filter incoming e-mails when using qmail as MTA. You should use it like so: 1. Write a frontend script to configure your filters 2. In the run file for your qmail-smtpd instance, e.g. /var/qmail/supervise/qmail-smtpd/run, export QMAILQUEUE=path_to_your_frontend_script In each filter, you may do various things: - examine and change envelope data (RFC5321.MailFrom and recipients) - examine and modify the e-mail message (header and/or body) - "reject" e-mails (or defer them)
- Loading branch information
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Mail::Qmail::Filter and its submodules are designed to help you filter | ||
incoming e-mails when using qmail as MTA. | ||
|
||
You should use it like so: | ||
|
||
1. Write a frontend script to configure your filters | ||
2. In the run file for your qmail-smtpd instance, e.g. | ||
/var/qmail/supervise/qmail-smtpd/run, export | ||
QMAILQUEUE=path_to_your_frontend_script | ||
|
||
In each filter, you may do various things: | ||
|
||
- examine and change envelope data (RFC5321.MailFrom and recipients) | ||
- examine and modify the e-mail message (header and/or body) | ||
- "reject" e-mails (or defer them) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# $NetBSD: Makefile,v 1.1 2024/01/10 16:48:23 schmonz Exp $ | ||
|
||
DISTNAME= Mail-Qmail-Filter-1.32 | ||
PKGNAME= p5-${DISTNAME} | ||
CATEGORIES= mail perl5 | ||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=../../authors/id/F/FA/FANY/} | ||
|
||
MAINTAINER= schmonz@NetBSD.org | ||
HOMEPAGE= https://metacpan.org/dist/Mail-Qmail-Filter | ||
COMMENT= Modules for filtering between qmail-smtpd and qmail-queue | ||
LICENSE= artistic-2.0 | ||
|
||
DEPENDS+= p5-Capture-Tiny-[0-9]*:../../devel/p5-Capture-Tiny | ||
DEPENDS+= p5-Email-Valid-[0-9]*:../../mail/p5-Email-Valid | ||
DEPENDS+= p5-File-Scan-ClamAV-[0-9]*:../../security/p5-File-Scan-ClamAV | ||
DEPENDS+= p5-MailTools-[0-9]*:../../mail/p5-MailTools | ||
DEPENDS+= p5-Mail-DKIM-[0-9]*:../../mail/p5-Mail-DKIM | ||
DEPENDS+= p5-Mail-DMARC-[0-9]*:../../mail/p5-Mail-DMARC | ||
DEPENDS+= p5-Mail-Qmail-Queue-[0-9]*:../../mail/p5-Mail-Qmail-Queue | ||
DEPENDS+= p5-Mail-SPF-[0-9]*:../../mail/p5-Mail-SPF | ||
DEPENDS+= spamassassin-[0-9]*:../../mail/spamassassin | ||
DEPENDS+= p5-Mo-[0-9]*:../../devel/p5-Mo | ||
DEPENDS+= p5-Path-Tiny-[0-9]*:../../filesystems/p5-Path-Tiny | ||
DEPENDS+= p5-Qmail-Deliverable-[0-9]*:../../mail/p5-Qmail-Deliverable | ||
DEPENDS+= p5-namespace-clean-[0-9]*:../../devel/p5-namespace-clean | ||
|
||
USE_LANGUAGES= # none | ||
PERL5_PACKLIST= auto/Mail/Qmail/Filter/.packlist | ||
|
||
SUBST_CLASSES+= varqmail | ||
SUBST_STAGE.varqmail= pre-configure | ||
SUBST_FILES.varqmail= lib/Mail/Qmail/Filter.pm | ||
SUBST_VARS.varqmail= QMAILDIR | ||
|
||
BUILD_DEFS+= QMAILDIR | ||
|
||
pre-configure: | ||
${FIND} ${WRKSRC} -type f -name '*.orig' | ${XARGS} ${RM} -f | ||
|
||
post-extract: | ||
cd ${WRKDIR} && ${MV} -f ${DISTNAME:C/[0-9]$/1/} ${DISTNAME} | ||
|
||
.include "../../lang/perl5/module.mk" | ||
.include "../../mk/bsd.pkg.mk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$NetBSD: distinfo,v 1.1 2024/01/10 16:48:23 schmonz Exp $ | ||
|
||
BLAKE2s (Mail-Qmail-Filter-1.32.tar.gz) = ae670d12b23266d10d5f775af569c40edf4c29c7526497b633073639d19b1278 | ||
SHA512 (Mail-Qmail-Filter-1.32.tar.gz) = 7490e987962800b5114a41ddcef7872e72f567e6c14d2f548366e6b8823955d322c63bdc9af75d4e26cdaf081b1300114498e6d31969bb2611335fcceadbff20 | ||
Size (Mail-Qmail-Filter-1.32.tar.gz) = 28561 bytes | ||
SHA1 (patch-lib_Mail_Qmail_Filter.pm) = f08924456fefa6f51bb74bc28daae7a549bce264 |
15 changes: 15 additions & 0 deletions
15
mail/p5-Mail-Qmail-Filter/patches/patch-lib_Mail_Qmail_Filter.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$NetBSD: patch-lib_Mail_Qmail_Filter.pm,v 1.1 2024/01/10 16:48:23 schmonz Exp $ | ||
|
||
Honor pkgsrc-specified QMAILDIR. | ||
|
||
--- lib/Mail/Qmail/Filter.pm.orig 2024-01-10 12:19:26.453829311 +0000 | ||
+++ lib/Mail/Qmail/Filter.pm | ||
@@ -189,7 +189,7 @@ like the one in the L</SYNOPSIS>. | ||
=item 2. | ||
|
||
In the run file for your C<qmail-smtpd> instance, | ||
-e.g. C</var/qmail/supervise/qmail-smtpd/run>, | ||
+e.g. C<@QMAILDIR@/supervise/qmail-smtpd/run>, | ||
|
||
export QMAILQUEUE=path_to_your_frontend_script | ||
|