X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=bin%2Frt-mailgate;h=deccd707362e2238351790317a296665765286b0;hb=af59614dbbf895bf0b0ab155fe158b6152edf32b;hp=105affd7964effd5e937dccd9d097332dc4c61e8;hpb=632513a6db31ba1c9e5151dc69cff85f7925c8bc;p=usit-rt.git diff --git a/bin/rt-mailgate b/bin/rt-mailgate index 105affd..deccd70 100755 --- a/bin/rt-mailgate +++ b/bin/rt-mailgate @@ -144,12 +144,6 @@ sub validate_cli_flags { return $self->permfail(); } - if (($opts->{'ca-file'} or $opts->{"verify-ssl"}) - and not LWP::UserAgent->can("ssl_opts")) { - print STDERR "Verifying SSL certificates requires LWP::UserAgent 6.0 or higher.\n"; - return $self->tempfail(); - } - $opts->{"verify-ssl"} = 1 unless defined $opts->{"verify-ssl"}; } @@ -159,11 +153,9 @@ sub get_useragent { my $ua = LWP::UserAgent->new(); $ua->cookie_jar( { file => $opts->{'jar'} } ) if $opts->{'jar'}; - if ( $ua->can("ssl_opts") ) { - $ua->ssl_opts( verify_hostname => $opts->{'verify-ssl'} ); - $ua->ssl_opts( SSL_ca_file => $opts->{'ca-file'} ) - if $opts->{'ca-file'}; - } + $ua->ssl_opts( verify_hostname => $opts->{'verify-ssl'} ); + $ua->ssl_opts( SSL_ca_file => $opts->{'ca-file'} ) + if $opts->{'ca-file'}; return $ua; } @@ -252,13 +244,8 @@ sub check_failure { my $r = shift; return if $r->is_success; - # XXX TODO 4.2: Remove the multi-line error strings in favor of something more concise - print STDERR <<" ERROR"; -An Error Occurred -================= - -@{[ $r->status_line ]} - ERROR + print STDERR "HTTP request failed: @{[ $r->status_line ]}. " + ."Your webserver logs may have more information or there may be a network problem.\n"; print STDERR "\n$0: undefined server error\n" if $opts->{'debug'}; return $self->tempfail(); } @@ -358,10 +345,6 @@ is found. This flag tells the mail gateway where it can find your RT server. You should probably use the same URL that users use to log into RT. -If your RT server uses SSL, you will need to install additional Perl -libraries. RT will detect and install these dependencies if you pass the -C<--enable-ssl-mailgate> flag to configure as documented in RT's README. - If you have a self-signed SSL certificate, you may also need to pass C<--ca-file> or C<--no-verify-ssl>, below. @@ -382,9 +365,6 @@ of CA. This is required if you have a self-signed certificate, or some other certificate which is not traceable back to an certificate your system ultimitely trusts. -Verifying SSL certificates requires L version 6.0 or -higher; explicitly passing C<--verify-ssl> on prior versions will error. - =item C<--extension> OPTIONAL Some MTAs will route mail sent to user-foo@host or user+foo@host to user@host