Nachdem ich mir gerade einen Wolf gesucht hab wie ich telnet per bash steuern kann… hier das Ergebniss…

    #!/bin/bash
    expect << EOF
    set timeout 20
    spawn telnet 192.168.0.1 25
    expect "220 192.168.0.1 ESMTP ... ready"
    send "helo 192.168.0.1r"
    expect "250 192.168.0.1 Hello 192.168.0.2*"
    send "mail from: user@domain.tldr"
    expect "250 OK"
    send "rcpt to: user2@domain.tldr"
    expect "250 OK"
    send "datar"
    expect "354 Enter mail*"
    send "server is downr"
    send ".r"
    exit
    EOF

    Ein Kommentar

    Reply To Frank Cancel Reply