Re: [Harbour] Please try this sendmail patch

2009-11-21 Thread Viktor Szakáts
Hi Francesco,

 If it works for you or doesn't, please test this patch in
 contrib\hbtip and report.

The additional two GetOK() calls don't look correct to me, 
first of all because they happen right after opening the 
connection when no request has been sent out to SMTP server 
yet.

Second because GetOK() _is_ actually called after HELO and 
EHLO requests in line 124 and 143.

Can you try whether upping the timeout by itself solves your 
problems?

Brgds,
Viktor

 
 Index: smtpcli.prg
 ===
 --- smtpcli.prg   (revision 12954)
 +++ smtpcli.prg   (working copy)
 @@ -96,10 +97,11 @@
   bTrace := {| cMsg | iif( PCount()  0, oLog:Add( cMsg ), oLog:Close() ) 
 }
ENDIF
 
::super:New( oUrl, bTrace, oCredentials )
 
::nDefaultPort := iif( ::oUrl:cProto == smtps, 465, 25 )
 -   ::nConnTimeout := 5000
 +   ::nConnTimeout := 5
::nAccessMode := TIP_WO  // a write only
 
RETURN Self
 @@ -110,6 +112,10 @@
   RETURN .F.
ENDIF
 
 +   IF ! ::GetOk()
 +  RETURN .F.
 +   ENDIF
 +
DEFAULT lTLS TO .F.
 
IF lTLS
 @@ -129,6 +135,10 @@
   RETURN .F.
ENDIF
 
 +   IF ! ::GetOk()
 +  RETURN .F.
 +   ENDIF
 +
DEFAULT lTLS TO .F.
 
IF lTLS
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-21 Thread francesco perillo
Viktor, I DID try to just raise timeouts and I did some more tests.

My MTA is exim and it is very strict on the protocol.

Try to issue this command:
telnet mailserver 25
and you will get a
220 message
and ONLY IN THIS MOMENT you can issue commands !

Exim doesn't accept any command before the 220 is sent ! In the past,
a lot of spam software did send the HELO without waiting for the 220
banner and exim killed them

Gmail accepts the message without the patch and probably the same will
happen with other MTAs


I want to say that  in a particular case (external antivirus + backend
MTA) I have
220-message 1
220 message 2
and if the backend is  down I get a
5xx error message

 Second because GetOK() _is_ actually called after HELO and
 EHLO requests in line 124 and 143.

It is correct that it is called after HELO/EHLO ! But the reply must
be correctly checked !

Finally, please try the patch

Thanks,
Francesco
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-21 Thread Viktor Szakáts
Hi Francesco,

 Viktor, I DID try to just raise timeouts and I did some more tests.
 
 My MTA is exim and it is very strict on the protocol.
 
 Try to issue this command:
 telnet mailserver 25
 and you will get a
 220 message
 and ONLY IN THIS MOMENT you can issue commands !
 
 Exim doesn't accept any command before the 220 is sent ! In the past,
 a lot of spam software did send the HELO without waiting for the 220
 banner and exim killed them
 
 Gmail accepts the message without the patch and probably the same will
 happen with other MTAs
 
 
 I want to say that  in a particular case (external antivirus + backend
 MTA) I have
 220-message 1
 220 message 2
 and if the backend is  down I get a
 5xx error message

Thanks for the explanation, you're right. Before reading 
through your msg I've also checked RFC821 
(http://james.apache.org/server/rfclist/smtp/rfc0821.txt) 
and it also says what you say in chapter 4.3.

I'll make some tests as soon as Win7 reboots itself 
correctly (2nd attempt) after BSOD-ing on my test build.

I did a quick test with gmail and it's okay, plus 
finally the protocol conversation makes some sense.

Thanks for your report, this has been a bug ever since 
hbtip existed.

Brgds,
Viktor

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread Bruno Luciani
Francesco

Actually I use HB_Sendmail from svn and works ok

Bruno Luciani

2009/11/20 francesco perillo fperi...@gmail.com

 Is anybody using hb_sendmail() ? I already said that it is not fully
 smtp protocol compliant and my tests (trunk compiled with bcc)
 didn't worked at all due to this incoorect protocol implementation

 So, if you are using this patch and it works ok for you, please tell me !

 If it works for you or doesn't, please test this patch in
 contrib\hbtip and report.

 Thanks,
 Francesco


 Index: smtpcli.prg
 ===
 --- smtpcli.prg (revision 12954)
 +++ smtpcli.prg (working copy)
 @@ -96,10 +97,11 @@
   bTrace := {| cMsg | iif( PCount()  0, oLog:Add( cMsg ), oLog:Close()
 ) }
ENDIF

::super:New( oUrl, bTrace, oCredentials )

::nDefaultPort := iif( ::oUrl:cProto == smtps, 465, 25 )
 -   ::nConnTimeout := 5000
 +   ::nConnTimeout := 5
::nAccessMode := TIP_WO  // a write only

RETURN Self
 @@ -110,6 +112,10 @@
   RETURN .F.
ENDIF

 +   IF ! ::GetOk()
 +  RETURN .F.
 +   ENDIF
 +
DEFAULT lTLS TO .F.

IF lTLS
 @@ -129,6 +135,10 @@
   RETURN .F.
ENDIF

 +   IF ! ::GetOk()
 +  RETURN .F.
 +   ENDIF
 +
DEFAULT lTLS TO .F.

IF lTLS
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread francesco perillo
Hi Bruno,
thank you for your reply.

I have some ideas ...

can you please show me how do you call hb_sendmail() ?

can you please compile and run contrib/hbtip/tests/gmail.prg (after
changing the data inside) and run it ?

Which are your operating system and compiler used ?

Thank you
Francesco
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread Viktor Szakáts
With SSL (gmail) I used to experience some instability 
in sending process. Sometimes it doesn't catch it. 
Maybe timeout issue. I don't use hbtip mail for anything 
critical ATM, so I just didn't care to spend another big 
chunk of time to get to the end of it.

Brgds,
Viktor

On 2009 Nov 21, at 01:06, Bruno Luciani wrote:

 Francesco
 
 Actually I use HB_Sendmail from svn and works ok
 
 Bruno Luciani
 
 2009/11/20 francesco perillo fperi...@gmail.com
 Is anybody using hb_sendmail() ? I already said that it is not fully
 smtp protocol compliant and my tests (trunk compiled with bcc)
 didn't worked at all due to this incoorect protocol implementation
 
 So, if you are using this patch and it works ok for you, please tell me !
 
 If it works for you or doesn't, please test this patch in
 contrib\hbtip and report.
 
 Thanks,
 Francesco
 
 
 Index: smtpcli.prg
 ===
 --- smtpcli.prg (revision 12954)
 +++ smtpcli.prg (working copy)
 @@ -96,10 +97,11 @@
   bTrace := {| cMsg | iif( PCount()  0, oLog:Add( cMsg ), oLog:Close() ) 
 }
ENDIF
 
::super:New( oUrl, bTrace, oCredentials )
 
::nDefaultPort := iif( ::oUrl:cProto == smtps, 465, 25 )
 -   ::nConnTimeout := 5000
 +   ::nConnTimeout := 5
::nAccessMode := TIP_WO  // a write only
 
RETURN Self
 @@ -110,6 +112,10 @@
   RETURN .F.
ENDIF
 
 +   IF ! ::GetOk()
 +  RETURN .F.
 +   ENDIF
 +
DEFAULT lTLS TO .F.
 
IF lTLS
 @@ -129,6 +135,10 @@
   RETURN .F.
ENDIF
 
 +   IF ! ::GetOk()
 +  RETURN .F.
 +   ENDIF
 +
DEFAULT lTLS TO .F.
 
IF lTLS
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour
 
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread Bruno Luciani
I am not using SSL

I use it in windows in an OOHG aplication , and compiled using Mingw


function sendcaja(cuerpo)
if hb_sendmail('200.xxx.xxx.xxx',,'f...@domain',{'adre...@domain
','adre...@domain'},,,cuerpo,'Cierre de caja')
   else
   msginfo(No se pudo contactar el servidor de correo ,Verifique
conectividad )
endif
return


When I have some time for tests I try gmail.prg

Bruno

2009/11/20 francesco perillo fperi...@gmail.com

 Hi Bruno,
 thank you for your reply.

 I have some ideas ...

 can you please show me how do you call hb_sendmail() ?

 can you please compile and run contrib/hbtip/tests/gmail.prg (after
 changing the data inside) and run it ?

 Which are your operating system and compiler used ?

 Thank you
 Francesco
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread francesco perillo
 I am not using SSL
 I use it in windows in an OOHG aplication , and compiled using Mingw
ok

 hb_sendmail('200.xxx.xxx.xxx',,'f...@domain',{'adre...@domain','adre...@domain'},,,cuerpo,'Cierre
  de caja')

Is it possible to have (in private mail) the IP of the server and an
address I can send some test mails to ?

In the meanwhile I will also try to install mingw

 When I have some time for tests I try gmail.prg

Don't lose time if you don't have openssl installed

Francesco
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread francesco perillo
gmail only supports SSL mail or TLS on port 25... in my bcc setup I
don't have openssl so I can't connect to gmail (at the moment)

Do you have a server you connect without authentication on port 25 for
mail delivery ? Does it work for you ?

Standard timeout is 1 second... gmail is quick but

I'm thinking to switch to another system creating the mail file on
disk and run an external to do the delivery

Francesco
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread Bruno Luciani
My server uses TLS

But you can' t  use it , it is blocked for all IP' s

I only can Send Mail from My Public and Fixed IP

It is an antispam protection , sorry about that

Bruno

2009/11/20 francesco perillo fperi...@gmail.com

  I am not using SSL
  I use it in windows in an OOHG aplication , and compiled using Mingw
 ok
 
  hb_sendmail('200.xxx.xxx.xxx',,'f...@domain',{'adre...@domain
 ','adre...@domain'},,,cuerpo,'Cierre de caja')

 Is it possible to have (in private mail) the IP of the server and an
 address I can send some test mails to ?

 In the meanwhile I will also try to install mingw

  When I have some time for tests I try gmail.prg

 Don't lose time if you don't have openssl installed

 Francesco
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread Bruno Luciani
May be BLAT ?

Bruno

2009/11/20 francesco perillo fperi...@gmail.com

 gmail only supports SSL mail or TLS on port 25... in my bcc setup I
 don't have openssl so I can't connect to gmail (at the moment)

 Do you have a server you connect without authentication on port 25 for
 mail delivery ? Does it work for you ?

 Standard timeout is 1 second... gmail is quick but

 I'm thinking to switch to another system creating the mail file on
 disk and run an external to do the delivery

 Francesco
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread Bruno Luciani
Try this

http://www.e-eeasy.com/SMTPServerList.aspx

Bruno

2009/11/20 francesco perillo fperi...@gmail.com

 gmail only supports SSL mail or TLS on port 25... in my bcc setup I
 don't have openssl so I can't connect to gmail (at the moment)

 Do you have a server you connect without authentication on port 25 for
 mail delivery ? Does it work for you ?

 Standard timeout is 1 second... gmail is quick but

 I'm thinking to switch to another system creating the mail file on
 disk and run an external to do the delivery

 Francesco
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread Viktor Szakáts
gmail SMTPS servers are perfect for testing.

Brgds,
Viktor

On 2009 Nov 21, at 03:15, Bruno Luciani wrote:

 Try this
 
 http://www.e-eeasy.com/SMTPServerList.aspx
 
 Bruno
 
 2009/11/20 francesco perillo fperi...@gmail.com
 gmail only supports SSL mail or TLS on port 25... in my bcc setup I
 don't have openssl so I can't connect to gmail (at the moment)
 
 Do you have a server you connect without authentication on port 25 for
 mail delivery ? Does it work for you ?
 
 Standard timeout is 1 second... gmail is quick but
 
 I'm thinking to switch to another system creating the mail file on
 disk and run an external to do the delivery
 
 Francesco
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour
 
 ___
 Harbour mailing list (attachment size limit: 40KB)
 Harbour@harbour-project.org
 http://lists.harbour-project.org/mailman/listinfo/harbour

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Please try this sendmail patch

2009-11-20 Thread francesco perillo
At the moment I tried hb_sendmail against exim without any form of
authentication, just plain old clear-text smtp I will try Qmail
and other servers this evening but I have to remove the patch first...

The problem is that hb_sendmail() sends the EHLO or HELO command
without waiting for the 220 here I am from the server... and they
both refuse it

Francesco
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour