On Tue, Sep 21, 2010 at 10:33:35AM +0200, Osvaldo Alvarez Pozo wrote:
> Hi all
>  I am new to ldirectord I confuguring some virtual serveurs for the
> moment i use checktype =connect i do not know if this is the rigth
> configuration. My main problème is checking submission port and smtps
> as version 2.1.3 of ldirectord  only have smtp as service type.
> 
> How do I do?

Hi,

using checktype=connect will work, but it only checks to make sure
that the port can accept a TCP connection. You can do a slightly
deeper check using checktype=negotiate.

In order to check submission (which as I understand it is basically
SMTP running on port 587) you can using the following in the
configuration of your virtual service.

        service=smtp
        checkport=587
        checktype=negotiate

And for smtp you can use

        service=smtp
        checkport=25 # you can omit this line
        checktype=negotiate

I have also committed the attached patch which adds a submission check
to ldirectord. With it applied you can use the following:

        service=submission
        checkport=587 # you can omit this line
        checktype=negotiate



# HG changeset patch
# User Simon Horman <[email protected]>
# Date 1285074614 -32400
# Node ID d5ef0d2ef37f2f24d3eca45dbfae0c70e40319aa
# Parent  244d046ec46ee8d18b1419bae768a47f79ebbfb7
medium: ldirectord: add implicit support for  submission RFC4409

This is really just an alias for smtp on port 587

diff -r 244d046ec46e -r d5ef0d2ef37f ldirectord/ldirectord.in
--- a/ldirectord/ldirectord.in	Tue Sep 21 13:57:24 2010 +0200
+++ b/ldirectord/ldirectord.in	Tue Sep 21 22:10:14 2010 +0900
@@ -448,7 +448,7 @@
 On means no checking will take place and real servers will always be
 activated. Default is I<negotiate>.
 
-B<service = >B<dns> | B<ftp> | B<http> | B<https> | B<http_proxy> | B<imap> | B<imaps> | B<ldap> | B<mysql> | B<nntp> | B<none> | B<oracle> | B<pgsql> | B<pop> | B<pops> | B<radius> | B<simpletcp> | B<sip> | B<smtp>
+B<service = >B<dns> | B<ftp> | B<http> | B<https> | B<http_proxy> | B<imap> | B<imaps> | B<ldap> | B<mysql> | B<nntp> | B<none> | B<oracle> | B<pgsql> | B<pop> | B<pops> | B<radius> | B<simpletcp> | B<sip> | B<smtp> | B<submission>
 
 The type of service to monitor when using checktype=negotiate. None denotes
 a service that will not be monitored.
@@ -480,6 +480,8 @@
 
 =item * Virtual server port is 443: https
 
+=item * Virtual server port is 587: submission
+
 =item * Virtual server port is 993: imaps
 
 =item * Virtual server port is 995: pops
@@ -1493,6 +1495,7 @@
 							  $1 eq "pgsql"	||
 							  $1 eq "sip"	||
 							  $1 eq "smtp"	||
+							  $1 eq "submission"	||
 							  $1 eq "simpletcp")
 					    or &config_error($line,
 							     "service must " .
@@ -1507,7 +1510,8 @@
 							     "radius, "      .
 							     "pgsql, "       .
 							     "simpletcp, "   .
-							     "sip or smtp");
+							     "sip, smtp "    .
+							     "or submission");
 					$vsrv{service} = $1;
 					if($vsrv{service} eq "ftp" and
 							$vsrv{login} eq "") {
@@ -1793,6 +1797,7 @@
 	if ($port eq 143)	{ return "imap"; }
 	if ($port eq 389)	{ return "ldap"; }
 	if ($port eq 443)	{ return "https"; }
+	if ($port eq 587)	{ return "submission"; }
 	if ($port eq 995)	{ return "pops"; }
 	if ($port eq 993)	{ return "imaps"; }
 	if ($port eq 1521)	{ return "oracle"; }
@@ -1823,6 +1828,7 @@
 	if ($service eq "imap")		{ return 143; }
 	if ($service eq "ldap")		{ return 389; }
 	if ($service eq "https")	{ return 443; }
+	if ($service eq "submission")	{ return 587; }
 	if ($service eq "imaps")	{ return 993; }
 	if ($service eq "pops")		{ return 995; }
 	if ($service eq "oracle")	{ return 1521; }
@@ -2669,7 +2675,7 @@
 			$$r{num_connects} = 0 if (check_imap($v, $r) == $SERVICE_UP);
 		} elsif ($$v{service} eq "imaps") {
 			$$r{num_connects} = 0 if (check_imaps($v, $r) == $SERVICE_UP);
-		} elsif ($$v{service} eq "smtp") {
+		} elsif ($$v{service} eq "smtp" or $$v{service} eq "submission") {
 			$$r{num_connects} = 0 if (check_smtp($v, $r) == $SERVICE_UP);
 		} elsif ($$v{service} eq "ftp") {
 			$$r{num_connects} = 0 if (check_ftp($v, $r) == $SERVICE_UP);
@@ -2851,7 +2857,7 @@
 	my ($v, $r) = @_;
 	my $port = ld_checkport($v, $r);
 
-	&ld_debug(2, "Checking smtp: server=$$r{server} port=$port");
+	&ld_debug(2, "Checking $$v{service}: server=$$r{server} port=$port");
 
 	my $smtp = new Net::SMTP($$r{server}, Port => $port,
 			Timeout => $$v{negotiatetimeout});
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - [email protected]
Send requests to [email protected]
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Reply via email to