Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: mailing script

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Thumbs down mailing script


    mail proxy at 10.1.2.108

    why isnt this working? All domains are perfectly resolved.

    Code:
    #!/bin/bash
    
    sleep 1
    mymail ()
    {
      (
    echo "ehlo proxy.example.com"
    sleep 1
    echo "mail from:user_x@external.example.com"
    sleep 1
    echo "rcpt to:user_x@internal.example.com"
    sleep 1
    echo "data"
    sleep 1
    echo "Hi this is a simple mail !"
    sleep 1
    echo "."
    sleep 1
    echo "quit"
    sleep 1
       ) | telnet 10.1.2.108 25
    }
    
    
    mymail

  2. #2
    Does the telnet command work if you type it in a shell?

  3. #3
    yes i am able to telnet and mail but not through script. any suggestion to do same with perl would be welcome as well

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •