Se tu não quiser ver o que ta se passando:

[r...@pinky ~]# telnet localhost 25 >log.txt 2>&1
ehlo me
mail from: <[email protected]>
quit
[r...@pinky ~]# cat log.txt
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 cerebro.prosul.com ESMTP Postfix
250-cerebro.prosul.com
250-PIPELINING
250-SIZE 15240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
250 2.1.0 Ok
221 2.0.0 Bye
Connection closed by foreign host.
[r...@pinky ~]#


Se tu quiser VER, mas nao vai ver a tua input:

[r...@pinky ~]# telnet localhost 25 2>&1 | tee nada.txt
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 cerebro.prosul.com ESMTP Postfix
ehlo me
250-cerebro.prosul.com
250-PIPELINING
250-SIZE 15240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: <[email protected]>
250 2.1.0 Ok
quit
221 2.0.0 Bye
Connection closed by foreign host.
[r...@pinky ~]# cat nada.txt
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 cerebro.prosul.com ESMTP Postfix
250-cerebro.prosul.com
250-PIPELINING
250-SIZE 15240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
250 2.1.0 Ok
221 2.0.0 Bye
Connection closed by foreign host.
[r...@pinky ~]#


--

Flávio do Carmo Júnior aka waKKu

2009/4/23 Amador Pahim <[email protected]>:
>
>
> Pessoal,
>
> Executo:
>
> ama...@amador-desktop:~$ telnet smtp.dominio.com.br 25
> Trying 192.168.10.10...
> Connected to smtp.dominio.com.br.
> Escape character is '^]'.
>
> Agora vou dar comandos SMTP dentro do telnet:
>
> ehlo localhost
> 250-smtp.dominio.com.br
> 250-PIPELINING
> 250-SIZE 52428800
> 250-VRFY
> 250-ETRN
> 250-AUTH LOGIN PLAIN
> 250-AUTH=LOGIN PLAIN
> 250 8BITMIME
>
> O que quero fazer eh mandar o resultado desse "ehlo localhost" para um
> arquivo de texto na máquina que origina o telnet. Seria algo como: "ehlo
> localhost > /tmp/file.txt", mas isso não funciona, obviamente, pois estou
> dentro de uma sessão telnet.
>
> Alguma sugestão?
>
> Abraço,
> Amador Pahim
>
> Veja quais são os assuntos do momento no Yahoo! +Buscados
> http://br.maisbuscados.yahoo.com
>
> [As partes desta mensagem que não continham texto foram removidas]
>
> 

Responder a