El 2004-05-19 a las 20:28 +0200, Camaleón escribió:
Hola Carlos,
Fetchmail en sí no tiene filtros, pero si lo utilizas junto con Postfix
puedes aprovechar la flexibilidad de éste para borrar los correos que
adjuntan algún tipo de ejecutable con las opciones de header_check y
body_check, ¿o te refieres a otra cosa?
Correcto, eso es lo que uso.
El problema que tiene es que el fetchmail parece intentar abortar la
bajada, pero el servidor sigue mandándole el correo entero - en
apariencia, sólo puedo tratar de adivinarlo por el tiempo que sigue
trabajando el modem.
00:02:01 nimrodel fetchmail[19354]: POP3> RETR 14
00:02:02 nimrodel fetchmail[19354]: POP3< +OK 41494 bytes
00:02:02 nimrodel fetchmail[19354]: SMTP> MAIL FROM: SIZE=41494
00:02:02 nimrodel postfix/smtpd[18305]: 63743BCDDD: client=localhost[127.0.0.1]
00:02:02 nimrodel fetchmail[19354]: SMTP< 250 Ok
00:02:02 nimrodel fetchmail[19354]: SMTP> RCPT TO:
00:02:02 nimrodel fetchmail[19354]: SMTP< 250 Ok
00:02:02 nimrodel fetchmail[19354]: SMTP> DATA
00:02:02 nimrodel fetchmail[19354]: SMTP< 354 End data with <CR><LF>.<CR><LF>
00:02:02 nimrodel postfix/cleanup[18193]: 63743BCDDD: message-id=
00:02:02 nimrodel postfix/cleanup[18193]: 63743BCDDD: reject: header Content-Type: application/octet-stream;??name="mail0933.pif" from localhost[127.0.0.1]; from= to= proto=ESMTP helo=<localhost>: Attachment file type "pif" not allowed (in "mail0933.pif")
Aquí el postfix ya lo ha rechazado. Pero pasan 12 segundos hasta que el
fetchmail reacciona - y a 4Kb/s eso son 48 kbytes (el mensaje tenía 40, o
sea que lo ha bajado entero). Para estar seguro de esto, tendría que haber
capturado la sesión con ethereal, por ejemplo.
Ese es el problema que trato de resolver, evitar esos tiempos de descarga
inutil. Mi duda es si (EOM) significa "End Of Message" recibido, y que
hace el "RSET" que se ve luego.
00:02:14 nimrodel fetchmail[19354]: SMTP>. (EOM)
00:02:15 nimrodel fetchmail[19354]: SMTP< 550 Error: Attachment file type "pif" not allowed (in "mail0933.pif")
00:02:15 nimrodel fetchmail[19354]: SMTP error: 550 Error: Attachment file type "pif" not allowed (in "mail0933.pif")
00:02:15 nimrodel postfix/smtpd[19417]: connect from localhost[127.0.0.1]
Ahora el fetchmail genera un correo de rebote:
00:02:15 nimrodel fetchmail[19354]: SMTP< 220 nimrodel.valinor ESMTP Postfix
00:02:15 nimrodel fetchmail[19354]: SMTP> HELO localhost
00:02:15 nimrodel fetchmail[19354]: SMTP< 250 nimrodel.valinor
00:02:15 nimrodel fetchmail[19354]: SMTP> MAIL FROM:
00:02:15 nimrodel postfix/smtpd[19417]: 2DC2ABCDDD: client=localhost[127.0.0.1]
00:02:15 nimrodel fetchmail[19354]: SMTP< 250 Ok
00:02:15 nimrodel fetchmail[19354]: SMTP> RCPT TO:
00:02:15 nimrodel fetchmail[19354]: SMTP< 250 Ok
00:02:15 nimrodel fetchmail[19354]: SMTP> DATA
00:02:15 nimrodel fetchmail[19354]: SMTP< 354 End data with <CR><LF>.<CR><LF>
00:02:15 nimrodel fetchmail[19354]: SMTP: (bounce-message body)
00:02:15 nimrodel fetchmail[19354]: SMTP>. (EOM)
00:02:15 nimrodel postfix/cleanup[18042]: 2DC2ABCDDD: hold: header From: FETCHMAIL-DAEMON@nimrodel.valinor from localhost[127.0.0.1]; from= to= proto=SMTP helo=<localhost>
Lo que pasa es que el rebote yo tengo una regla para interceptarlo y
ponerlo en hold.
00:02:15 nimrodel postfix/cleanup[18042]: 2DC2ABCDDD: message-id=<20040519220215.2DC2ABCDDD@nimrodel.valinor>
00:02:15 nimrodel fetchmail[19354]: SMTP< 250 Ok: queued as 2DC2ABCDDD
00:02:15 nimrodel fetchmail[19354]: SMTP> QUIT
00:02:15 nimrodel postfix/smtpd[19417]: disconnect from localhost[127.0.0.1]
00:02:15 nimrodel fetchmail[19354]: SMTP< 221 Bye
00:02:15 nimrodel fetchmail[19354]: SMTP listener refused delivery
00:02:15 nimrodel fetchmail[19354]: SMTP> RSET
En este punto es cuando el fetchmail manda abortar la bajada
00:02:15 nimrodel fetchmail[19354]: SMTP< 250 Ok
00:02:15 nimrodel fetchmail[19354]: flushed
00:02:15 nimrodel fetchmail[19354]: POP3> DELE 14
00:02:15 nimrodel fetchmail[19354]: POP3< +OK message marked for deletion
--
Saludos
Carlos Robinson