Truncated emails in Dovecot (v1.0.13)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Truncated emails in Dovecot (v1.0.13)

Iain Sims-3
Odd situation started recently whereby emails that are delivered into a
maildir folder are being truncated when read. The emails are delivered
via Exim and I can see the emails are complete when I look inside them.
However, when viewing the emails via Thunderbird or a webmail client,
they are truncated.

*** START 'dovecot -n' ***
# 1.0.13: /etc/dovecot/dovecot.conf
base_dir: /var/run/dovecot/
log_path: /var/log/mail.log
info_log_path: /var/log/mail.log
protocols: imap imaps pop3 pop3s
ssl_cert_file: /etc/ssl/server_certs/mail.example.com.crt
ssl_key_file: /etc/ssl/server_certs/mail.example.com.key
ssl_cipher_list: ALL:!LOW
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_greeting: Welcome to the example IMAP server
first_valid_uid: 8
mail_access_groups: mail
mail_location: maildir:/home/vmail/%d/%n/mail
mail_debug: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
imap_client_workarounds(default): delay-newmail outlook-idle
netscape-eoh tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh
tb-extra-mailbox-sep
imap_client_workarounds(pop3): outlook-idle
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %08Xu%08Xv
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
namespace:
   type: private
   separator: .
   location: maildir:/home/vmail/%d/%n/mail
   inbox: yes
auth default:
   passdb:
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
   userdb:
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
   socket:
     type: listen
     master:
       path: /var/spool/mail/dovecot/auth-master
       mode: 511
       user: root
plugin:
   trash: /etc/dovecot-trash.conf
   quota: maildir:storage=102400
*** END ***

I've deleted the dovecot cache and rebuilt, but there's no change here.
This is running on a Gentoo Linux server (Xen) with kernel 2.6.20.

Any ideas?

Iain.

Reply | Threaded
Open this post in threaded view
|

Re: Truncated emails in Dovecot (v1.0.13)

Timo Sirainen
On Fri, 2008-05-02 at 12:22 +0200, Iain wrote:
> Odd situation started recently whereby emails that are delivered into a
> maildir folder are being truncated when read. The emails are delivered
> via Exim and I can see the emails are complete when I look inside them.
> However, when viewing the emails via Thunderbird or a webmail client,
> they are truncated.
..
> I've deleted the dovecot cache and rebuilt, but there's no change here.

By dovecot cache I suppose you mean the dovecot.index.cache file in the
mailbox? How much does it get truncated? Can you show an example mail
and what they look like in the client?

Only thing I can think of is that you've added ,W=<bytes> with wrong
byte count to the maildir filenames.

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Truncated emails in Dovecot (v1.0.13)

Iain Sims-3
Timo Sirainen wrote:

> On Fri, 2008-05-02 at 12:22 +0200, Iain wrote:
>> Odd situation started recently whereby emails that are delivered into a
>> maildir folder are being truncated when read. The emails are delivered
>> via Exim and I can see the emails are complete when I look inside them.
>> However, when viewing the emails via Thunderbird or a webmail client,
>> they are truncated.
> ..
>> I've deleted the dovecot cache and rebuilt, but there's no change here.
>
> By dovecot cache I suppose you mean the dovecot.index.cache file in the
> mailbox? How much does it get truncated? Can you show an example mail
> and what they look like in the client?
>
> Only thing I can think of is that you've added ,W=<bytes> with wrong
> byte count to the maildir filenames.

Yes, was the dovecot.index.cache file I removed.

The tests I've been doing this morning have been with attachments. The
following two extracts are what has been omitted from the displayed
email, yet is present in the message on the server:

*** START ***
4
Content-Disposition: attachment; filename="test.foo"

VEVTVAo=

--0502-1137-52-PART-BREAK--
*** END ***

...and:

*** START ***
ing: base64
Content-Disposition: inline;
  filename="test.foo"

VEVTVAo=
--------------010803010900090205040205--
*** END ***

You're on the mark with the extension to the filenames. I do have the
following in my exim.conf transport:

*** START ***
mysql_delivery:
   driver      = appendfile
   maildir_tag = ,W=$message_size
   directory   = ${lookup mysql{MYSQL_MAILDIR}}
   user        = mail
   group       = mail
*** END ***

Looking at the filesizes and the suffix sizes, they are matching perfectly.

*** START ***
-rw------- 1 mail mail     6312 May  2 01:11
1209683491.H114523P560.mail.example.com,W=6312:2,Sb
-rw------- 1 mail mail     3640 May  2 11:28
1209720532.H790587P7254.mail.example.com,W=3640:2,S
-rw------- 1 mail mail     4073 May  2 11:31
1209720662.H774936P7285.mail.example.com,W=4073:2,S
-rw------- 1 mail mail    25833 May  2 11:32
1209720754.H804395P7304.mail.example.com,W=25833:2,S
-rw------- 1 mail mail     4231 May  2 11:37
1209721048.H92597P18984.mail.example.com,W=4231:2,S
-rw------- 1 mail mail     1947 May  2 13:05
1209726353.H534275P24270.mail.example.com,W=1947:2,RSa
-rw------- 1 mail mail     1926 May  2 13:26
1209727571.H688858P24325.mail.example.com,W=1926:2,Sa
*** END ***

Regs.

Iain.

Reply | Threaded
Open this post in threaded view
|

Re: Truncated emails in Dovecot (v1.0.13)

Timo Sirainen
On Fri, 2008-05-02 at 13:57 +0200, Iain wrote:
> Looking at the filesizes and the suffix sizes, they are matching perfectly.

That's the problem, they shouldn't be matching! ,S=<size> adds a file
size to the name, which is useful with quota. ,W=<vsize> adds a
*virtual* mail size, meaning the message size with linefeeds counted as
CR+LF instead of just LF.


signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Truncated emails in Dovecot (v1.0.13)

Iain Sims-3
Timo Sirainen wrote:
> On Fri, 2008-05-02 at 13:57 +0200, Iain wrote:
>> Looking at the filesizes and the suffix sizes, they are matching perfectly.
>
> That's the problem, they shouldn't be matching! ,S=<size> adds a file
> size to the name, which is useful with quota. ,W=<vsize> adds a
> *virtual* mail size, meaning the message size with linefeeds counted as
> CR+LF instead of just LF.

<slaps self />

Thanks, Timo. Exim fixed...I'm off to /bin/bash the filesystem
corrections. :(

Regs.

Iain.