Matt Sergeant wrote: [...]
Some of these may have been solved in other places, but I would be willing to test and check if they are still needed and patch against latest revision. Any interest?Yes of course.
Great - sorry for the slow reply.During move to vanilla qpsmtpd-prefork I stumbled over 1 minor issue. Daemon fails to start if using argument --interface, due to tainted data in $d_addr.
Suggested patch attached, note I've little experience with IPv6 and module Data::Validate::IP doesn't yet support it, so others may want to add IPv6 validation.
Best regards, Diego d'Ambra
Index: qpsmtpd-prefork =================================================================== --- qpsmtpd-prefork (revision 936) +++ qpsmtpd-prefork (working copy) @@ -14,6 +14,7 @@ use IO::Socket; use POSIX; use IPC::Shareable(':all'); +use Data::Validate::IP qw(is_ipv4); use lib 'lib'; use Qpsmtpd::TcpServer::Prefork; use Qpsmtpd::Constants; @@ -116,6 +117,10 @@ ) || &usage; if ($user =~ /^([\w\-]+)$/) { $user = $1 } else { &usage } +if (!$has_ipv6) { + #check IPv4 address is valid (and untaint it) + &usage unless ($d_addr = is_ipv4($d_addr)); +} # set max from ip to max number of children if option is set to disabled $maxconnip = $max_children if ($maxconnip == 0);
smime.p7s
Description: S/MIME Cryptographic Signature