Find the answer to your Linux question:
Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    23

    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
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Does the telnet command work if you type it in a shell?

  3. #3
    Just Joined!
    Join Date
    Feb 2008
    Posts
    23
    yes i am able to telnet and mail but not through script. any suggestion to do same with perl would be welcome as well

Posting Permissions

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