Re: [Dovecot] RAID1+md concat+XFS as mailstorage
Kelsey Cummings wrote: On 06/28/12 05:56, Ed W wrote: So given the statistics show us that 2 disk failures are much more common than we expect, and that silent corruption is likely occurring within (larger) real world file stores, there really aren't many battle tested options that can protect against this - really only RAID6 right now and that has significant limitations... Has anyone tried or benchmarked ZFS, perhaps ZFS+NFS as backing store for spools? Sorry if I've missed it and this has already come up. We're using Netapp/NFS, and are likely to continue to do so but still curious. Hi Kelsey, We're running ZFS here, and have just started using dovecot on it. No stats yet to report, but you might be interested in this edge case. One of our server started behaving badly... the database would randomly crash and not restart due to corrupted indexed. It turns out that the memory had gone bad, and that it had been bad for a while. Disk blocks were getting corrupted on read, and some on write! Luckly because we were on ZFS, which checksums all data, we were able to detect and repair most of the data (some 80mb of bad blocks distributed evenly thoughout the entire file system!) automatically, and also know exactly which files were unrecoverable (in the end just two or three files!). Also, we have hourly snapshots of all the file systems, so we were able to recover older versions of those files with minimal loss. I will never rely on a non-checksumming file system for production use again, for data that is existed to persist over time. Joe
[Dovecot] Problems getting auto create plugin to work
Hi there, I've configured the 'autocreate' plugin (in v.2.1.6), but it doesn't appear to be working. Can someone help me work out how to work out why please? I've got this in my 20-imap.conf file: protocol imap { mail_plugins = $mail_plugins antispam autocreate } and this in my 90-plugins.conf file: plugin { autocreate = Trash autocreate2 = Spam autosubscribe = Trash autosubscribe2 = Spam ... etc } But, the spam does not get created upon login. I've restart dovecot and restarted my mail client, but there's no hint of an spam folder. Is there something else that I also need to do? Thanks, Joe
[Dovecot] Proxying for some users and having the rest local?
I'm migrating a load of mailboxes from cyrus to a new dovecot server. What I'd like to do is to switch the DNS to dovecot, and set things up so that all old imap mailboxes are accessed through the dovecot proxy. That way I can migrate them one at a time independent of DNS issues. I've got a load of users specified in mysql, and that configuration works well for local mailboxes. How do I configure things so that I can switch proxy access on and off? What's I've got so far is: password_query = SELECT user, domain, password, masteruser as master, masterpass as pass, proxy, remoteimap.server as host FROM mailboxes \ WHERE user = '%n' AND isMailbox AND active AND domain = '%d' I imagined that I could switch the proxy per user by setting proxy='n' or proxy=null for any users that want to be local, and proxy='y' for any users that I want to forward on to the original server. It doesn't appear to work that way though. Irrespective of the proxy value dovecot appears to try and proxy all users. What am I doing wrong? I can't work it out from the docs, and the source will take quite a bit of studying to get to the bottom of it all. Thanks :), Joe
Re: [Dovecot] Proxying for some users and having the rest local?
On 7 May 2012, at 20:28, Timo Sirainen wrote: On 7.5.2012, at 22.21, Dr Josef Karthauser wrote: password_query = SELECT user, domain, password, masteruser as master, masterpass as pass, proxy, remoteimap.server as host FROM mailboxes \ WHERE user = '%n' AND isMailbox AND active AND domain = '%d' I imagined that I could switch the proxy per user by setting proxy='n' or proxy=null for any users that want to be local, and proxy='y' for any users that I want to forward on to the original server. It doesn't appear to work that way though. Irrespective of the proxy value dovecot appears to try and proxy all users. If you return a host setting, Dovecot handles it as login referral: http://wiki2.dovecot.org/PasswordDatabase/ExtraFields/Host So you need to return proxy=null and host=null. If that doesn't seem to help, set auth_debug=yes and verify from the logs that neither of them are returned by auth process. Perfect, thanks for the quick feedback. (Would it be possible to fix the docs a tweak; it's exactly this kind of information that would be useful to know :). Thanks, Joe
Re: [Dovecot] Proxying for some users and having the rest local?
On 7 May 2012, at 20:28, Timo Sirainen wrote: If you return a host setting, Dovecot handles it as login referral: http://wiki2.dovecot.org/PasswordDatabase/ExtraFields/Host So you need to return proxy=null and host=null. If that doesn't seem to help, set auth_debug=yes and verify from the logs that neither of them are returned by auth process. Ok, setting proxy and host to null is having the desired behaviour. Thanks :). Joe
Re: [Dovecot] How do I test if the anti spam plugin is working?
On 30 Mar 2012, at 12:29, Dr Josef Karthauser wrote: I've configured the dspam anti spam plugin, but it doesn't appear to be doing anything when I move mail between mailboxes. Can anyone help me determine what's going on? The plugin appears to be loading; at least if I don't define all the required configuration options I get a complaint in the log file. But beyond that I don't see any activity. [cut] I don't even appear to be seeing any log entries from the plugin. I've moving an email from my main mailbox into a mailbox called 'SPAM', which is how I thought that it was supposed to be triggered. It turns out that I had the signature header configured incorrectly. :). Joe
[Dovecot] How do I test if the anti spam plugin is working?
I've configured the dspam anti spam plugin, but it doesn't appear to be doing anything when I move mail between mailboxes. Can anyone help me determine what's going on? The plugin appears to be loading; at least if I don't define all the required configuration options I get a complaint in the log file. But beyond that I don't see any activity. Here's the config: babel# dovecot --version 2.1.3 The dovecot anti spam plugin config is: protocol imap { mail_plugins = $mail_plugins antispam } and plugin { antispam_debug_target = syslog antispam_verbose_debug = 1 antispam_backend = dspam antispam_signature = X-DSPAM-Signature antispam_signature_missing = error antispam_trash_pattern_ignorecase = trash;Deleted * antispam_spam_pattern = SPAM antispam_dspam_binary = /usr/local/bin/dspam antispam_dspam_args = --deliver=;--user;%n@_%d } I don't even appear to be seeing any log entries from the plugin. I've moving an email from my main mailbox into a mailbox called 'SPAM', which is how I thought that it was supposed to be triggered. Cheers, Joe
[Dovecot] Is it possible to migrating mail to dovecot using imapc?
I'm excited to hear that dovecot now supports imap as a mailbox type. I've got a mailbox over on another imap server, which I want to migrate to dovecot. I was wondering whether I could use 'doveadm backup' to setup a two way synchronisation process between the old imap mailbox and the new dovecot mailbox. That way I can do the migration, and can coordinate the mail clients changing where they pick up their email from later. But, I can't find much documentation on imapc, other than it exists. Is this kind of move possible now? Would someone mind giving me some hints as to how to make it work please? Thanks :), Joe
Re: [Dovecot] Is it possible to migrating mail to dovecot using imapc?
On 30 Mar 2012, at 20:52, Timo Sirainen wrote: On 30.3.2012, at 22.44, Dr Josef Karthauser wrote: I'm excited to hear that dovecot now supports imap as a mailbox type. I've got a mailbox over on another imap server, which I want to migrate to dovecot. I was wondering whether I could use 'doveadm backup' to setup a two way synchronisation process between the old imap mailbox and the new dovecot mailbox. That way I can do the migration, and can coordinate the mail clients changing where they pick up their email from later. But, I can't find much documentation on imapc, other than it exists. Is this kind of move possible now? Would someone mind giving me some hints as to how to make it work please? One-way sync will work fine. Two-way sync might be a bit troublesome. For redesigned dsync I've started thinking about kind of a 1,5-way sync. :) That would make sure that all messages from A are copied to B and no messages are deleted from B, but doesn't try to copy new messages from B to A. http://wiki2.dovecot.org/Migration/Dsync anyway has some docs. But, 'dsync mirror' does a two way sync, doesn't it? Can't I just do that with imapc as the source mailbox? Joe
Re: [Dovecot] Is it possible to migrating mail to dovecot using imapc?
On 30 Mar 2012, at 20:59, Timo Sirainen wrote: On 30.3.2012, at 22.55, Dr Josef Karthauser wrote: One-way sync will work fine. Two-way sync might be a bit troublesome. For redesigned dsync I've started thinking about kind of a 1,5-way sync. :) That would make sure that all messages from A are copied to B and no messages are deleted from B, but doesn't try to copy new messages from B to A. http://wiki2.dovecot.org/Migration/Dsync anyway has some docs. But, 'dsync mirror' does a two way sync, doesn't it? Can't I just do that with imapc as the source mailbox? It does, but the two way sync mirroring relies on messages having GUIDs. IMAP protocol doesn't have such a concept. I guess it could be kind of emulated by using e.g. GUID = sha1(message header). The pop3-replication plugin kind of does this already. But adding such code makes the regular doveadm backup slower since now it has to fetch first message headers and then message bodies. But I guess this could be an optional feature. Hmh. I have a need of it right now. If there's something quick and dirty that I can do, that would be great. It would take the risk out of migrating my users over to dovecot. :) How much code would what you propose be? Joe
Re: [Dovecot] Is it possible to migrating mail to dovecot using imapc?
On 30 Mar 2012, at 21:08, Timo Sirainen wrote: On 30.3.2012, at 23.02, Dr Josef Karthauser wrote: It does, but the two way sync mirroring relies on messages having GUIDs. IMAP protocol doesn't have such a concept. I guess it could be kind of emulated by using e.g. GUID = sha1(message header). The pop3-replication plugin kind of does this already. But adding such code makes the regular doveadm backup slower since now it has to fetch first message headers and then message bodies. But I guess this could be an optional feature. Hmh. I have a need of it right now. If there's something quick and dirty that I can do, that would be great. It would take the risk out of migrating my users over to dovecot. :) How much code would what you propose be? I suppose to do it quick and dirty you could just copypaste the get_hdr_sha1() from http://hg.dovecot.org/dovecot-2.1/rev/78317179b4af to imapc code and have imapc_mail_get_special() use it for returning GUID. Do you think that this will reliably do the trick? Joe imapc.patch Description: Binary data
Re: [Dovecot] Is it possible to migrating mail to dovecot using imapc?
On 30 Mar 2012, at 21:28, Timo Sirainen wrote: On 30.3.2012, at 23.26, Dr Josef Karthauser wrote: I suppose to do it quick and dirty you could just copypaste the get_hdr_sha1() from http://hg.dovecot.org/dovecot-2.1/rev/78317179b4af to imapc code and have imapc_mail_get_special() use it for returning GUID. Do you think that this will reliably do the trick? imapc.patch If it works at all, I guess it should work reliably. :) Hmm. Didn't appear to: % dsync -Dv -u j...@local.com -o imapc_host=mail.remoteimap.com -o imapc_port=143 -o imapc_username=joe@ remoteimap.com -o imapc_password='somepass' mirror imapc: /tmp/output produced the following output. What do you think? Joe. doveadm(joe): Debug: Loading modules from directory: /usr/local/lib/dovecot/doveadm doveadm(joe): Debug: Skipping module doveadm_acl_plugin, because dlopen() failed: /usr/local/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so: Undefined symbol acl_user_module (this is usually intentional, so just ignore this message) doveadm(joe): Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: /usr/local/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so: Undefined symbol expire_set_lookup (this is usually intentional, so just ignore this message) doveadm(joe): Debug: Skipping module doveadm_quota_plugin, because dlopen() failed: /usr/local/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so: Undefined symbol quota_user_module (this is usually intentional, so just ignore this message) doveadm(joe): Debug: Skipping module doveadm_zlib_plugin, because dlopen() failed: /usr/local/lib/dovecot/doveadm/lib10_doveadm_zlib_plugin.so: Undefined symbol i_stream_create_deflate (this is usually intentional, so just ignore this message) doveadm(joe): Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: /usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so: Undefined symbol fts_list_backend (this is usually intentional, so just ignore this message) doveadm(j...@email.com): Debug: auth input: j...@email.com uid=999 gid=999 home= mail=maildir:/var/spool/dovecot/email.com/joe/Maildir doveadm(j...@email.com): Debug: Added userdb setting: mail=maildir:/var/spool/dovecot/email.com/joe/Maildir doveadm(j...@email.com): Debug: Effective uid=999, gid=999, home= doveadm(j...@email.com): Debug: Namespace : type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/spool/dovecot/email.com/joe/Maildir doveadm(j...@email.com): Debug: maildir++: root=/var/spool/dovecot/email.com/joe/Maildir, index=, control=, inbox=/var/spool/dovecot/email.com/joe/Maildir, alt= dsync(j...@email.com): Debug: Effective uid=999, gid=999, home= dsync(j...@email.com): Debug: Namespace : type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=imapc: dsync(j...@email.com): Debug: imapc: root=, index=, control=, inbox=, alt= dsync(j...@email.com): Debug: imapc(mail.remoteimap.com:143): Looking up IP address dsync(j...@email.com): Debug: imapc(mail.remoteimap.com:143): Connecting to 95.154.203.106:143 dsync(j...@email.com): Debug: imapc(mail.remoteimap.com:143): Server capabilities: IMAP4 IMAP4rev1 LITERAL+ ID AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5 AUTH=PLAIN SASL-IR dsync(j...@email.com): Debug: imapc(mail.remoteimap.com:143): Authenticating as j...@email.com dsync(j...@email.com): Debug: imapc(mail.remoteimap.com:143): Server capabilities: IMAP4 IMAP4rev1 LITERAL+ ID LOGINDISABLED ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE SCAN IDLE URLAUTH dsync(j...@email.com): Debug: imapc(mail.remoteimap.com:143): Authenticated successfully dsync(j...@email.com): Debug: Namespace : Using permissions from /var/spool/dovecot/email.com/joe/Maildir: mode=0700 gid=-1 dsync(j...@email.com): Debug: Namespace : /var/spool/dovecot/email.com/joe/Maildir/.INBOX.Drafts doesn't exist yet, using default permissions dsync(j...@email.com): Debug: Namespace : /var/spool/dovecot/email.com/joe/Maildir/.INBOX.Deleted Messages doesn't exist yet, using default permissions dsync(j...@email.com): Debug: Namespace : /var/spool/dovecot/email.com/joe/Maildir/.INBOX.Sent Messages doesn't exist yet, using default permissions dsync(j...@email.com): Debug: Namespace : /var/spool/dovecot/email.com/joe/Maildir/.INBOX_c92f64f79f0d1ed01e6d5b314f04886c doesn't exist yet, using default permissions dsync(j...@email.com): Debug: Namespace : Using permissions from /var/spool/dovecot/email.com/joe/Maildir: mode=0700 gid=-1 dsync(j...@email.com): Error: Can't create mailbox INBOX: Mailbox already exists dsync(j...@email.com): Info: INBOX.Drafts: only in dest (guid=004ef77f6a9c3669bcb43012f3a43855) dsync(j...@email.com): Info: INBOX.Deleted Messages: only in dest (guid=2f241bb0922d742e72214dd781fe0c11) dsync(j