Python
Results 1 to 4 of 4

Thread: Python

  1. #1
    Junior Member
    Join Date
    Dec 2004
    Posts
    12

    Python

    I have a python code that has a line:
    msg=rfc822.Message(sys.stdin)
    The python script running this extracts the message in 'msg' and then gets the various header fields out of it.
    However i ve just started with python and not able to figure out in the script how the mails are being sent.Something about 'procmail' was mentioned in the documentation but wasn't very clear.
    What the script does it is to automate file extraction(body of the message) through this mail.
    I am not very clear with the whole process.Can someone help me out.Any useful links are welcome too.

  2. #2
    Super Moderator
    Know-it-All Master Beaver

    Join Date
    Jan 2003
    Posts
    3,914
    Hey Hey,

    Is this a script that you've written... or something you've downloaded.. I'm guessing something you've downloaded and if that's the case you need to provide us with more than a single line of code.. either the script itself or a link to it....

    Peace,
    HT
    IT Blog: .:Computer Defense:.
    PnCHd (Pronounced Pinched): Acronym - Point 'n Click Hacked. As in: "That website was pinched" or "The skiddie pinched my computer because I forgot to patch".

  3. #3
    Junior Member
    Join Date
    Dec 2004
    Posts
    12
    here's a part of script...

    # Read the message headers from stdin
    msg = rfc822.Message( sys.stdin )
    fromwho = msg.getaddr( "From" )
    subject = msg.getheader( "Subject" )
    l = string.split( subject, " " )...

    newayz what i want to know is that how to use procmail along with this python script...

  4. #4
    Super Moderator
    Know-it-All Master Beaver

    Join Date
    Jan 2003
    Posts
    3,914
    I hate to quote myself but

    if that's the case you need to provide us with more than a single line of code.. either the script itself or a link to it....
    I can tell you that it's reading from stdin from what you pasted which means you could pipe data into it from any program that prints on the command line... but that's about it...

    Peace,
    HT
    IT Blog: .:Computer Defense:.
    PnCHd (Pronounced Pinched): Acronym - Point 'n Click Hacked. As in: "That website was pinched" or "The skiddie pinched my computer because I forgot to patch".

Posting Permissions

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