initial commit of file from CVS for smeserver-qpsmtpd on Thu 26 Oct 11:25:19 BST 2023

This commit is contained in:
2023-10-26 11:25:19 +01:00
parent c8bfca82cb
commit c45ac2b2d0
197 changed files with 3867 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
{
$bounce_unknown_user = 1;
$bounce_unknown_user = 0
if (defined $EmailUnknownUser and $EmailUnknownUser ne 'returntosender');
$bounce_unknown_user = 0
if (defined $DelegateMailServer and $DelegateMailServer);
"";
}

View File

@@ -0,0 +1 @@
logging/logterse

View File

@@ -0,0 +1 @@
tls ssl/cert.pem ssl/cert.pem ssl/cert.pem ssl/dhparam.pem

View File

@@ -0,0 +1,9 @@
{
# my $auth_smtp = ($qpsmtpd{Authentication} eq 'enabled') ? 'yes' : 'no';
# my $auth_ssmtp = ($sqpsmtpd{Authentication} eq 'enabled') ? 'yes' : 'no';
# $OUT = "auth/auth_cvm_unix_local";
# $OUT .= " cvm_socket /var/lib/cvm/cvm-unix-local.socket";
# $OUT .= " enable_smtp $auth_smtp";
# $OUT .= " enable_ssmtp $auth_ssmtp";
}

View File

@@ -0,0 +1,3 @@
{
$OUT .= "auth/auth_imap 127.0.0.1 143";
}

View File

@@ -0,0 +1,6 @@
{
return "# Karma plugin is disabled" unless (($qpsmtpd{Karma} || 'disabled') =~ m/^1|on|yes|enabled$/i);
my $negative = $qpsmtpd{KarmaNegative} || '2';
my $strikes = $qpsmtpd{KarmaStrikes} || '3';
$OUT .= "karma negative $negative strikes $strikes reject naughty db_dir /var/lib/qpsmtpd/karma";
}

View File

@@ -0,0 +1 @@
earlytalker

View File

@@ -0,0 +1 @@
bogus_bounce

View File

@@ -0,0 +1 @@
count_unrecognized_commands 4

View File

@@ -0,0 +1,7 @@
{
return "# bcc disabled" unless ($qpsmtpd{Bcc} eq "enabled");
my $user = $qpsmtpd{BccUser} || '';
return "# bcc user not set" if $user eq '';
$user .= '@' . $DomainName unless $user =~ m/\@/;
return "bcc mode " . $qpsmtpd{BccMode} . " all " . $user;
}

View File

@@ -0,0 +1 @@
relay

View File

@@ -0,0 +1 @@
helo policy { $qpsmtpd{HeloPolicy} || 'lenient' } reject naughty

View File

@@ -0,0 +1 @@
resolvable_fromhost

View File

@@ -0,0 +1,8 @@
{
$OUT = "headers";
# Note: You can't specify a maximum offset of 0 days, but that's fair
my $days = $qpsmtpd{MaximumDateOffset} || '';
$OUT .= " future $days past $days" if ($days);
}

View File

@@ -0,0 +1 @@
loadcheck max_load { $qpsmtpd{MaxLoad} || '7' }

View File

@@ -0,0 +1,5 @@
{
return "# rhsbl disabled" unless (${qpsmtpd}{RHSBL} eq "enabled");
"rhsbl";
}

View File

@@ -0,0 +1 @@
sender_permitted_from reject 1 no_dmarc_policy { $qpsmtpd{SPFRejectPolicy} || '0' }

View File

@@ -0,0 +1 @@
dkim reject 0

View File

@@ -0,0 +1 @@
dmarc reject { (( $qpsmtpd{DMARCReject} || 'disabled' ) =~ m/^1|on|enabled|yes$/) ? '1' : '0' } reporting { (( $qpsmtpd{DMARCReporting} || 'enabled' ) =~ m/^1|on|enabled|yes$/) ? '1' : '0' }

View File

@@ -0,0 +1,5 @@
{
return "# dnsbl disabled" unless (${qpsmtpd}{DNSBL} eq "enabled");
"dnsbl reject naughty";
}

View File

@@ -0,0 +1 @@
naughty reject mail

View File

@@ -0,0 +1,5 @@
{
return "# uribl disabled" unless (${qpsmtpd}{URIBL} eq "enabled");
"uribl action deny";
}

View File

@@ -0,0 +1 @@
badmailfrom

View File

@@ -0,0 +1 @@
badrcptto

View File

@@ -0,0 +1 @@
badrcptto more_badrcptto badrcptto_ext

View File

@@ -0,0 +1,13 @@
{
return "check_smtp_forward" if $DelegateMailServer;
use esmith::DomainsDB;
my $ddb = esmith::DomainsDB->open_ro();
for my $domain ( $ddb->domains )
{
return "check_smtp_forward" if $domain->prop('MailServer');
}
return "# check_smtp_forward not required";
}

View File

@@ -0,0 +1,5 @@
{
return "" unless $bounce_unknown_user;
"check_goodrcptto extn -";
}

View File

@@ -0,0 +1,4 @@
{
# this plugin needs to run after all other "rcpt" plugins
}
rcpt_ok

View File

@@ -0,0 +1,7 @@
{
return "# pattern_filter disabled"
unless ($qpsmtpd{PatternsScan} eq "enabled");
return "virus/pattern_filter check=patterns action=deny";
}

View File

@@ -0,0 +1,6 @@
{
return "# tnef to mime conversion disabled"
unless ($qpsmtpd{tnef2mime} eq "enabled");
return "tnef2mime";
}

View File

@@ -0,0 +1,6 @@
{
return "# disclaimer disabled"
unless ($qpsmtpd{disclaimer} || 'disabled') eq "enabled";
return "disclaimer";
}

View File

@@ -0,0 +1,36 @@
{
# You can run the spamassassin plugin with options. See perldoc
# plugins/spamassassin for details.
#
# spamassassin
# rejects mails with a SA score higher than 20 and munges the subject
# of the score is higher than 10.
#
# spamassassin reject_threshold 20 munge_subject_threshold 10
my $status = $spamassassin{status} || 'disabled';
return "# spamassassin disabled" unless ($status eq "enabled");
my @options = qw(spamassassin);
if ($spamassassin{Sensitivity} eq "custom")
{
if ($spamassassin{RejectLevel} > $spamassassin{TagLevel})
{
push @options, "reject", $spamassassin{RejectLevel};
}
}
if ($spamassassin{SubjectTag} eq "enabled")
{
push @options, "munge_subject_threshold", $spamassassin{TagLevel};
}
my $size = $spamassassin{MaxMessageSize} || '';
if ($size =~ m/^\d+$/)
{
push @options, "size_limit", $size;
}
return join " ", @options;
}

View File

@@ -0,0 +1,23 @@
{
# run the clamdscan virus checking plugin
my $s = $clamd{status} || 'disabled';
return "# clamd disabled" unless ($s eq "enabled");
$s = $qpsmtpd{VirusScan} || 'disabled';
return "# clamav disabled" unless ($s eq "enabled");
my $max_size = $qpsmtpd{MaxScannerSize} ||
$clamav{StreamMaxLength} ||
"25M";
$max_size =~ s/[kK]/000/;
$max_size =~ s/[mM]/000000/;
# clamdscan takes size in kb
$max_size = int($max_size / 1000);
$OUT = "virus/clamdscan" .
" scan_all yes" .
" clamd_socket /run/clamd/clamd.socket" .
" defer_on_error yes" .
" max_size $max_size";
}

View File

@@ -0,0 +1,5 @@
{
#return "# DelegateMailServer set" if $DelegateMailServer;
return "queue/qmail-queue";
}

View File

@@ -0,0 +1,5 @@
{
#return "# DelegateMailServer not set" unless $DelegateMailServer;
#return "queue/smtp-forward $DelegateMailServer";
}