PDA

View Full Version : how to read Email from INBOX



amit_pansuria
4th June 2007, 13:57
helo my application requirement is given below.

i ahve one pc which is running on fedora core 6 .
there is a Email account of my name for example
amit@cgclogic.com
what ever email comes from other domain via our main server.
now i want to develope appication which continously watch mail box of my pc that there is a new mail comes or not and if new mail comes then retrieve that email from inbox
and write into some buffer
is this possible or not
and if possible then give me some tips
Best Regards,
Amit

high_flyer
4th June 2007, 15:05
is this possible or not
Yes it is.
The question is why do you want to do this?
There are so many solutions out there that do this already...


and if possible then give me some tips
Tips in what field?

amit_pansuria
5th June 2007, 05:26
Yes it is.
The question is why do you want to do this?
There are so many solutions out there that do this already...


Tips in what field?

Dear Sir,
my project requirement is explained below.

We have one local mail server of our organisation.
which is connected with Data-server PC through LAN and Data-server is runing on fedora core 6. There is a Kmail in that i have open one account of my name.
now what ever mail comes for me that comes from local mail server(POP3) to my Data-server pc.
now i want to write application which simultaneously check is there any new mail comes or not and if new mail then retrieve the Email and write this mail(messages) to com port and send it to modem(com port of modem )
i mean first of all i want to know how to write application to check new mail comes or not and if new mail then retrieve that mail for reading and put into buffer
i m new in linux
please help me to go ahead with this
Best Regards,
Amit

patrik08
5th June 2007, 09:27
The e mail protocoll is so simple , the reason of so much spam...

http://pages.prodigy.net/michael_santovec/pop3telnet.htm

smtp auth protocoll...




220 remote.com ESMTP
ehlo localhost
250-remote.com
250-STARTTLS
250-PIPELINING
250-8BITMIME
250-SIZE 0
250 AUTH LOGIN PLAIN CRAM-MD5



check the send class on this two file...

https://qt-webdav.svn.sourceforge.net/svnroot/qt-webdav/sendmail_smtp_auth_console/

On my projekt i plan to write a imap help sub server ... enabe to filter mail on server ... and remove it. Like perl Spamassassin from apache.... i need only more experience on QThread mechanismous.

high_flyer
5th June 2007, 09:58
please help me to go ahead with this
But what help do you need?
I mean, ok, you stated what it is you want to do, fine.
But what is the question/problem you seek help about?

amit_pansuria
5th June 2007, 10:20
The e mail protocoll is so simple , the reason of so much spam...

http://pages.prodigy.net/michael_santovec/pop3telnet.htm

smtp auth protocoll...




220 remote.com ESMTP
ehlo localhost
250-remote.com
250-STARTTLS
250-PIPELINING
250-8BITMIME
250-SIZE 0
250 AUTH LOGIN PLAIN CRAM-MD5



check the send class on this two file...

https://qt-webdav.svn.sourceforge.net/svnroot/qt-webdav/sendmail_smtp_auth_console/

On my projekt i plan to write a imap help sub server ... enabe to filter mail on server ... and remove it. Like perl Spamassassin from apache.... i need only more experience on QThread mechanismous.

thx very much for replying me. sir, i m new in this mail application field.
anyway, what you suggest i cannot get it.
i want to access email from my mailbox of my pc which is runing on FC 6 through application . i mean retrieving and reading email from mailbox is automatically handle by application software. there is no need to manually type command on console
plz help me to sort out this issue.
Best Regards,
Amit

patrik08
5th June 2007, 10:38
thx very muc
on FC 6software.
there is no need to manually type command on console
Amit

Ist this postfix mail server (on FC6) or other?
Have you a pop3 server installed like qpopper?

If you dont say, install nmap and post the output from:


nmap localhost

Why you speek from " modem(com port of modem ) " You dont have a Network line?
If you like only forward mail to other server and filter its , and transmit mail on modem phone line, qmail can handle this.. see http://qmail.org/top.html and you must not write a client. And spen a lot of time an idigest problem.

amit_pansuria
5th June 2007, 10:40
But what help do you need?
I mean, ok, you stated what it is you want to do, fine.
But what is the question/problem you seek help about?

Sir,
i want to write application which retrieve and read email from my mail box of pc. i m using evolution under gnome.
but i dont know where to start write application because i n totally new in this.
can u have some sample program for retrieving and reading mail from emailbox
i think u get now my point.
Best Regards,
Amit

patrik08
5th June 2007, 10:57
If you dont tell the mail server in use...
I can only link to on good global pop3 imap smtp library and its can grab mail from local ore remote http://sourceforge.net/projects/lhmail/
inside you find some global sample.

amit_pansuria
5th June 2007, 11:15
Ist this postfix mail server (on FC6) or other?
Have you a pop3 server installed like qpopper?

If you dont say, install nmap and post the output from:


nmap localhost

Why you speek from " modem(com port of modem ) " You dont have a Network line?
If you like only forward mail to other server and filter its , and transmit mail on modem phone line, qmail can handle this.. see http://qmail.org/top.html and you must not write a client. And spen a lot of time an idigest problem.

Dear Sir,
i think u can help in great way n i really thx for u.
first of all i explain whole architecture of my application. i dont know that whether i m using correct approach or not.
my client requirement is explained below.

There are two portable terminals(This portable terminal is just like satellite phone and they are linked with satellite.) each portable terminal have RS-232 port . They are connected with LAPTOP through Rs-232.
now , suppose PT-1 want to send mail to PT-2 via satellite.
for that we want to develop a system which is placed at one place.
so when PT-1 type email that Email comes to satellite and from satellite to system and from System to PT-2.
i mean system automatically handles this routine.
now i explain my system.
i have only one PC which is know as Data-server and running on fedora core .
Data-server is connected with 30 Modems and each modem has Rs-232 interface.
for this interface i have multiport moxa serial card .there is no problem up to now
my Data-server pc is also connected with my local mailserver(pop3) via LAN
i have to write application for data-trasfer(file,Email ,sms) which handles all these routine.
i think up to this is outof yr scope.

any user want to trasmit mail to any portable terminal through system.
for that first of all mail comes to my organisation local mail server and from local mail server to Data-server pc's mailbox.
now my problem start here.
i want to retrieve this mail from data-server mailbox(Evolution) and put it into buffer and
after that i want send this data to modem(RS-232 port of Modem , from modem to satellite and satellite to Enduser i.e. Portable terminal).
so i hilight my problems
(1) email can easily goes to data-server to local mail server via lan through smtp.
but when mail comes from local mailserver to INBOx of dataserver, at that time how to retrieve and read this email via application so that my system is able to send this data to modem through serial communication.
i think u now get clear picture of my problem,still if u have confuse about my problem defination then let me know
Waiting for yr reply eagerly,
Best Regards,
Amit

amit_pansuria
5th June 2007, 12:04
If you dont tell the mail server in use...
I can only link to on good global pop3 imap smtp library and its can grab mail from local ore remote http://sourceforge.net/projects/lhmail/
inside you find some global sample.

Sir,
i dotn have mailserver at my pc which is running on FC 6
my PC is connected with my company's local mailserver.it has pop3 mailserver.
now when email comes from outside that mails comes from local mailserver to my mailbox
(inbox of pc)
up to this i dont have problem . but now i want to retrieve this mail from my mailbox via
application which is running on same pc.
so how do i write such application whcih retrieve this emails and read it and put into buffer
i think u may now get my point
Best Regards,
Amit

high_flyer
5th June 2007, 12:20
all you need is to use a ready made pop3 lib.
There are quite many, here is one I found on sourceforge:
http://sourceforge.net/projects/nuntius/

high_flyer
5th June 2007, 12:24
Look at this:
http://sourceforge.net/projects/pop3filter/
I think this is exactly what you want to do.

What you want to do is called e.mail proxy.
Search sourceforge for it, there are meny ready made applications.
You don't need to reinvent the wheel.

patrik08
5th June 2007, 12:31
There are two portable terminals(This portable terminal is just like satellite phone and they are linked with satellite.) each portable terminal have RS-232 port . They are connected with LAPTOP through Rs-232.
now , suppose PT-1 want to send mail to PT-2 via satellite.
for that we want to develop a system which is placed at one place.
so when PT-1 type email that Email comes to satellite and from satellite to system and from System to PT-2.
i mean system automatically handles this routine.
now i explain my system.
i have only one PC which is know as Data-server and running on fedora core .
Data-server is connected with 30 Modems and each modem has Rs-232 interface.


For this routine you must write a server not a client....
a server to make a bridge from organisation local mail server or retrieve mail outside ... -> to data-server (i suppose on data-server is connect a modem to outside terminal )
If you have a clean autenfication like ldap or mysql on mail server can
check incomming mail from user xxx and forward
and all terminal grap mail on data-server from world or lan or company mail...
on RS-232 device..




i want to retrieve this mail from data-server mailbox(Evolution) and put it into buffer and
after that i want send this data to modem(RS-232 port of Modem , from modem to satellite and satellite to Enduser i.e. Portable terminal).



exact here the new server grab mail and distribute on each user from the criteria
by autefification ldap or other..





so i hilight my problems
(1) email can easily goes to data-server to local mail server via lan through smtp.
but when mail comes from local mailserver to INBOx of dataserver, at that time how to retrieve and read this email
Amit

Here your new server grab mail ( by autefification ldap or other..) on dir /var/mail (from file ) or other path depend of mail server system.... and forward on port RS-232 device.. so all your terminal can grab inside and outside mail or sms by gateway on mail server...

To begin to write a server i know a good sample ... http://sourceforge.net/projects/sketchbook/ this make job as server and client... is transmit data text image and all you wand.

IMO: email is only text and image or attachment are base64 encoded...

amit_pansuria
5th June 2007, 13:18
all you need is to use a ready made pop3 lib.
There are quite many, here is one I found on sourceforge:
http://sourceforge.net/projects/nuntius/

Sir,
i chech Nuntius POP3 library but its not downloadable
when i click on download it shows nothing
plz tell me any other
amit

amit_pansuria
5th June 2007, 13:41
Look at this:
http://sourceforge.net/projects/pop3filter/
I think this is exactly what you want to do.

What you want to do is called e.mail proxy.
Search sourceforge for it, there are meny ready made applications.
You don't need to reinvent the wheel.

Sir,
i search pop3 filter ,
but how to use this filter.
i mean suppose if i install this filter on linux then it automatically interct with mailbox of evolution but after that what i have to do .
Regards,
Amit

patrik08
5th June 2007, 13:42
read the full Thread i found 3 different library..

amit_pansuria
5th June 2007, 14:04
read the full Thread i found 3 different library..

Sir,
i found one library named LHMail which is related to mail
can i use this library for this purpose
if i then how
amit

high_flyer
5th June 2007, 14:16
Amit, READ THE DOCS of the libs you want to use.
We do exactly that.
I have no idea about these libs, and in order to tell you about them I will have to read the docs.
Makes more sense if you read it directly, and not read what other people tell you from what they read, don't you think?

amit_pansuria
5th June 2007, 15:02
read the full Thread i found 3 different library..

Sir,
sorry for disturbing you again.
i found one library "qtspaxy-src"
now on my pc i m using evolution mail
if i install this library then is then any configurations required such that it directly interact with my mailbox.
and from my application i call API of this library then it should be able to retrieve mail from my mailbox.
now question is how to configure this library and how to use it
Best Regards,
Amit

amit_pansuria
6th June 2007, 08:12
Look at this:
http://sourceforge.net/projects/pop3filter/
I think this is exactly what you want to do.

What you want to do is called e.mail proxy.
Search sourceforge for it, there are meny ready made applications.
You don't need to reinvent the wheel.

Sir,
can i use mailx utility(command ) to retrieve email from user account ?
if yes then give me some hind for using mailx in shell script
Regards,
Amit

high_flyer
6th June 2007, 10:59
Sir,
can i use mailx utility(command ) to retrieve email from user account ?
if yes then give me some hind for using mailx in shell script
Regards,
Amit

I really don't know, may be some one else does.
But why don't you just read the docs to find out?

amit_pansuria
7th June 2007, 07:40
Sir,
sorry for disturbing you again.
i found one library "qtspaxy-src"
now on my pc i m using evolution mail
if i install this library then is then any configurations required such that it directly interact with my mailbox.
and from my application i call API of this library then it should be able to retrieve mail from my mailbox.
now question is how to configure this library and how to use it
Best Regards,
Amit
Dear Sir,
sorry for disturbing u again.
i read many library but ddint get the result.
now plz tell me one thing is it posible to retrieve email from the mailserver(pop3 mailserver) from my application .
i mean my PC(runs on fedora core -6) connected with POP3 server .
now i want to write application which retrieve mail frm mailserver directly instead of my user account inbox.
Regards,
Amit