evet bunu daha önceden yapmıştım
python programlama dili ile mail hesabından pop3 ile okuma yapmak ;))

**********************************************************
# !/usr/bin/python
import sys,string
import poplib, email

def getMail(host, user, passwd, deletion = 0):
    pop3 = poplib.POP3(host)
    pop3.user(user)
    pop3.pass_(passwd)

    try :
        num = len(pop3.list()[1])
    except:
        print "connection error with pop3.."
        sys.exit()
        
    print user, "has", num, "messages"

    format = "%-5s %-40s %s"

    if num > 0:
        if deletion:
            print "Deleting", num, "messages",
            for i in range(1, num+1):
                pop3.dele(i)
                print ".",
            print " done."
        else:
            print format % ("Num", "From", "Subject")
            for i in range(1, num+1):
                str = string.join(pop3.top(i, 1)[1], "\n")
                msg = email.message_from_string(str)
                print format % (i, msg["From"], msg["Subject"])
            
    pop3.quit()

# the program starts heree...    
if __name__ =='__main__':
    host = "" # ur host name
    user = "" # ur username
    passwd = "" # ur password
    
    getMail(host,user,passwd) # get with my function 

******************************************************************
# gaffar overcomes

On Fri, 2009-03-27 at 14:11 +0200,
linux-programlama-requ...@liste.linux.org.tr wrote:
> Linux-programlama listesi mesajlarını şu adrese gönderin:
>       linux-programlama@liste.linux.org.tr
> 
> World Wide Web ile üye olmak veya üyelikten çıkmak için şu sayfayı
> ziyaret edin:
>       http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> veya e-posta yoluyla konusunda veya gövdesinde 'help' yazan bir mesajı
> şu adrese gönderin:
>       linux-programlama-requ...@liste.linux.org.tr
> 
> Bu listeyi yöneten kişiye şu adresten ulaşabilirsiniz:
>       linux-programlama-ow...@liste.linux.org.tr
> 
> Yanıt yazarken, lütfen Konu satırını düzenleyerek şu tür bir şekilden
> daha belirli olmasını sağlayın: "Ynt: Linux-programlama toplu
> mesajının içeriği..."
> 
> 
> 
> Günün Konuları:
> 
>    1.  POP3, IMAP  kurulumu ile ilgili (Guychmyrat Amanmyradov)
>    2.  $HTTP_RAW_POST_DATA (Gamze Tepe)
>    3. Re: $HTTP_RAW_POST_DATA (Hasan Sertçelik)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 27 Mar 2009 10:36:11 +0000 (GMT)
> From: Guychmyrat Amanmyradov <guychmy...@yahoo.com.tr>
> Subject: [Linux-programlama]  POP3, IMAP  kurulumu ile ilgili
> To: linux-programlama@liste.linux.org.tr
> Message-ID: <75474.96260...@web27008.mail.ukl.yahoo.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Eğer bu foruma bu konuyu göndermemen gerekiyorsa, kusura bakmayın.
> Aranızda bu konuda tecrübeli olduğunu düşünüyorum.
> 
> Ubuntu servera sendmail kurdum.
> 
> sendmail a...@abd.com
> mesaj
> Ctrl + D
> 
> ile mesajımı gönderebiliyorum. Gidiyorda.
> 
> Şimdi, i...@abc.com şeklinde kullanıcılar nasıl oluşturabilirim?
> sonra oluşturduğum kullanıcılar POP3 / IMAP ile kendilerine gelen emailleri 
> nasıl okuta bilirim?
> 
> bununla ilgili kaynak gösterirseniz de memnun olurum.
> 
> Sendmail kitaplarında anlatılmıyor da.
> 
> Teşekkür ederim.
> 
> 
> 
> 
> 
>       ___________________________________________________________________
> Yahoo! Türkiye açıldı!  http://yahoo.com.tr
> İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!
> -------------- sonraki b? --------------
> Bir HTML eklentisi temizlendi...
> URL: 
> http://liste.linux.org.tr/pipermail/linux-programlama/attachments/20090327/59ee1320/attachment-0001.htm
>  
> 
> ------------------------------
> 
> Message: 2
> Date: Fri, 27 Mar 2009 12:56:45 +0100
> From: "Gamze Tepe" <gt...@incentro.at>
> Subject: [Linux-programlama]  $HTTP_RAW_POST_DATA
> To: <linux-programlama@liste.linux.org.tr>
> Message-ID:
>       <4c4a39faf3c320439d107bcf2571725201b38...@sintvie003.integro.ent>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Merhaba,
>  
> Daha önce PHP 4.3.11 üzerinde calisan bir uygulamayi PHP 5.1.2 yüklü olan bir 
> makinaya almak zorunda kaldik. Su an bazi degiskenler calismiyor.
>  
> Bunlardan ilki
>  
> $HTTP_RAW_POST_DATA;
>  
> DOMXML'in de PHP 5 ile calismadigini gördüm. Bunun icin ara bir php scripti 
> buldum. Daha sonra baska bir hata mesaji ile karsilastim.
>  
> DOMDocument::loadXML() [<a href='function.loadXML'>function.loadXML</a>]: 
> Empty string supplied as input in 
> /sites/incentro/ips/htdocs/iPS/domxml-php4-to-php5.php</b> on line <b>72</b><
>  
> 
> domxml-php4-to-php5.php dosyasi benim internette buldugum ara kod.
>  
> Bu hata mesajini su scriptten aliyorum:
>  
> <?php
>  require_once("common.php");
>  require_once("common/request_xml.php");
>  
>  function get_session(&$error)
>  {
>   global $config, $log;
>   global $HTTP_RAW_POST_DATA;
>   
>   
>   $log->write(LOG_SEVERITY_INFO, "Received 'get_session' request from 
> '{$_SERVER["REMOTE_ADDR"]}:{$_SERVER["REMOTE_PORT"]}':"
>   . str_replace("\n", "\n    ", "\n$HTTP_RAW_POST_DATA"));
>   
>   header("Content-type: text/xml");
>  
>   $request = new RequestXML();
>  
>   if ($request->create($HTTP_RAW_POST_DATA, $error) === false)
>      return (false);
> .
> .
> .
> ......
>  
> ?>
>  
> request.php
> <?php
>  
> function create($xml,&$error)
>   {
>    if (($dom = domxml_open_mem($xml)) === false) {
>     $error = new Error(E_REQUEST_PARSE_XML);
>     return (false);
>    }
> ........
> ?>
>  
> 
> Hatanin sebebi $HTTP_RAW_POST_DATA degerinin bos olmasi. Bu degeri nasil elde 
> edebilirim?
> php.ini dosyasinda 
>  
> always_populate_raw_post_data 
> <http://at.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data>  
> degiskenini On yapip apache'yi restart ettim ama calismadi.
>  
> $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");
>  
> denedim olmadi.
>  
> Bir fikri olan var mi?
> -------------- sonraki bölüm --------------
> Bir HTML eklentisi temizlendi...
> URL: 
> http://liste.linux.org.tr/pipermail/linux-programlama/attachments/20090327/aebcf2b9/attachment-0001.htm
>  
> 
> ------------------------------
> 
> Message: 3
> Date: Fri, 27 Mar 2009 14:11:03 +0200
> From: Hasan Sertçelik <ha...@sertcelik.net>
> Subject: [Linux-programlama] Re: $HTTP_RAW_POST_DATA
> To: Özgür yazılımlarla çeşitli dillerde yazılım geliştirme
>       <linux-programlama@liste.linux.org.tr>
> Message-ID: <49ccc257.3010...@sertcelik.net>
> Content-Type: text/plain; charset="utf-8"
> 
> $HTTP_RAW_POST_DATA işlenmemiş post verisini tutar.
> print_r($_POST) ile veriye ulaşmayı denedinizmi.
> 
> 
> 
> Gamze Tepe yazmış:
> > Merhaba,
> >  
> > Daha önce PHP 4.3.11 üzerinde calisan bir uygulamayi PHP 5.1.2 yüklü 
> > olan bir makinaya almak zorunda kaldik. Su an bazi degiskenler calismiyor.
> >  
> > Bunlardan ilki
> >  
> > $HTTP_RAW_POST_DATA;
> >  
> > DOMXML'in de PHP 5 ile calismadigini gördüm. Bunun icin ara bir php 
> > scripti buldum. Daha sonra baska bir hata mesaji ile karsilastim.
> >  
> > DOMDocument::loadXML() [<a 
> > href='function.loadXML'>function.loadXML</a>]: Empty string supplied 
> > as input in /sites/incentro/ips/htdocs/iPS/domxml-php4-to-php5.php</b> 
> > on line <b>72</b><
> >  
> >  
> > domxml-php4-to-php5.php dosyasi benim internette buldugum ara kod.
> >  
> > Bu hata mesajini su scriptten aliyorum:
> >  
> > <?php
> >  require_once("common.php");
> >  require_once("common/request_xml.php");
> >  
> >  function get_session(&$error)
> >  {
> >   global $config, $log;
> >   global $HTTP_RAW_POST_DATA;
> >   
> >   
> >   $log->write(LOG_SEVERITY_INFO, "Received 'get_session' request from 
> > '{$_SERVER["REMOTE_ADDR"]}:{$_SERVER["REMOTE_PORT"]}':"
> >   . str_replace("\n", "\n    ", "\n$HTTP_RAW_POST_DATA"));
> >   
> >   header("Content-type: text/xml");
> >  
> >   $request = new RequestXML();
> >  
> >   if ($request->create($HTTP_RAW_POST_DATA, $error) === false)
> >      return (false);
> > .
> > .
> > .
> > ......
> >  
> > ?>
> >  
> > request.php
> > <?php
> >  
> > function create($xml,&$error)
> >   {
> >    if (($dom = domxml_open_mem($xml)) === false) {
> >     $error = new Error(E_REQUEST_PARSE_XML);
> >     return (false);
> >    }
> > ........
> > ?>
> >  
> >  
> > Hatanin sebebi $HTTP_RAW_POST_DATA degerinin bos olmasi. Bu degeri 
> > nasil elde edebilirim?
> > php.ini dosyasinda
> >  
> > always_populate_raw_post_data 
> > <http://at.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data>
> >  degiskenini 
> > On yapip apache'yi restart ettim ama calismadi.
> >  
> > $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");
> >  
> > denedim olmadi.
> >  
> > Bir fikri olan var mi?
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Linux-programlama mailing list
> > Linux-programlama@liste.linux.org.tr
> > http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> >   
> 
> -------------- sonraki b? --------------
> Bir HTML eklentisi temizlendi...
> URL: 
> http://liste.linux.org.tr/pipermail/linux-programlama/attachments/20090327/2fc6dac9/attachment.htm
>  
> 
> ------------------------------
> 
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> 
> 
> Son: Linux-programlama Toplu Mesajı, Sayı 54, Konu 43
> *****************************************************

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama

Cevap