Discussion:
Bajar mails POP3 y guardarlos como txt
Lucas Hirschegger
2013-01-02 12:18:36 UTC
Permalink
Hola!

Necesito bajar los mails de una cuenta de correo via POP y guardarlos
en archivos txt (cada mail su archivo). Otro programa va a procesar
los archivos.
Estube tratando de averiguar como hacer, y encontre algo relacionado
con fetchmail y procmail.
Si alguien tiene alguna idea mejor o experiencia se agradece.

Saludos y buen anio.

--
Lucas H.-
http://picasaweb.google.com/lucashir
Alejandro Vargas
2013-01-02 23:51:40 UTC
Permalink
Post by Lucas Hirschegger
Hola!
Necesito bajar los mails de una cuenta de correo via POP y guardarlos
en archivos txt (cada mail su archivo). Otro programa va a procesar
los archivos.
Estube tratando de averiguar como hacer, y encontre algo relacionado
con fetchmail y procmail.
Si usás maildir como formato de almacenamiento, cada mensaje queda en un
archivo de texto individual, así que no necesitás hacer nada más. Sólo usás
fetchmail o lo que sea para traerte los mensajes y dejarlos en formato
Maildir, y listo. Es más, si les ponés extensión "eml", los vas a poder
abrir con un cliente de mail en linux o windows, y si no con un editor de
textos. Eso sí: si tienen adjuntos, imágenes, o formato html, no va a ser
fácil tratar de leerlos como textos.
Lucas Hirschegger
2013-01-03 11:12:28 UTC
Permalink
Post by Alejandro Vargas
Post by Lucas Hirschegger
Hola!
Necesito bajar los mails de una cuenta de correo via POP y guardarlos
en archivos txt (cada mail su archivo). Otro programa va a procesar
los archivos.
Estube tratando de averiguar como hacer, y encontre algo relacionado
con fetchmail y procmail.
Si usás maildir como formato de almacenamiento, cada mensaje queda en un
archivo de texto individual, así que no necesitás hacer nada más. Sólo usás
fetchmail o lo que sea para traerte los mensajes y dejarlos en formato
Maildir, y listo. Es más, si les ponés extensión "eml", los vas a poder
abrir con un cliente de mail en linux o windows, y si no con un editor de
textos. Eso sí: si tienen adjuntos, imágenes, o formato html, no va a ser
fácil tratar de leerlos como textos.
Hola,

gracias por la sugenrencia. Era lo que buscaba y calculo que funciona.
Si pudiera hace funcionar fetchmail, probablemente podria testear. Ya
de paso pregunto, tengo esta configuracion en fetchmailrc

#### .fetchmailrc

set no bouncemail
set no syslog
set invisible
#set daemon 180
set logfile /home/netline/.fetchmail.log

poll exchange.domain.com
proto POP3
username "user"
password "password"
is local_user here
ssl
#fetchall
keep
#no rewrite

El log pone lo siguiente:

fetchmail: 6.3.6 querying genesis.adria.si (protocol POP3) at Thu 03
Jan 2013 11:32:06 AM CET: poll started
fetchmail: Trying to connect to 10.1.0.190/995...connected.
fetchmail: Issuer Organization: StartCom Ltd.
fetchmail: Issuer CommonName: StartCom Class 2 Primary Intermediate Server CA
fetchmail: Server CommonName:
fetchmail: Subject Alternative Name:
fetchmail: Subject Alternative Name:
fetchmail: Subject Alternative Name:
fetchmail: Subject Alternative Name:
fetchmail: key fingerprint: D1:0B:D2:3D:00:3D:DA:FC:C8:E6:28:76:3B:6A:25:1E
fetchmail: POP3< +OK The Microsoft Exchange POP3 service is ready.
fetchmail: POP3> CAPA
fetchmail: POP3< +OK
fetchmail: POP3< TOP
fetchmail: POP3< UIDL
fetchmail: POP3< SASL NTLM GSSAPI PLAIN
fetchmail: POP3< USER
fetchmail: POP3< .
fetchmail: POP3> AUTH GSSAPI
fetchmail: POP3< +
fetchmail: Sending credentials
fetchmail: Error exchanging credentials
fetchmail: POP3< +
YHYGBisGAQUFAqBsMGqgPDA6BgorBgEEAYI3AgIeBgkqhkiC9xIBAgIGCSqGSIb3EgECAgYKKoZIhvcSAQICAwYKKwYBBAGCNwICCqMqMCigJhskbm90X2RlZmluZWRfaW5fUkZDNDE3OEBwbGVhc2VfaWdub3Jl
fetchmail: POP3> USER user
fetchmail: POP3< -ERR Logon failure: unknown user name or bad password.
fetchmail: Logon failure: unknown user name or bad password.
fetchmail: Authorization failure on ***@exchange.domain.com
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Microsoft Exchange Server 2010 POP3 server signing off.
fetchmail: 6.3.6 querying (protocol POP3) at Thu 03 Jan 2013 11:32:06
AM CET: poll completed
fetchmail: Query status=3 (AUTHFAIL)
fetchmail: normal termination, status 3

alguna idea?

Gracias!

--
Lucas H.-
http://picasaweb.google.com/lucashir
Alejandro Vargas
2013-01-04 09:38:28 UTC
Permalink
Post by Lucas Hirschegger
fetchmail: POP3< SASL NTLM GSSAPI PLAIN
fetchmail: POP3< USER
fetchmail: POP3< .
fetchmail: POP3> AUTH GSSAPI
fetchmail: POP3< +
fetchmail: Sending credentials
fetchmail: Error exchanging credentials
fetchmail: POP3< +
YHYGBisGAQUFAqBsMGqgPDA6BgorBgEEAYI3AgIeBgkqhkiC9xIBAgIGCSqGSIb3EgECAgYKKoZIhvcSAQICAwYKKwYBBAGCNwICCqMqMCigJhskbm90X2RlZmluZWRfaW5fUkZDNDE3OEBwbGVhc2VfaWdub3Jl
Post by Lucas Hirschegger
fetchmail: POP3> USER user
fetchmail: POP3< -ERR Logon failure: unknown user name or bad password.
fetchmail: Logon failure: unknown user name or bad password.
Por lo que veo, el exchange está contestando que el usuario o la clave
estan mal. Puede que el usuario no tenga que incluir @xxxx o que el método
de transporte de la clave sea inválido. Dice: SASL NTLM GSSAPI PLAIN
Lucas Hirschegger
2013-01-04 11:26:19 UTC
Permalink
Post by Alejandro Vargas
Por lo que veo, el exchange está contestando que el usuario o la clave
de transporte de la clave sea inválido. Dice: SASL NTLM GSSAPI PLAIN
Hola,

el @xxx lo pone automaticamente...
Exchange esta configurado para que pop acepte plain text password es
bastante raro.

Gracias! Seguire buscando.

--
Lucas H.-
http://picasaweb.google.com/lucashir
Alejandro Vargas
2013-01-06 09:04:31 UTC
Permalink
Post by Lucas Hirschegger
Post by Alejandro Vargas
Por lo que veo, el exchange está contestando que el usuario o la clave
de transporte de la clave sea inválido. Dice: SASL NTLM GSSAPI PLAIN
Hola,
Exchange esta configurado para que pop acepte plain text password es
bastante raro.
Y el fetchmail está mandando plain?
Otra alternativa, si tenes imap, es imapsync. O directamente bajarlo con un
cliente de mail que guarde maildir, no se si thunderbird usa ese formato.
Lucas Hirschegger
2013-01-09 16:07:37 UTC
Permalink
Post by Alejandro Vargas
Post by Lucas Hirschegger
Post by Alejandro Vargas
Por lo que veo, el exchange está contestando que el usuario o la clave
método
Post by Lucas Hirschegger
Post by Alejandro Vargas
de transporte de la clave sea inválido. Dice: SASL NTLM GSSAPI PLAIN
Hola,
Exchange esta configurado para que pop acepte plain text password es
bastante raro.
Y el fetchmail está mandando plain?
Otra alternativa, si tenes imap, es imapsync. O directamente bajarlo con un
cliente de mail que guarde maildir, no se si thunderbird usa ese formato.
Perdon por el retraso, ando medio ocupado con otras cosas.
Probare con IMAP y veremos que onda.
Gracias y saludos!


--
Lucas H.-

Loading...