Lines 409-415
GetOptions(
Link Here
|
409 |
'sql-config!' => \$opt{'sql-config'}, |
409 |
'sql-config!' => \$opt{'sql-config'}, |
410 |
'ssl' => \$opt{'ssl'}, |
410 |
'ssl' => \$opt{'ssl'}, |
411 |
'ssl-port=s' => \$opt{'ssl-port'}, |
411 |
'ssl-port=s' => \$opt{'ssl-port'}, |
412 |
'ssl-version=s' => \$opt{'ssl-version'}, |
|
|
413 |
'syslog-socket=s' => \$opt{'syslog-socket'}, |
412 |
'syslog-socket=s' => \$opt{'syslog-socket'}, |
414 |
'syslog|s=s' => \$opt{'syslog'}, |
413 |
'syslog|s=s' => \$opt{'syslog'}, |
415 |
'log-timestamp-fmt:s' => \$opt{'log-timestamp-fmt'}, |
414 |
'log-timestamp-fmt:s' => \$opt{'log-timestamp-fmt'}, |
Lines 743-753
if ( defined $ENV{'HOME'} ) {
Link Here
|
743 |
|
742 |
|
744 |
# Do whitelist later in tmp dir. Side effect: this will be done as -u user. |
743 |
# Do whitelist later in tmp dir. Side effect: this will be done as -u user. |
745 |
|
744 |
|
746 |
my $sslversion = $opt{'ssl-version'} || 'sslv3'; |
|
|
747 |
if ($sslversion !~ /^(?:sslv3|tlsv1)$/) { |
748 |
die "spamd: invalid ssl-version: $opt{'ssl-version'}\n"; |
749 |
} |
750 |
|
751 |
$opt{'server-key'} ||= "$LOCAL_RULES_DIR/certs/server-key.pem"; |
745 |
$opt{'server-key'} ||= "$LOCAL_RULES_DIR/certs/server-key.pem"; |
752 |
$opt{'server-cert'} ||= "$LOCAL_RULES_DIR/certs/server-cert.pem"; |
746 |
$opt{'server-cert'} ||= "$LOCAL_RULES_DIR/certs/server-cert.pem"; |
753 |
|
747 |
|
Lines 898-906
sub compose_listen_info_string {
Link Here
|
898 |
$socket_info->{ip_addr}, $socket_info->{port})); |
892 |
$socket_info->{ip_addr}, $socket_info->{port})); |
899 |
|
893 |
|
900 |
} elsif ($socket->isa('IO::Socket::SSL')) { |
894 |
} elsif ($socket->isa('IO::Socket::SSL')) { |
901 |
push(@listeninfo, sprintf("SSL [%s]:%s, ssl version %s", |
895 |
push(@listeninfo, sprintf("SSL [%r]:%s", $socket_info->{ip_addr}, |
902 |
$socket_info->{ip_addr}, $socket_info->{port}, |
896 |
$socket_info->{port})); |
903 |
$opt{'ssl-version'}||'sslv3')); |
|
|
904 |
} |
897 |
} |
905 |
} |
898 |
} |
906 |
|
899 |
|
Lines 1071-1077
sub server_sock_setup_inet {
Link Here
|
1071 |
$sockopt{V6Only} = 1 if $io_socket_module_name eq 'IO::Socket::IP' |
1064 |
$sockopt{V6Only} = 1 if $io_socket_module_name eq 'IO::Socket::IP' |
1072 |
&& IO::Socket::IP->VERSION >= 0.09; |
1065 |
&& IO::Socket::IP->VERSION >= 0.09; |
1073 |
%sockopt = (%sockopt, ( |
1066 |
%sockopt = (%sockopt, ( |
1074 |
SSL_version => $sslversion, |
|
|
1075 |
SSL_verify_mode => 0x00, |
1067 |
SSL_verify_mode => 0x00, |
1076 |
SSL_key_file => $opt{'server-key'}, |
1068 |
SSL_key_file => $opt{'server-key'}, |
1077 |
SSL_cert_file => $opt{'server-cert'}, |
1069 |
SSL_cert_file => $opt{'server-cert'}, |
Lines 1092-1098
sub server_sock_setup_inet {
Link Here
|
1092 |
if (!$server_inet) { |
1084 |
if (!$server_inet) { |
1093 |
$diag = sprintf("could not create %s socket on [%s]:%s: %s", |
1085 |
$diag = sprintf("could not create %s socket on [%s]:%s: %s", |
1094 |
$ssl ? 'IO::Socket::SSL' : $io_socket_module_name, |
1086 |
$ssl ? 'IO::Socket::SSL' : $io_socket_module_name, |
1095 |
$adr, $port, $!); |
1087 |
$adr, $port, $ssl && $IO::Socket::SSL::SSL_ERROR ? |
|
|
1088 |
"$!,$IO::Socket::SSL::SSL_ERROR" : $!); |
1096 |
push(@diag_fail, $diag); |
1089 |
push(@diag_fail, $diag); |
1097 |
} else { |
1090 |
} else { |
1098 |
$diag = sprintf("created %s socket on [%s]:%s", |
1091 |
$diag = sprintf("created %s socket on [%s]:%s", |
Lines 3232-3238
Options:
Link Here
|
3232 |
-H [dir], --helper-home-dir[=dir] Specify a different HOME directory |
3225 |
-H [dir], --helper-home-dir[=dir] Specify a different HOME directory |
3233 |
--ssl Enable SSL on TCP connections |
3226 |
--ssl Enable SSL on TCP connections |
3234 |
--ssl-port port Override --port setting for SSL connections |
3227 |
--ssl-port port Override --port setting for SSL connections |
3235 |
--ssl-version sslversion Specify SSL protocol version to use |
|
|
3236 |
--server-key keyfile Specify an SSL keyfile |
3228 |
--server-key keyfile Specify an SSL keyfile |
3237 |
--server-cert certfile Specify an SSL certificate |
3229 |
--server-cert certfile Specify an SSL certificate |
3238 |
--socketpath=path Listen on a given UNIX domain socket |
3230 |
--socketpath=path Listen on a given UNIX domain socket |
Lines 3720-3733
Optionally specifies the port number for
Link Here
|
3720 |
SSL connections (default: whatever --port uses). See B<--ssl> for |
3712 |
SSL connections (default: whatever --port uses). See B<--ssl> for |
3721 |
more details. |
3713 |
more details. |
3722 |
|
3714 |
|
3723 |
=item B<--ssl-version>=I<sslversion> |
|
|
3724 |
|
3725 |
Specify the SSL protocol version to use, one of B<sslv3> or B<tlsv1>. |
3726 |
The default, B<sslv3>, is the most flexible, accepting a SSLv3 or |
3727 |
higher hello handshake, then negotiating use of SSLv3 or TLSv1 |
3728 |
protocol if the client can accept it. Specifying B<--ssl-version> |
3729 |
implies B<--ssl>. |
3730 |
|
3731 |
=item B<--server-key> I<keyfile> |
3715 |
=item B<--server-key> I<keyfile> |
3732 |
|
3716 |
|
3733 |
Specify the SSL key file to use for SSL connections. |
3717 |
Specify the SSL key file to use for SSL connections. |