mikeytown2 Posted January 28, 2007 Share Posted January 28, 2007 (edited) I decided to implement IMAP. My big goal in doing all of this is to make a program that gets the AOL mail and forwards it to GMAIL using just the MX records so that the From field in the Email is preserved.Attached is the IMAP program, tested on AOL, is able to retrieve unread read email header and bodyImap_get.au3 Imap_get.au3 _Base64.au3To Exit program click on Tray Icon and hit Exit then press Cancel. Any help/input is greatly appreciated!Used this for helphttp://networking.ringofsaturn.com/Protocols/imap.phphttp://www.wireshark.org/EDIT: New Version, Actually Useful Now! Edited February 1, 2007 by mikeytown2 Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
orange Posted January 30, 2007 Share Posted January 30, 2007 I decided to implement IMAP. My big goal in doing all of this is to make a program that gets the AOL mail and forwards it to GMAIL using just the MX records so that the From field in the Email is preserved. Attached is the IMAP program, tested on AOL, is able to retrieve unread email header and body Imap_get.au3 _Base64.au3 To Exit program click on Tray Icon and hit Exit then press Cancel. Any help/input is greatly appreciated! Used this for help http://networking.ringofsaturn.com/Protocols/imap.php http://www.wireshark.org/ I am going to immediatly test this. I have been wanting an IMAP function forever. Link to comment Share on other sites More sharing options...
NELyon Posted January 30, 2007 Share Posted January 30, 2007 I decided to implement IMAP. My big goal in doing all of this is to make a program that gets the AOL mail and forwards it to GMAIL using just the MX records so that the From field in the Email is preserved. Attached is the IMAP program, tested on AOL, is able to retrieve unread email header and body Imap_get.au3 _Base64.au3 To Exit program click on Tray Icon and hit Exit then press Cancel. Any help/input is greatly appreciated! Used this for help http://networking.ringofsaturn.com/Protocols/imap.php http://www.wireshark.org/ Tested it, but it only got 501/632 emails. The rest... well... didn't lol. Oh well, Nice work. Link to comment Share on other sites More sharing options...
bulbasas Posted January 31, 2007 Share Posted January 31, 2007 maybe enother authentication mechanism becose no work whit hmailserver(imap4) <SEND> 1 capability <RECV> * OK Heloo imap <SEND> 2 authenticate plain <RECV> * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT 1 OK CAPABILITY completed <SEND> AGFkbWluQGdlbG1hZ2lzLmx0AGFkbWluMQ== <RECV> 2 NO Unsupported authentication mechanism. <SEND> 3 namespace <RECV> BAD NULL COMMAND .... for test imap server: host:mail.gelmagis.lt user:test@gelmagis.lt pass:testpass Link to comment Share on other sites More sharing options...
mikeytown2 Posted February 1, 2007 Author Share Posted February 1, 2007 Thanks for the input, bulbasas you should be able to login now.After reading this http://www.ietf.org/rfc/rfc2060.txt i was able to improve the program quite a bit.It's about ready to be merged with my mx mailing program!I need your input on this though, let me know how the IMAP client works for you, and if you guys have a good idea on how to make TCPRecv not miss data and still be fast that would be cool. I have a nested loop so that it wont miss anything.The program is set to receive your Seen emails, the opposite of the one above.Imap_get.au3Your Input is greatly Appreciated! Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
Andrew Peacock Posted March 6, 2007 Share Posted March 6, 2007 Hi Mikey, Great piece of work so far, and just in time for me to use it. I'll be using it much more as a behind-the-scenes script, to poll a mailbox for specific mails, so I'll be modifying what you've done to make it non-interactive with the user. Once I've done that, I'll fire a copy back to you. Andy Link to comment Share on other sites More sharing options...
myspacee Posted March 28, 2008 Share Posted March 28, 2008 Nice script! In my case i've some error... _______________________________________________________________________________ <RECV> 220 mailxxxx.eeerrrttt.it ESMTP Sendmail 8.13.8/8.12.11; Fri, 28 Mar 2008 10:18:58 +0100 <SEND> 1 capability <RECV> 500 5.5.1 Command unrecognized: "1 capability" <SEND> 2 login "mikey" "mouse" <RECV> 500 5.5.1 Command unrecognized: "2 login "mikey" "mouse"" <SEND> 3 select "INBOX" <RECV> 500 5.5.1 Command unrecognized: "3 select "INBOX"" <SEND> 4 fetch 1:* (FLAGS) <RECV> 500 5.5.1 Command unrecognized: "4 fetch 1:* (FLAGS)" <SEND> 5 logout <RECV> 500 5.5.1 Command unrecognized: "5 logout" ______________________________________________________________________________ (server, login and password are invented in this log) Command result unrecognized, maybe _Base64.au3 is involved ? Can anyone help me to understand Thank you! M. Link to comment Share on other sites More sharing options...
mikeytown2 Posted April 5, 2008 Author Share Posted April 5, 2008 Nice script!In my case i've some error..._______________________________________________________________________________<RECV>220 mailxxxx.eeerrrttt.it ESMTP Sendmail 8.13.8/8.12.11; Fri, 28 Mar 2008 10:18:58 +0100<SEND>1 capability<RECV>500 5.5.1 Command unrecognized: "1 capability"<SEND>2 login "mikey" "mouse"<RECV>500 5.5.1 Command unrecognized: "2 login "mikey" "mouse""<SEND>3 select "INBOX"<RECV>500 5.5.1 Command unrecognized: "3 select "INBOX""<SEND>4 fetch 1:* (FLAGS)<RECV>500 5.5.1 Command unrecognized: "4 fetch 1:* (FLAGS)"<SEND>5 logout<RECV>500 5.5.1 Command unrecognized: "5 logout"______________________________________________________________________________(server, login and password are invented in this log)Command result unrecognized, maybe _Base64.au3 is involved ?Can anyone help me to understandThank you!M.The server keeps sayingCommand unrecognizedIs this a POP server and not a SMTP server? Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
ITMan2000 Posted June 12, 2008 Share Posted June 12, 2008 mikeytown2, Is there a way to add secure IMAP feature in yr function? Can u provide me the steps required? Link to comment Share on other sites More sharing options...
mikeytown2 Posted June 13, 2008 Author Share Posted June 13, 2008 mikeytown2,Is there a way to add secure IMAP feature in yr function?Can u provide me the steps required?IMAP in principle works the same as POP. Both send messages to a server and both get a response back.In my POP v2 scripthttp://www.autoitscript.com/forum/index.ph...mp;#entry151770it opens a connection to the secure sever using OpenSSL. It then sends the command though the open command window and reads its response this way as well. I believe that someone made a better implementation of OpenSSL and POP.http://www.autoitscript.com/forum/index.php?showtopic=64051Not sure if he has posted a script yet...Get a script working with POP & SSL before you translate the POP & SSL script over to use IMAP. Doing a google search for RFC IMAP will help fill in any holes and let you understand what is going on.Good Luck, this is not an easy task! Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now