Skip to content

Commit

Permalink
exorcise all but forkserver
Browse files Browse the repository at this point in the history
the one run model to rule them all
  • Loading branch information
msimerson committed Jan 16, 2025
1 parent dfe319b commit 70c9b56
Show file tree
Hide file tree
Showing 31 changed files with 383 additions and 2,098 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ jobs:
perl-version: ${{ matrix.perl }}
- run: cpanm --installdeps -n -f .
- run: cpanm --installdeps -n -f Mail::SPF Mail::DMARC GeoIP2 ClamAV::Client Redis
- run: prove -lv t
- run: prove -lv t

2 changes: 1 addition & 1 deletion CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ improvements for me to ever catch up on here.
Matt Sergeant <[email protected]>: Clamav plugin. Patch for the dnsbl
plugin to give us all the dns results. Resident SpamAssassin guru.
PPerl. smtp-forward plugin. Documentation (yay!). Lots of fixes and
tweaks. Apache module. Event based high performance experiment.
tweaks. Event based high performance experiment.

Devin Carraway <[email protected]>: Patch to not accept half mails if
the connection gets dropped at the wrong moment. Support and enable
Expand Down
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

Forkserver is THE run model

Remove tcpserver run mode

Remove Apache::Qpsmtpd support

1.00 Feb 16, 2023

Use readable file test for certificate files (#304)
Expand Down
10 changes: 1 addition & 9 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ docs/development.md
docs/hooks.md
docs/logging.md
docs/writing.md
lib/Apache/Qpsmtpd.pm
lib/Qpsmtpd.pm
lib/Qpsmtpd/Address.pm
lib/Qpsmtpd/Auth.pm
lib/Qpsmtpd/Base.pm
lib/Qpsmtpd/Command.pm
lib/Qpsmtpd/Config.pm
lib/Qpsmtpd/ConfigServer.pm
lib/Qpsmtpd/Connection.pm
lib/Qpsmtpd/Constants.pm
lib/Qpsmtpd/DB.pm
Expand All @@ -53,9 +51,7 @@ lib/Qpsmtpd/Postfix.pm
lib/Qpsmtpd/Postfix/Constants.pm
lib/Qpsmtpd/Postfix/pf2qp.pl
lib/Qpsmtpd/SMTP.pm
lib/Qpsmtpd/SMTP/Prefork.pm
lib/Qpsmtpd/TcpServer.pm
lib/Qpsmtpd/TcpServer/Prefork.pm
lib/Qpsmtpd/Transaction.pm
LICENSE
log/log2sql
Expand Down Expand Up @@ -105,7 +101,6 @@ plugins/karma
plugins/karma_tool
plugins/loadcheck
plugins/logging/adaptive
plugins/logging/apache
plugins/logging/connection_id
plugins/logging/devnull
plugins/logging/file
Expand Down Expand Up @@ -150,12 +145,9 @@ plugins/virus/sophie
plugins/virus/uvscan
plugins/whitelist
qpsmtpd
qpsmtpd-forkserver
qpsmtpd-prefork
README.md
README.plugins.md
run.forkserver
run.tcpserver
run
STATUS
t/addresses.t
t/auth.t
Expand Down
4 changes: 3 additions & 1 deletion META.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ requires:
CDB_File: 0
Data::Dumper: 0
Date::Parse: 0
DB_File: 0
File::NFSLock: 0
File::Tail: 0
File::Temp: 0
GeoIP2: 0
File::NFSLock: 0
GeoIP2: 2
IO::Socket::SSL: 0
MIME::Base64: 0
Mail::DKIM: 0
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ WriteMakefile(
},
ABSTRACT => 'Flexible smtpd daemon written in Perl',
AUTHOR => 'Ask Bjoern Hansen <[email protected]>',
EXE_FILES => [qw(qpsmtpd qpsmtpd-forkserver qpsmtpd-prefork)],
EXE_FILES => [qw(qpsmtpd)],
clean => { FILES => [ '*.bak', 't/tmp' ], },
);

Expand Down
3 changes: 1 addition & 2 deletions README.plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ subdirectory, the directory must also be given, like the
may be given in the `config/plugin_dirs` config file, one directory
per line, these will be searched first before using the builtin fallback
of `plugins/` relative to the qpsmtpd root directory. It may be
necessary, that the `config/plugin_dirs` must be used (if you're using
`Apache::Qpsmtpd`, for example).
necessary, that the `config/plugin_dirs` must be used.

Some plugins may be configured by passing arguments in the `plugins`
config file.
Expand Down
3 changes: 0 additions & 3 deletions config.sample/logging
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ logging/warn 6
#logging/adaptive [accept minlevel] [reject maxlevel] [prefix char]
#logging/adaptive 4 6

# send logs to apache (useful if running qpsmtpd under apache)
#logging/apache

# send logs to the great bit bucket
#logging/devnull

Expand Down
253 changes: 0 additions & 253 deletions lib/Apache/Qpsmtpd.pm

This file was deleted.

20 changes: 0 additions & 20 deletions lib/Qpsmtpd/Base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,6 @@ sub get_resolver {
return $self->{_resolver};
}

sub get_async_resolver {
my ( $self, %args ) = @_;
return $self->{_async_resolver} if $self->{_async_resolver};

my $async_res;
eval 'use Net::DNS::Async';
if ($@) {
warn "could not load Net::DNS::Async, is it installed?";
return;
}

my $res = Net::DNS::Resolver->new(dnsrch => 0);
$res->tcp_timeout(0); # Net::DNS::Async handles its own timeouts
$res->tcp_timeout(0);

$self->{_async_resolver} = Net::DNS::Async->new( %args );
$self->{_async_resolver}{Resolver} = $res;
return $self->{_async_resolver};
}

sub resolve_a {
my ($self, $name) = @_;
my $q = $self->get_resolver->query($name, 'A') or return;
Expand Down
Loading

0 comments on commit 70c9b56

Please sign in to comment.