Re: [Dovecot] maildir_copy_with_hardlinks on v.2.0.19

2012-07-31 Thread Timo Sirainen
On 30.7.2012, at 13.36, mailing list subscriber wrote:

 userdb {
 driver = passwd
 }
 
 Looks like you're using system users. Each mail then needs to be written 
 using different permissions, so hard linking can't work.
 
 
 I am afraid this is incorrect:

The code that determines if Dovecot even attempts to use hard links is in:

http://hg.dovecot.org/dovecot-2.1/file/f74557336910/src/lib-storage/mail-copy.c#l101

So you could make it work if you chmod 0770 all of your maildir directories and 
chgrp them to the same group.



Re: [Dovecot] maildir_copy_with_hardlinks on v.2.0.19

2012-07-30 Thread mailing list subscriber
On Sat, Jul 28, 2012 at 8:04 PM, Timo Sirainen t...@iki.fi wrote:
 On 23.7.2012, at 22.12, mailing list subscriber wrote:

 As requested, here is my update. As you can see I am running now the
 latest release however emails delivered through lmtp gets split into
 different files instead of expected hardlinked files.
 ..
 userdb {
  driver = passwd
 }

 Looks like you're using system users. Each mail then needs to be written 
 using different permissions, so hard linking can't work.


I am afraid this is incorrect:

[root@email ~]# cd /tmp
[root@email tmp]# touch 1
[root@email tmp]# stat 1
  File: `1'
  Size: 0   Blocks: 0  IO Block: 4096   regular empty file
Device: 803h/2051d  Inode: 46923784Links: 1
Access: (0644/-rw-r--r--)  Uid: (0/root)   Gid: (0/root)
Access: 2012-07-30 13:34:45.0 +0300
Modify: 2012-07-30 13:34:45.0 +0300
Change: 2012-07-30 13:34:45.0 +0300
[root@email tmp]# ln 1 2
[root@email tmp]# stat 2
  File: `2'
  Size: 0   Blocks: 0  IO Block: 4096   regular empty file
Device: 803h/2051d  Inode: 46923784Links: 2
Access: (0644/-rw-r--r--)  Uid: (0/root)   Gid: (0/root)
Access: 2012-07-30 13:34:45.0 +0300
Modify: 2012-07-30 13:34:45.0 +0300
Change: 2012-07-30 13:34:51.0 +0300
[root@email tmp]# chown xfs:xfs 1
[root@email tmp]# stat 1
  File: `1'
  Size: 0   Blocks: 0  IO Block: 4096   regular empty file
Device: 803h/2051d  Inode: 46923784Links: 2
Access: (0644/-rw-r--r--)  Uid: (   43/ xfs)   Gid: (   43/ xfs)
Access: 2012-07-30 13:34:45.0 +0300
Modify: 2012-07-30 13:34:45.0 +0300
Change: 2012-07-30 13:35:03.0 +0300
[root@email tmp]# chown ntp:ntp 2
[root@email tmp]# stat 2
  File: `2'
  Size: 0   Blocks: 0  IO Block: 4096   regular empty file
Device: 803h/2051d  Inode: 46923784Links: 2
Access: (0644/-rw-r--r--)  Uid: (   38/ ntp)   Gid: (   38/ ntp)
Access: 2012-07-30 13:34:45.0 +0300
Modify: 2012-07-30 13:34:45.0 +0300
Change: 2012-07-30 13:35:15.0 +0300
[root@email tmp]# echo test  2
[root@email tmp]# cat 1
test
[root@email tmp]#


Re: [Dovecot] maildir_copy_with_hardlinks on v.2.0.19

2012-07-28 Thread Timo Sirainen
On 23.7.2012, at 22.12, mailing list subscriber wrote:

 As requested, here is my update. As you can see I am running now the
 latest release however emails delivered through lmtp gets split into
 different files instead of expected hardlinked files.
..
 userdb {
  driver = passwd
 }

Looks like you're using system users. Each mail then needs to be written using 
different permissions, so hard linking can't work.



Re: [Dovecot] maildir_copy_with_hardlinks on v.2.0.19

2012-07-24 Thread Charles Marcus

On 2012-07-23 3:12 PM, mailing list subscriber wrote:

On Sun, Jul 22, 2012 at 2:59 PM, mailing list subscriber wrote:

I'm trying to get the so-called single instance store (I think cyrus
has got the name for the first time) with dovecot --version = 2.0.19
binary package installed from ubuntu 12.04 lts official repo.



As requested, here is my update. As you can see I am running now the
latest release however emails delivered through lmtp gets split into
different files instead of expected hardlinked files.

Please pay attention as I'm commenting in-between different pasted

 outputs:


# 2.1.8 (30b0d6b1c581): /etc/dovecot/dovecot.conf


Well, apparently you haven't enabled SIS - it requires explicitly 
setting mail_attachment_dir (also be aware, this only applies to 
*attachments*, the messages themselves (email body, headers, etc) are 
still stored separately), but I discovered that this doesn't seem to be 
documented in the wiki either, so not surprising you missed it - I only 
found one reference in one email list thread:


http://www.dovecot.org/list/dovecot/2012-March/064390.html

Hth...

--

Best regards,

Charles


Re: [Dovecot] maildir_copy_with_hardlinks on v.2.0.19

2012-07-23 Thread Charles Marcus
On 2012-07-22 7:59 AM, mailing list subscriber 
mailinglist...@gmail.com wrote:

I'm trying to get the so-called single instance store (I think cyrus
has got the name for the first time) with dovecot --version = 2.0.19
binary package installed from ubuntu 12.04 lts official repo.


For advanced/newest features, you would be well advised to use the most 
current stable version, which is currently 2.1.8...



I have checked that maildir_copy_with_hardlinks is enabled (dovecot
-a|grep hard shows yes) then I have installed and enabled the lmtp
component of dovecot. The configuration dovecot -n is pasted here:
http://paste.lug.ro/131180


Please don't do that - just paste the output in the email body, it is 
much easier to read/respond and try to help you.


--

Best regards,

Charles


Re: [Dovecot] maildir_copy_with_hardlinks on v.2.0.19

2012-07-23 Thread mailing list subscriber
On Sun, Jul 22, 2012 at 2:59 PM, mailing list subscriber
mailinglist...@gmail.com wrote:
 Hi,

 I'm trying to get the so-called single instance store (I think cyrus
 has got the name for the first time) with dovecot --version = 2.0.19
 binary package installed from ubuntu 12.04 lts official repo.

As requested, here is my update. As you can see I am running now the
latest release however emails delivered through lmtp gets split into
different files instead of expected hardlinked files.

Please pay attention as I'm commenting in-between different pasted outputs:

# 2.1.8 (30b0d6b1c581): /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-26-generic x86_64 Ubuntu 12.04 LTS
auth_username_format = %Ln
auth_verbose = yes
auth_verbose_passwords = plain
mail_location = maildir:~/Maildir
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope
encoded-character vacation subaddress comparator-i;ascii-numeric
relational regex imap4flags copy include variables body enotify
environment mailbox date ihave
namespace inbox {
  inbox = yes
  location =
  prefix =
}
passdb {
  driver = pam
}
plugin {
  autocreate = Inbox
  autocreate2 = Sent
  autocreate3 = Drafts
  autocreate4 = Spam
  autocreate5 = Trash
  autosubscribe = Inbox
  autosubscribe2 = Sent
  autosubscribe3 = Drafts
  autosubscribe4 = Spam
  autosubscribe5 = Trash
  mail_log_events = delete expunge mailbox_delete mailbox_rename
  mail_log_fields = uid box msgid size
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 sieve lmtp
service auth {
  unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
}
ssl_cert = /etc/ssl/certs/dovecot.pem
ssl_cipher_list =
ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM
ssl_key = /etc/ssl/private/dovecot.pem
userdb {
  driver = passwd
}
verbose_proctitle = yes
protocol imap {
  imap_client_workarounds = delay-newmail
  mail_max_userip_connections = 10
  mail_plugins =  autocreate
}
protocol pop3 {
  mail_max_userip_connections = 10
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
  deliver_log_format = msgid=%m: %$
  mail_plugins = sieve
  postmaster_address = postmaster
  quota_full_tempfail = yes
  rejection_reason = Your message to %t was automatically rejected:%n%r
}

for your pleasure, here is the transaction (note the same queue id and
a single lmtp session for all three recipients)

Jul 23 21:47:32 imap postfix/qmgr[27463]: 6746C27C687:
from=r...@imap.mydomain.ro, size=532, nrcpt=3 (queue active)
Jul 23 21:47:32 imap dovecot: lmtp(40609): Connect from local
Jul 23 21:47:32 imap dovecot: lmtp(40609, anotheruser):
pnuDHkScDVChngAA7nOI2A:
msgid=20120723184732.6746c27c...@imap.mydomain.ro: saved mail to
INBOX
Jul 23 21:47:32 imap postfix/lmtp[40608]: 6746C27C687:
to=anotheru...@mydomain.ro,
relay=imap.mydomain.ro[private/dovecot-lmtp], delay=0.26,
delays=0.15/0.01/0/0.1, dsn=2.0.0, status=sent (250 2.0.0
anotheru...@mydomain.ro pnuDHkScDVChngAA7nOI2A Saved)
Jul 23 21:47:32 imap dovecot: lmtp(40609, firstuser):
pnuDHkScDVChngAA7nOI2A:
msgid=20120723184732.6746c27c...@imap.mydomain.ro: saved mail to
INBOX
Jul 23 21:47:32 imap postfix/lmtp[40608]: 6746C27C687:
to=firstu...@mydomain.ro,
relay=imap.mydomain.ro[private/dovecot-lmtp], delay=0.37,
delays=0.15/0.01/0/0.2, dsn=2.0.0, status=sent (250 2.0.0
firstu...@mydomain.ro pnuDHkScDVChngAA7nOI2A Saved)
Jul 23 21:47:32 imap dovecot: lmtp(40609, firstuser):
pnuDHkScDVChngAA7nOI2A:
msgid=20120723184732.6746c27c...@imap.mydomain.ro: saved mail to
INBOX
Jul 23 21:47:32 imap postfix/lmtp[40608]: 6746C27C687:
to=firstu...@anothermydomain.ro,
relay=imap.mydomain.ro[private/dovecot-lmtp], delay=0.44,
delays=0.15/0.01/0/0.28, dsn=2.0.0, status=sent (250 2.0.0
firstu...@anothermydomain.ro pnuDHkScDVChngAA7nOI2A Saved)
Jul 23 21:47:32 imap dovecot: lmtp(40609): Disconnect from local:
Client quit (in reset)
Jul 23 21:47:32 imap postfix/qmgr[27463]: 6746C27C687: removed

for whoever wants to blame postfix 2.9.3 without reason, here is the postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
mailbox_command = /usr/lib/dovecot/deliver -c
/etc/dovecot/conf.d/01-mail-stack-delivery.conf -m ${EXTENSION}
mailbox_size_limit = 0
mydestination = imap.mydomain.ro, localhost.mydomain.ro, localhost
myhostname = imap.mydomain.ro
mynetworks = 127.0.0.0/8 [:::127.0.0.0]/104 [::1]/128
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions =