fetchmail-friends
[Top] [All Lists]

[fetchmail] Problem - truncated messages

2003-07-20 22:35:46
I'm having a problem with truncated messages since I've started using
fetchmail.  I've tried to do some initial debugging the results of which are
below.  Would appreciate your advice.  Thank you.

The problem mostly occurs when images are attached to a message.  These
resulting messages appear to have the bottom portion of the image just cut
off.  My platform is generic RedHat 9 with all current updates installed via
up2date.  I'm using Postfix (version 1.1.11) as my MTA - (switched from the
default of Sendmail to Postfix with the "redhat-switch-mail-nox" command.)

I sent myself a test message with an image attached and left fetchmail pick
it up.  I've captured the fetchmail verbose log and included the relevant
portion below.  Note the size of the message that Fetchmail picks up from
the POP3 server is 538813, which is correct.  Fetchmail then delivers to the
local Postfix as message id 7500683ECC.  I next I looked at the relevant
Postfix log entries for that message id, which are also included below.
What I found is that Postfix lists the message size as only having received
82233 bytes.  This matches the size of the resulting damaged message when I
look at it in a mail client afterward.

I 'm guessing the problem might have to do with improper recognition of the
EOM (End of Message) string during communication between Fetchmail and the
MTA.  What I suspect is that the binary stream of the pictures just happens
to have a string of characters in it that looks like an EOM, fooling the MTA
into thinking the message is fully transferred.  How would I comfirm if this
is the case?  And ff so, should the fix be done on the Fetchmail side, or
the with the MTA?  I didn't have a problem with the MTA until I started
using Fetchmail with it.

Thanks again for your help,
Mike Depot
mdepot(_at_)comcast(_dot_)net

( log entries follow )

Fetchmail log
-------------------------
fetchmail: POP3< +OK transition server signing off
fetchmail: 6.2.0 querying mail.attbi.com (protocol POP3) at Sun Jul 20
23:25:05 2003: poll completed
fetchmail: 6.2.0 querying mail.comcast.net (protocol POP3) at Sun Jul 20
23:25:05 2003: poll started
fetchmail: POP3< +OK (rwcrpxc12) Maillennium POP3/PROXY server #173
fetchmail: POP3> CAPA
fetchmail: POP3< +OK Capability list follows
fetchmail: POP3< EXPIRE NEVER
fetchmail: POP3< IMPLEMENTATION Maillennium/PROXY V04.61c++ [12-Jun-03]
cpu_spar
fetchmail: POP3< c.os_solaris_bsd.comp_gnu
fetchmail: POP3< LOGIN-DELAY 0
fetchmail: POP3< PIPELINING
fetchmail: POP3< RESP-CODES
fetchmail: POP3< STLS
fetchmail: POP3< TOP
fetchmail: POP3< UIDL
fetchmail: POP3< USER
fetchmail: POP3< .
fetchmail: POP3> STLS
fetchmail: POP3< +OK Begin TLS negotiation
fetchmail: Warning: server certificate verification: self signed certificate
in certificate chain
fetchmail: Warning: server certificate verification: self signed certificate
in certificate chain
fetchmail: Issuer Organization: RSA Data Security, Inc.
fetchmail: Unknown Issuer CommonName
fetchmail: Server CommonName: mail.comcast.net
fetchmail: mail.comcast.net key fingerprint:
86:4B:ED:3A:64:CE:70:D4:56:C1:DE:57:C6:92:AC:19
fetchmail: Warning: server certificate verification: self signed certificate
in certificate chain
fetchmail: POP3> USER mdepot
fetchmail: POP3< +OK
fetchmail: POP3> PASS
fetchmail: POP3< +OK ready
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 538813
fetchmail: POP3> LAST
fetchmail: POP3< +OK 0
1 message for mdepot at mail.comcast.net (538813 octets).
fetchmail: POP3> LIST
fetchmail: POP3< +OK 1 messages (538813)
fetchmail: POP3< 1 538813
fetchmail: POP3< .
fetchmail: POP3> TOP 1 99999999
fetchmail: POP3< +OK
reading message mdepot(_at_)mail(_dot_)comcast(_dot_)net:1 of 1 (538813 octets)
fetchmail: SMTP< 220 mail.mydomain.com ESMTP Postfix
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP< 250-mail.mydomain.com
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-SIZE 10240000
fetchmail: SMTP< 250-VRFY
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-XVERP
fetchmail: SMTP< 250 8BITMIME
fetchmail: SMTP> MAIL FROM:<mdepot(_at_)comcast(_dot_)net> SIZE=538813
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> RCPT TO:<mdepot(_at_)localhost>
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 End data with <CR><LF>.<CR><LF>
#fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 Ok: queued as 7500683ECC
 flushed
fetchmail: POP3> DELE 1
fetchmail: POP3< +OK
fetchmail: POP3>
-------------------------


Postfix log
-------------------------
Jul 20 23:25:10 home postfix/smtpd[8823]: connect from localhost[127.0.0.1]
Jul 20 23:25:10 home postfix/smtpd[8823]: 7500683ECC:
client=localhost[127.0.0.1]
Jul 20 23:25:10 home postfix/cleanup[8824]: 7500683ECC:
message-id=<034901c34f37$6b726300$3c00a8c0(_at_)mikelaptop>
Jul 20 23:25:10 home postfix/nqmgr[2267]: 7500683ECC:
from=<mdepot(_at_)comcast(_dot_)net>, size=82233, nrcpt=1 (queue active)
Jul 20 23:25:14 home postfix/local[8826]: 7500683ECC:
to=<mdepot(_at_)localhost(_dot_)mydomain(_dot_)com>, relay=local, delay=4, 
status=sent
("|~/mailfilter.pl")
Jul 20 23:25:21 home postfix/smtpd[8823]: disconnect from
localhost[127.0.0.1]
-------------------------


My Postfix config  ( output of postconf -n )
-------------------------
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_percent_hack = yes
append_at_myorigin = yes
append_dot_mydomain = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
empty_address_recipient = MAILER-DAEMON
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains = $mydomain
masquerade_exceptions =
mydestination = $myhostname, localhost.$mydomain, $mydomain, mail.$mydomain,
www.$mydomain, ftp.$mydomain
mydomain = mydomain.com
myhostname = mail.mydomain.com
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-1.1.11/README_FILES
sample_directory = /usr/share/doc/postfix-1.1.11/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
swap_bangpath = yes
-------------------------