* Sat Oct 19 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0.0-2.sme
- remove auth_imap patch not needed [SME: 11802]
This commit is contained in:
parent
665ac0774f
commit
e1260c8a5f
@ -1,74 +0,0 @@
|
||||
diff -Nur --no-dereference qpsmtpd-0.96.old/plugins/auth/auth_imap qpsmtpd-0.96/plugins/auth/auth_imap
|
||||
--- qpsmtpd-0.96.old/plugins/auth/auth_imap 2016-02-16 17:52:02.000000000 -0500
|
||||
+++ qpsmtpd-0.96/plugins/auth/auth_imap 2023-12-18 12:14:23.581000000 -0500
|
||||
@@ -25,17 +25,30 @@
|
||||
relay or a primary mail server. The principal benefit is ease of adminstration when
|
||||
an existing IMAP service is already established.
|
||||
|
||||
-head1 AUTHOR Christopher Heschong
|
||||
+=head1 AUTHOR Christopher Heschong
|
||||
|
||||
Edits to add SSL support and updated for latest qpsmtpd version - James Turnbull <james@lovedthanlost.net>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE Copyright (c) 2004 Christopher Heschong
|
||||
This plugin is licensed under the same terms as the qpsmtpd package itself.
|
||||
Please see the LICENSE file included with qpsmtpd for details.
|
||||
+
|
||||
+=head1 SYNOPSIS
|
||||
+
|
||||
+In config/plugins:
|
||||
+
|
||||
+ auth/auth_imap \
|
||||
+ enable_smtp no \
|
||||
+ enable_ssmtp yes
|
||||
|
||||
=cut
|
||||
|
||||
use Net::IMAP::Simple;
|
||||
+use Qpsmtpd::Constants;
|
||||
+
|
||||
+use Socket;
|
||||
+use constant SMTP_PORT => getservbyname("smtp", "tcp") || 25;
|
||||
+use constant SSMTP_PORT => getservbyname("ssmtp", "tcp") || 465;
|
||||
|
||||
sub register {
|
||||
my ($self, $qp, @args) = @_;
|
||||
@@ -51,16 +64,35 @@
|
||||
if (@args > 1 and $args[1] =~ /^(\d+)$/) {
|
||||
$self->{_imap_port} = $1;
|
||||
}
|
||||
+ if (@args > 2 and ($args[3] eq "enable_smtp" ) ) {
|
||||
+ $self->{_enable_smtp}= $args[4] || 'no';
|
||||
+ }
|
||||
+ if (@args > 4 and ( $args[5] eq "enable_ssmtp" )) {
|
||||
+ $self->{_enable_ssmtp} = $args[6] || 'yes';
|
||||
+ }
|
||||
$self->log(LOGWARN, "WARNING: Ignoring additional arguments.")
|
||||
- if (@args > 2);
|
||||
+ if (@args > 6);
|
||||
}
|
||||
else {
|
||||
die("No IMAP server specified in plugins file.");
|
||||
}
|
||||
|
||||
# set any values that are not already
|
||||
- $self->{_imap_server} ||= "127.0.0.1";
|
||||
- $self->{_imap_port} ||= 143;
|
||||
+ $self->{_imap_server} ||= "127.0.0.1";
|
||||
+ $self->{_imap_port} ||= 143;
|
||||
+ $self->{_enable_smtp} ||= 'no';
|
||||
+ $self->{_enable_ssmtp} ||= 'yes';
|
||||
+
|
||||
+ my $port = $ENV{PORT} || SMTP_PORT;
|
||||
+
|
||||
+ if ($self->{_enable_smtp} ne 'yes' && ($port == SMTP_PORT || $port == 587)) {
|
||||
+ $self->log(LOGDEBUG, "skip: enable_smtp=no");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if ($port == SSMTP_PORT && $self->{_enable_ssmtp} ne 'yes') {
|
||||
+ $self->log(LOGDEBUG, "skip: enable_ssmtp=no");
|
||||
+ return 0;
|
||||
+ };
|
||||
|
||||
$self->register_hook("auth-login", "auth_imap");
|
||||
$self->register_hook("auth-plain", "auth_imap");
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: qpsmtpd
|
||||
Version: 1.0.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: qpsmtpd + qpsmtpd-apache
|
||||
License: MIT
|
||||
Group: System Environment/Daemons
|
||||
@ -36,8 +36,7 @@ Patch7: qpsmtpd-1.0.0-uribl_validate_domains.patch
|
||||
Patch8: qpsmtpd-0.96-bz10112-whitelist.patch
|
||||
Patch9: qpsmtpd-0.96-SME10139-Message-Id.patch
|
||||
Patch10: qpsmtpd-0.96-bz10290-spamassassin-fetchmail.patch
|
||||
Patch11: qpsmtpd-0.96-bz12450-auth_imap-perport.patch
|
||||
Patch12: qpsmtpd-v1.0.0-20240428.patch
|
||||
Patch11: qpsmtpd-v1.0.0-20240428.patch
|
||||
|
||||
%description
|
||||
qpsmtpd is a flexible smtpd daemon written in Perl. Apart from the core
|
||||
@ -72,7 +71,6 @@ that turns Apache into an SMTP server using Qpsmtpd.
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLDIRS="vendor" PREFIX="%{buildroot}%{_prefix}"
|
||||
@ -145,6 +143,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Oct 19 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0.0-2.sme
|
||||
- remove auth_imap patch not needed [SME: 11802]
|
||||
|
||||
* Sun Apr 28 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0.0-1.sme
|
||||
- upgrade to last version [SME: 11802]
|
||||
- reapply our specific patches, rewrite them if necessary
|
||||
|
Loading…
Reference in New Issue
Block a user