Announcement

Collapse
No announcement yet.

SMTP Checking of mail

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SMTP Checking of mail

    Lets say my program was smart, it sends back an instruction via email and awaits additional instructions back...
    I'd like it to check an email account for an email.
    Now sendign it is a breeze, finally mastered that I believe...

    I'd like it to check an email account, read the BODY portion of the email and follow a set of instructions given in that email...(That's the easy part)...

    This could save me a HUGe amount of time vs following 20,000 possible instructions...
    (it's locating and retrieving SPECiFIC data types and files from it's "host" machine)..


    Thanks,

    Scott


    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    I once posted a POP3 "CheckMail" sample to source code forum,
    which may be able to help you out. It shows how to check a
    mailbox, download eventual mail and parse out the different parts.
    Search source code forum, or POFFS, for POP3 and you will find
    several samples, including the one mentioned above.


    ------------------




    [This message has been edited by Borje Hagsten (edited December 31, 2000).]

    Comment


    • #3
      OK Thanks,
      One question, is POP3 the same as SMTP? I mean, no, but what i am connecting to is HOTMAIL, and I'm fairly certain they are only SMTP??? Or maybe I'm not...


      Scott


      ------------------
      Scott
      mailto:[email protected][email protected]</A>
      Scott Turchin
      MCSE, MCP+I
      http://www.tngbbs.com
      ----------------------
      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

      Comment


      • #4
        Scott,

        To validate an email address you must first get the MX lookup of
        the SMTP server, then query that.

        ------------------
        -Greg
        -Greg
        [email protected]
        MCP,MCSA,MCSE,MCSD

        Comment


        • #5
          Lets assume I have the MX already, mail.hotmail.com, let ARP find the address for me, that's what the stack is for...


          I suppose I need to go to the RFC and find the command for SMTP checking of mailboxes

          The HELP returns the following commands:
          220 myserver.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.1600
          ready at Sun, 31 Dec 2000 09:57:18 -0800
          214-This server supports the following commands:
          214 HELO EHLO STARTTLS RCPT DATA RSET MAIL QUIT HELP AUTH TURN ATRN ETRN BDAT VRFY


          ------------------
          Scott
          mailto:[email protected][email protected]</A>

          [This message has been edited by Scott Turchin (edited December 31, 2000).]
          Scott Turchin
          MCSE, MCP+I
          http://www.tngbbs.com
          ----------------------
          True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

          Comment


          • #6
            Scott --
            Do you want to read SMTP contents ?!
            Hope and don't beleive that this is possible.
            To POP you have access by password and can receive access to own mailbox only.
            A password for SMTP is not used and there are some crazy administrators, which even do not test IP addresses
            (for example, teamcast).
            In my oppinion, a requirement of safety automatically excludes a possibility to read SMTP contents.


            ------------------
            E-MAIL: [email protected]

            Comment


            • #7
              So what you are say ing is that it is not possible to read SMTP?

              Lets assume I own the server and I administer it (I do), there are ways to read the mailbox and the file, parse it out etc, but there's no command to simulate POP3?


              I gathered from what you said that POP3 is the only way to READ mail, but SMTP is for sending?

              (Everyone uses SMTP for sending, but reading??)


              Scott

              ------------------
              Scott
              mailto:[email protected][email protected]</A>
              Scott Turchin
              MCSE, MCP+I
              http://www.tngbbs.com
              ----------------------
              True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

              Comment


              • #8
                smtp on port 25 is purely for sending, if you want to read\download email from an account you connect to a pop3(port110)
                if you check out http://www.powerbasic.com/support/pb...ad.php?t=24057 youll see a very simple email-checker-thingy for pb\cc - couldnt be any easier !
                i love pb's tcp\udp support

                best of luck,
                wayne



                ------------------
                -

                Comment


                • #9
                  Scott --
                  We talk about protocols. They do not include unnecessary operations.
                  Unlike POP3, client's software do not need and should not read outgoing post.

                  If you are administrator, you can run a program on server and to have access to SMTP boxes like to any folder/file.
                  But where and in which format the letters are stored depends of Web software only.
                  So, in my oppinion, you should search in documentation to your Web-server (not in RFC).


                  ------------------
                  E-MAIL: [email protected]

                  Comment


                  • #10
                    Ah, I see your point.
                    But since the client does not read SMTP but only POP3 there's no need for me to do that

                    I use Win2k, just a plain text file, but I'll be using hotmail in the end...

                    Thanks, Think I got it figured out, and this should work just fine!!


                    Scott


                    ------------------
                    Scott
                    mailto:[email protected][email protected]</A>
                    Scott Turchin
                    MCSE, MCP+I
                    http://www.tngbbs.com
                    ----------------------
                    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                    Comment


                    • #11
                      There seems to be some confusion over e-mail protocols. According to RFC821, the Simple Mail Transfer Protocol (SMTP) can send and receive mail.

                      3.8. CHANGING ROLES

                      The TURN command may be used to reverse the roles of the two
                      programs communicating over the transmission channel.

                      If program-A is currently the sender-SMTP and it sends the TURN
                      command and receives an ok reply (250) then program-A becomes the
                      receiver-SMTP.

                      If program-B is currently the receiver-SMTP and it receives the
                      TURN command and sends an ok reply (250) then program-B becomes
                      the sender-SMTP.

                      To refuse to change roles the receiver sends the 502 reply.

                      Please note that this command is optional. It would not normally
                      be used in situations where the transmission channel is TCP.
                      However, when the cost of establishing the transmission channel is
                      high, this command may be quite useful. For example, this command
                      may be useful in supporting be mail exchange using the public
                      switched telephone system as a transmission channel, especially if
                      some hosts poll other hosts for mail exchanges.
                      The Post Office Protocol version 3 (POP3) is described in RFC1939 and the Internet Message Access Protocol version 4 (IMAP4) is described in RFC2060, RFC2061 and RFC2683.

                      HTH

                      John

                      Comment


                      • #12
                        I th ink they should obsolete them all and make one simple protocol for sending and receiving, and POP3 seems to work fine for receiving.
                        I'm understanding this better.

                        see my post on simple pop3 in the source code forum, that took 20 minutes to write after reading the RFC, and it's by no means perfect but does the VERY basics


                        I can see where writing a POP3 server would be fairly easy, to some extent, time consuming yes, but easy...

                        And they charge SO SO much for POP3 servers...


                        Scott

                        ------------------
                        Scott
                        mailto:[email protected][email protected]</A>
                        Scott Turchin
                        MCSE, MCP+I
                        http://www.tngbbs.com
                        ----------------------
                        True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                        Comment


                        • #13
                          Hi,

                          There is an email server free for use,
                          it includes SMTP and POP3:

                          www.freedomized.com/idoor/product/iserver3/iserver.htm

                          mailto:[email protected][email protected]</A>

                          ------------------

                          Comment


                          • #14
                            Is the product in english? I could not get to the page because I do not have the chinese language in.

                            Scott


                            ------------------
                            Scott
                            mailto:[email protected][email protected]</A>
                            Scott Turchin
                            MCSE, MCP+I
                            http://www.tngbbs.com
                            ----------------------
                            True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                            Comment


                            • #15
                              Scott,

                              Try this link:

                              www.freedomized.com/idoor/product/iserver3/iserver3.zip


                              mailto:[email protected][email protected]</A>

                              ------------------

                              Comment


                              • #16
                                Scott,

                                I'm running Linux and my POP3 server is free, and comes with the source code. As a matter of fact my SMTP server is free, my NNTP server is free, my FTP server is free, my Telnet, NTP, SSH, DNS, HTTP, etc servers are all free and provide full source code.

                                Have a nice day.

                                John

                                Comment


                                • #17
                                  I run a Linux Server too, and found that it was just as insecure and a pain to plug up with patches as was MS.
                                  My server was hacked, the WUFTP (???) module has a hole in it, also has a hole in 7.0 of Redhats, Sun, FreeBSD, quite a few have that hole in them that allowed this jerk to gain root access on my server...

                                  But the qmail rocks, I had that on my box but the box is my router and I don't want it having any uncessary strain since it's only a 486 DX4/100 w/64 megs of ram...

                                  Ya can't beat it for a router, that's for sure!! Router/Firewall etc...


                                  But then again, this POP3 thing is so easy, it's no wonder there are so many free Linux servers out there, there HAS to be free MS servers too, if not I am going to write my own!!!


                                  Thanks


                                  Scott


                                  ------------------
                                  Scott
                                  mailto:[email protected][email protected]</A>
                                  Scott Turchin
                                  MCSE, MCP+I
                                  http://www.tngbbs.com
                                  ----------------------
                                  True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                                  Comment


                                  • #18
                                    [OT]
                                    The wuftp server is the most "hacked" ftp server.
                                    I would recommend proftpd for the ftp part and postfix for the
                                    mail/smtp part. Also redhat 7 is known for it's many bugs and unstable
                                    gcc compiler.

                                    Also for the people who want to create their own smtp server it
                                    is very important to check input ranges. In older smtp server versions
                                    this was exploited to send fake mail with to long from headers.

                                    Some basic info:

                                    smpt commands:

                                    helo - identify
                                    mail from: - your email (can be forged)
                                    rcpt to: - who is getting it
                                    data - after this command the email text can be written
                                    . - end data and send mail

                                    pop3 commands:

                                    user - your username
                                    pass - your password
                                    list - list the box, returns mail with id's
                                    retr - retrieve mail id
                                    dele - delete mail
                                    stat - give global box info

                                    That was it

                                    Looking forward to the linux version of pb

                                    grtz


                                    ------------------

                                    Comment


                                    • #19
                                      You and me both, glad someone thinks sorta like I do..Redhat is like Windows, that's all there is too it

                                      Anyway see my BASIC pop3 code in the source code forum for a client piece, very weak but does the job, you can build on it from there .


                                      Scott

                                      ------------------
                                      Scott
                                      mailto:[email protected][email protected]</A>
                                      Scott Turchin
                                      MCSE, MCP+I
                                      http://www.tngbbs.com
                                      ----------------------
                                      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                                      Comment

                                      Working...
                                      X