Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Recensione vivo X300 Pro: è ancora lui il re della fotografia mobile, peccato per la batteria
Recensione vivo X300 Pro: è ancora lui il re della fotografia mobile, peccato per la batteria
vivo X300 Pro rappresenta un'evoluzione misurata della serie fotografica del produttore cinese, con un sistema di fotocamere migliorato, chipset Dimensity 9500 di ultima generazione e l'arrivo dell'interfaccia OriginOS 6 anche sui modelli internazionali. La scelta di limitare la batteria a 5.440mAh nel mercato europeo, rispetto ai 6.510mAh disponibili altrove, fa storcere un po' il naso
Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'' per spingere gli handheld gaming PC al massimo
Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'' per spingere gli handheld gaming PC al massimo
Lenovo Legion Go 2 è la nuova handheld PC gaming con processore AMD Ryzen Z2 Extreme (8 core Zen 5/5c, GPU RDNA 3.5 16 CU) e schermo OLED 8,8" 1920x1200 144Hz. È dotata anche di controller rimovibili TrueStrike con joystick Hall effect e una batteria da 74Wh. Rispetto al dispositivo che l'ha preceduta, migliora ergonomia e prestazioni a basse risoluzioni, ma pesa 920g e costa 1.299€ nella configurazione con 32GB RAM/1TB SSD e Z2 Extreme
AWS re:Invent 2025: inizia l'era dell'AI-as-a-Service con al centro gli agenti
AWS re:Invent 2025: inizia l'era dell'AI-as-a-Service con al centro gli agenti
A re:Invent 2025, AWS mostra un’evoluzione profonda della propria strategia: l’IA diventa una piattaforma di servizi sempre più pronta all’uso, con agenti e modelli preconfigurati che accelerano lo sviluppo, mentre il cloud resta la base imprescindibile per governare dati, complessità e lock-in in uno scenario sempre più orientato all’hybrid cloud
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 05-03-2004, 00:25   #1
vici_1
Senior Member
 
L'Avatar di vici_1
 
Iscritto dal: Aug 2002
Messaggi: 581
[C] utilizzare il protocollo SMTP

mi connetto al server di posta e mi ricosce, ma i comandi dopo HELO vengono rifiutati

Codice:
ecco la risposta dal server :

Server echoed1 '220 vsmtp3.tin.it ESMTP Service (7.0.019) ready
'
Server echoed2 '250-vsmtp3.tin.it Missing required domain name in EHLO, defaulte
d to your IP address [80.107.21.103]
250-DSN
250-8BITMIME
250-PIPELINING
250-HELP
250-AUTH=LOGIN
250-AUTH LOGIN CRAM-MD5 DIGEST-MD5 PLAIN
250-DELIVERBY 300
250 SIZE 29999104
'
Server echoed3 '500  command unrecognized
equired domain name in EHLO, defaulted to your IP address [80.107.21.103]
250-DSN
250-8BITMIME
250-PIPELINING
250-HELP
250-AUTH=LOGIN
250-AUTH LOGIN CRAM-MD5 DIGEST-MD5 PLAIN
250-DELIVERBY 300
250 SIZE 29999104
'
Server echoed4 '500  command unrecognized
equired domain name in EHLO, defaulted to your IP address [80.107.21.103]
250-DSN
250-8BITMIME
250-PIPELINING
250-HELP
250-AUTH=LOGIN
250-AUTH LOGIN CRAM-MD5 DIGEST-MD5 PLAIN
250-DELIVERBY 300
250 SIZE 29999104
'
Sending 'Connection Closing' command
Codice:
Questo e' il pezzo del sorgente :

#define MESHELO "ehlo\r\n\0"    
#define MESQUIT "QUIT\r\n\0"    
#define MESHELP "HELP\r\n\0"    
#define MESNOOP "NOOP\r\n\0"    
...
int main(int argc, char *argv[])
{
	if ( argc < 2 ) Usage();

	if (strcmp(argv[1], "client") == 0 )
	{
		// initialize wsock32.dll, requesting winsock 1.1
		if (argc!=3 ) Usage();
		if (!InitializeWinsock (MAKEWORD(1,1) ) ) return 1;
		client(argv[2]);
		WSACleanup();
	}
	return 0;
}

void client(char * server_IP)
{
SOCKET fd; 			// "file" descriptor for the network socket
SOCKADDR_IN saddr;
char buf[MAX_STRING];

    struct hostent *h;

    if ((h=gethostbyname(server_IP)) == NULL) {  /* get the host info */
		error("gethostbyname");
        exit(1);
    }
    printf("Host name  : %s\n", h->h_name);
    printf("IP Address : %s\n\n",inet_ntoa(*((struct in_addr *)h->h_addr)));

	if ((fd=socket(AF_INET,SOCK_STREAM,0)) == INVALID_SOCKET)
		error("Client: socket not connected ");

	saddr.sin_family = AF_INET;
	saddr.sin_addr.s_addr = inet_addr(inet_ntoa(*((struct in_addr *)h->h_addr))); 
	saddr.sin_port = htons(PORT);
	
	// request connection to server socket (remote machine)
	if (connect(fd, (LPSOCKADDR) &saddr, sizeof(saddr)) == SOCKET_ERROR)
		error("Client: connect ");

	if( recv(fd, buf, sizeof(buf), 0) == SOCKET_ERROR )
		error("Client: receiving failure ");

	printf("Server echoed1 '%s' \n",buf);
	
	if( send(fd, MESHELO, strlen(MESHELO)+1, 0) == SOCKET_ERROR )
		error("Server: sending failure ");
 		
	if( recv(fd, buf, sizeof(buf), 0) == SOCKET_ERROR )
		error("Client: receiving failure ");

	printf("Server echoed2 '%s' \n",buf);
//----
	if( send(fd, MESHELP, strlen(MESHELP)+1, 0) == SOCKET_ERROR )
		error("Server: sending failure ");
 		
	if( recv(fd, buf, sizeof(buf), 0) == SOCKET_ERROR )
		error("Client: receiving failure ");

	printf("Server echoed3 '%s' \n",buf);

	if( send(fd, MESQUIT, strlen(MESQUIT)+1, 0) == SOCKET_ERROR )
		error("Server: sending failure ");
 		
	if( recv(fd, buf, sizeof(buf), 0) == SOCKET_ERROR )
		error("Client: receiving failure ");

	printf("Server echoed4 '%s' \n",buf);
//<<<<<
//---	
	printf("Sending 'Connection Closing' command\n\n");

	if (closesocket(fd) == SOCKET_ERROR)
		error("Client: closing socket ");
}
vici_1 è offline   Rispondi citando il messaggio o parte di esso
Old 05-03-2004, 14:18   #2
cionci
Senior Member
 
L'Avatar di cionci
 
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
Prova con HELO al posto di EHLO...EHLO ha una sintassi diversa che non mi ricordo...
cionci è offline   Rispondi citando il messaggio o parte di esso
Old 05-03-2004, 23:24   #3
vici_1
Senior Member
 
L'Avatar di vici_1
 
Iscritto dal: Aug 2002
Messaggi: 581
Quote:
Originariamente inviato da cionci
Prova con HELO al posto di EHLO...EHLO ha una sintassi diversa che non mi ricordo...
Purtroppo avevo gia' provato, ma il risultato e' stato esattamente lo stesso , solo che in risposta il server, con HELO, non mi da l'elenco dei comandi
250-DSN
250-8BITMIME
250-PIPELINING
250-HELP
250-AUTH=LOGIN
250-AUTH LOGIN CRAM-MD5 DIGEST-MD5 PLAIN
250-DELIVERBY 300
250 SIZE 29999104

come invece avviene con EHLO.

Ecco il risultato con HELO :
Codice:
Host name  : mail.tin.it
IP Address : 62.211.72.20

Server echoed1 '220 vsmtp3.tin.it ESMTP Service (7.0.019) ready
'
Server echoed2 '250 vsmtp3.tin.it Missing required domain name in HELO, defaulte
d to your IP address [212.161.20.165]
'
Server echoed3 '500  command unrecognized
equired domain name in HELO, defaulted to your IP address [212.161.20.165]
'
Server echoed4 '500  command unrecognized
equired domain name in HELO, defaulted to your IP address [212.161.20.165]
'
Sending 'Connection Closing' command
vici_1 è offline   Rispondi citando il messaggio o parte di esso
Old 05-03-2004, 23:30   #4
cionci
Senior Member
 
L'Avatar di cionci
 
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
Scrivi HELO seguito da una qualsiasi stringa...
cionci è offline   Rispondi citando il messaggio o parte di esso
Old 05-03-2004, 23:53   #5
vici_1
Senior Member
 
L'Avatar di vici_1
 
Iscritto dal: Aug 2002
Messaggi: 581
Ho provato cosi' e in effetti qualche cosa e' cambiata
Codice:
#define MESHELO "HELO ciao\r\n\0"
Risposta

Codice:
Host name  : mail.tin.it
IP Address : 62.211.72.20

Server echoed1 '220 vsmtp4.tin.it ESMTP Service (7.0.019) ready
'
Server echoed2 '250 vsmtp4.tin.it
SMTP Service (7.0.019) ready
'
Server echoed3 '500  command unrecognized
vice (7.0.019) ready
'
Server echoed4 '500  command unrecognized
vice (7.0.019) ready
'
Sending 'Connection Closing' command
vici_1 è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Recensione vivo X300 Pro: è ancora lui il re della fotografia mobile, peccato per la batteria Recensione vivo X300 Pro: è ancora lui il...
Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'' per spingere gli handheld gaming PC al massimo Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'...
AWS re:Invent 2025: inizia l'era dell'AI-as-a-Service con al centro gli agenti AWS re:Invent 2025: inizia l'era dell'AI-as-a-Se...
Cos'è la bolla dell'IA e perché se ne parla Cos'è la bolla dell'IA e perché se...
BOOX Palma 2 Pro in prova: l'e-reader diventa a colori, e davvero tascabile BOOX Palma 2 Pro in prova: l'e-reader diventa a ...
Il nucleo della cometa interstellare 3I/...
La Russia potrebbe sviluppare un'arma pe...
Manda la RAM Corsair in assistenza, rice...
ASUS ROG G1000 con 'AniMe Holo': saranno...
Un test di longevità ha messo alla prova...
Incat inizia i test dell'incredibile tra...
LG Sound Suite: al CES il sistema audio ...
Avengers Doomsday, il primo trailer &egr...
La crisi delle memorie non farà sconti a...
Il trailer più atteso dell'anno &...
I gamer vogliono i monitor OLED: sopratt...
Samsung alza l’asticella dei televisori ...
Energie rinnovabili 2025: quasi 42% del ...
Le auto elettriche volano in tutta Europ...
Nuovo look per la finestra Esegui su Win...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 02:31.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Served by www3v