Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi i am using linux command "cat msgbad1.txt | mail admin@sct.com ". Here msgbad1.txt contains email details as From address and To address and details about attachment in a encrypted ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7

    sending mail with attachment using linux commands


    Hi i am using linux command "cat msgbad1.txt | mail admin@sct.com".
    Here msgbad1.txt contains email details as From address and To address and details about attachment in a encrypted format like this text file which follows msgbad1.txt . I want to receive mail with attachment(as a word document(Announcement.doc) using decrypted format) which is mentioned in above text file. Could anybody suggest me on this.

  2. #2
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7

    please reply

    Hi i need help on this .

  3. #3
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    I don't understand this question.
    The regarding RFCs describe the format an email (and its attachments) must have so that a standard mail client can understand it.
    Mailing Attachments from UNIX
    Debian GNU/Linux -- You know you want it.

  4. #4
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7

    Hi

    Hi actually msgbad1.txt file contains email details like from address and to address and attachment name and data of attachment in a encrypted format, i need to convert this encrypted content into user understandable format and send it is an attachment to the specified user.

  5. #5
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    So you do not know how to decrypt the messy text?
    Debian GNU/Linux -- You know you want it.

  6. #6
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7
    yes i am a bit

  7. #7
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    How was msgbad1.txt generated?
    Debian GNU/Linux -- You know you want it.

  8. #8
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7
    That is we are not sure we got it from client. Actually i got a solution using telnet session but that is not a recommended way of solving problem. I am not sure whether it is possible through cat commands.

  9. #9
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7

    Using telnet session

    $ telnet slctests14g.abc.com 25
    220 ...
    helo slctests14g.abc.com
    250 slctests14g.abc.com Hello slctests14g.abc.com, pleased to meet you
    mail from:<admin@abc.com>
    250 2.1.0 <admin@abc.com>... Sender ok
    rcpt to:<admin@abc.com>
    250 2.1.5 <admin@abc.com>... Recipient ok
    data
    354 Enter mail, end with "." on a line by itself
    From: admin@abc.com
    To: admin@abc.com
    Date: Tue, 24 Feb 2009 15:37:00 -0700
    Subject: test message

    this is a test
    .
    250 2.0.0 n1OMaVSc005190 Message accepted for delivery
    quit
    221 2.0.0 slctests14g.sct.com closing connection
    Connection closed by foreign host.

    $

  10. #10
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    The rectangular garbage text block is base64 encoded.
    Copy it in your text editor, without the last line (------=_N000_00ED--).

    Remove all newlines, so that the whole messy text is one singe long line.

    Look for online base64 decoders or type
    base64 -d messy.txt > out.doc

    This should result in a file you can handle.
    Debian GNU/Linux -- You know you want it.

Page 1 of 2 1 2 LastLast

Posting Permissions

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