Kai Wilke <kiste@netzworkk.de> (Mo 26 Jan 2009 16:50:44 CET): > High, high ... > * Heiko Schlittermann <hs@schlittermann.de> schrieb am [26.01.09 16:29]: > > Kai Wilke <kiste@netzworkk.de> (Mo 26 Jan 2009 16:09:00 CET): > > > > > > > beschriebenen EHLO kannst Du probieren. (Vielleicht auch mal einen Blick > > > > > > Mit netcat bin ich bisher soweit: > > > echo EHLO hostname | nc -v hostname 25 > > > > > > Dadurch sehe ich zwar was ich brauche aber ich muss immer noch mit > > > STRG+C beenden. Und nun? > > > > Netcat hat 'ne Option (-q glaube ich). > > -w Sekunde ist besser:) > > > Aber wie ich beschrieben hatte, einige Mailserver möchten das Greeting > > loswerden: > > > > heiko@jumper:~$ echo EHLO me | netcat ssl.schlittermann.de 25 > > 554 SMTP synchronization error > > Muss ich noch testen, aber schon mal herzlichen Dank. Ich brauchte mal 'ne Pause. Vielleicht kannst Du das als "Start" nehmen. Aber es ist beiweitem nicht vollständig. SSL fehlt. (Ist vielleicht noch einfach mit IO::Socket::SSL. - aber es fehlt auch STARTTLS, das wird dann schon etwas aufwändiger...) ,------------------ | #! /usr/bin/perl | use strict; | use warnings; | use Sys::Hostname; | use IO::Socket::INET; | | my $HOSTNAME = hostname(); | my $REMOTE = shift or die "need remote host[:port]\n"; | | $REMOTE .= ":25" if not $REMOTE =~ /:/; | | my $s = new IO::Socket::INET($REMOTE) | or die "Can't open socket to $REMOTE\n"; | | # Get the greeting and even expect continuation lines | # I do not know if they may appear in the greeting, probably not, | # because it's feature of ESMTP and the server doesn't know if the | # client would understand it) | | while (<$s>) { last if /^\d{3}\s/ } | | # Do not continue on any error | /^2/ or die "expected 2xx\n"; | | # Do not continue if the server does not speak ESMTP | /ESMTP/ or die "expected ESMTP"; | | print {$s} "EHLO $HOSTNAME\r\n"; | | # Parse the response to the EHLO | while (<$s>) { | | #print; # for debugging | print join "\n", split, "" if s/^.*AUTH\s+//; | last if /^\d{3}\s/; # last line | } | | exit 0; `------------------ Best regards from currently Atlanta (Georgia/USA) Viele Grüße aus z.Z. Atlanta Heiko Schlittermann -- SCHLITTERMANN.de ---------------------------- internet & unix support - Heiko Schlittermann HS12-RIPE ----------------------------------------- gnupg encrypted messages are welcome - key ID: 48D0359B --------------- gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B -
Attachment:
signature.asc
Description: Digital signature