Re: [Dovecot] dovecot support ms-tnef mail parser?
On 2012-06-25 04:52, DongYu.Zhen wrote: How to parse ms-tnef mail by dovecot? You can't do that directly in Dovecot. What you can do is to use a utility called tnef [1] (available in major GNU/Linux distributions) on the client to extract the data on the client. Otherwise you could use ytnef [2] with procmail or Dovecot sieve_pipe [3] on the server (see [4]). I tried tnef on rare occasions and it worked. Regards, Matthias-Christian [1] http://sourceforge.net/projects/tnef/ [2] http://sourceforge.net/projects/ytnef/ [3] http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe [4] http://wiki.clug.org.za/wiki/Automatic_winmail.dat_decoding
[Dovecot] Virtual users - what is better Maildir or mbox?
Hi, I'm trying to configure a server to use SAMBA and Winbind to authenticate to Active Directory I managed to get this portion up and running even the Dovecot portion. For reference something similar to this guide: http://www.whitneytechnologies.com/?p=119 However PAM is slightly different: # cat /etc/pam.d/dovecot authsufficient pam_krb5.so no_user_check validate account sufficient pam_permit.so This is what my dovecot.conf file looks like: # cat dovecot.conf # v1.2+: auth_use_winbind = yes auth_winbind_helper_path = /usr/local/bin/ntlm_auth protocols = imap # It's nice to have separate log files for Dovecot. You could do this # by changing syslog configuration also, but this is easier. log_path = /var/log/dovecot.log info_log_path = /var/log/dovecot-info.log # Disable SSL for now. ssl = no disable_plaintext_auth = no # We're using Maildir format #mail_location = maildir:~/Maildir mail_location = mbox:/mail:INBOX=/mail/%u # Authentication configuration: auth_verbose = yes auth_debug = yes auth_username_format = %n auth_mechanisms = plain ntlm login userdb { driver = static # args = uid=501 gid=1001 home=/mail/%u args = home=/mail/%u driver = static } passdb { driver = pam args = failure_show_msg=yes } Now what I would like to know is, which is better for virtual hosting Maildir or mbox? Basically my requirement is that I would like to separate users via either individual folders and then put each user's mbox or Maildir in the created directory, or simply name each mbox or Maildir according to the user name. First up is this possible? Secondly, how would I go about doing it? My users are not allowed to login to the system outside of IMAP as it's a Mail only server. Currently I've been looking at many links: http://satish-linuxbug.blogspot.co.uk/2008/08/freebsd-with-active-directory-single.html http://joseph.randomnetworks.com/2005/11/08/freebsd-users-and-groups-with-samba-winbind-and-active-directory/ http://wiki2.dovecot.org/HowTo/ActiveDirectoryNtlm http://wiki2.dovecot.org/Authentication/Mechanisms/Winbind http://wiki2.dovecot.org/TestInstallation http://wiki2.dovecot.org/VirtualUsers http://www.linuxmail.info/active-directory-dovecot-pam-authentication/ http://wiki2.dovecot.org/HowTo/SimpleVirtualInstall I'm running dovecot version 2.1.7 on FreeBSD 8.2 x64 RELEASE. The system is not being used as an MTA server meaning that only IMAP transfers are being done using MS Outlook then filtered by Thunderbird. Regards, Kaya
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On 06/25/2012 01:20 AM, Kaya Saman wrote: Hi, I'm trying to configure a server to use SAMBA and Winbind to authenticate to Active Directory I managed to get this portion up and running even the Dovecot portion. For reference something similar to this guide: http://www.whitneytechnologies.com/?p=119 However PAM is slightly different: # cat /etc/pam.d/dovecot authsufficient pam_krb5.so no_user_check validate account sufficient pam_permit.so This is what my dovecot.conf file looks like: If you are using Samba 4 (possibly recent versions of S3), any reason you are not doing krb5 and ldap (for account verification, not authentication) on dovecot instead of through pam? It is a bit harder to setup, but no text passwords. I still do pam_krb5 for devices that cannot do kerberos. I am using Maildir, but my setup is currently largely idle. Trever -- Marxist Law of Distribution of Wealth: Shortages will be divided equally among the peasants. -- Unknown
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On 25 Jun 2012, at 08:20, Kaya Saman wrote: Now what I would like to know is, which is better for virtual hosting Maildir or mbox? I always use Maildir in preference to mbox . . it's just such a lovely solution, imho :) (Mind you, I'm on a *nix server, so filesystem behaviour may be a consideration for non-*nix hosts.) Basically my requirement is that I would like to separate users via either individual folders and then put each user's mbox or Maildir in the created directory, or simply name each mbox or Maildir according to the user name. First up is this possible? Secondly, how would I go about doing it? In haste, I haven't been able to check your email thoroughly, but I have used passwd with an extra field appended to each user, to identify the mailbox location. If you're authenticating against ActiveDirectory, then I guess that means generating a passwd-file style 'database' from the users in ActiveDirectory and I have no idea if that's trivial. Sorry if my rushed thoughts are too sketchy to be of use, but thought I'd share my experience in case it offers any pointers. J.
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On 06/25/2012 01:20 AM, Kaya Saman wrote: Now what I would like to know is, which is better for virtual hosting Maildir or mbox? Basically my requirement is that I would like to separate users via either individual folders and then put each user's mbox or Maildir in the created directory, or simply name each mbox or Maildir according to the user name. First up is this possible? Secondly, how would I go about doing it? Sorry, I missed this at first. It is quite simple. I don't store it in passwd or any other place, since you are doing vmail, you might find this easiest: in /etc/dovecot/conf.d/10-mail.conf (where mail_location is): mail_home = /home/vmail/%Ld/%Ln mail_location = maildir:~/Maildir in /etc/dovecot/conf.d/10-mail.conf (after paragraph “# System user and group used to access mails...”): mail_uid=vmail mail_gid=vmail Obviously, vmail may not be your user for vmail. Also, some of my notes may no longer be accurate for location, just find where it exists and edit. I hope this helps. Of course, this is a Maildir setup. mbox is probably very similar, but I have had too many mbox style mail queues go south losing all of the mail (or more than one would like), so I do Maildir, even though it isn't necessarily the best use of disk space. Trever -- I do not fear computers. I fear the lack of them. -- Isaac Asimov
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On Mon, Jun 25, 2012 at 8:37 AM, Trever L. Adams tre...@middleearth.sapphiresunday.org wrote: On 06/25/2012 01:20 AM, Kaya Saman wrote: Now what I would like to know is, which is better for virtual hosting Maildir or mbox? Basically my requirement is that I would like to separate users via either individual folders and then put each user's mbox or Maildir in the created directory, or simply name each mbox or Maildir according to the user name. First up is this possible? Secondly, how would I go about doing it? Sorry, I missed this at first. It is quite simple. I don't store it in passwd or any other place, since you are doing vmail, you might find this easiest: in /etc/dovecot/conf.d/10-mail.conf (where mail_location is): mail_home = /home/vmail/%Ld/%Ln mail_location = maildir:~/Maildir in /etc/dovecot/conf.d/10-mail.conf (after paragraph “# System user and group used to access mails...”): mail_uid=vmail mail_gid=vmail Obviously, vmail may not be your user for vmail. Also, some of my notes may no longer be accurate for location, just find where it exists and edit. I hope this helps. Of course, this is a Maildir setup. mbox is probably very similar, but I have had too many mbox style mail queues go south losing all of the mail (or more than one would like), so I do Maildir, even though it isn't necessarily the best use of disk space. Trever -- I do not fear computers. I fear the lack of them. -- Isaac Asimov Thanks for the responses! Sorry if I reply to every single one in this email however, I am using Gmail's awful Web UI so I don't really have much control over what I'm doing.. To start with the reason I'm not using LDAP is because I couldn't find enough information on how to set it up! I did post here a couple of times but got no responses.. so I figured it was something that people either didn't know or found trivial. I'll take a look at the above config for Maildir format as briefly playing around with mbox it seems that folders on the / root (parent) IMAP directory are stored separately. It may be better if everything got stored under the Maildir heading I've previously **only** ever worked with Maildir but I was told that there are some benefits to mbox which is why I decided to try to use it here! Regards, Kaya
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On 25 Jun 2012, at 08:52, Kaya Saman wrote: I've previously **only** ever worked with Maildir but I was told that there are some benefits to mbox which is why I decided to try to use it here! I used mbox before Dovecot, but once I found Maildir, I never looked back. I've not come up with any significant advantages of mbox that count for much in my experiences and installations . . Would be interested to hear of suggested advantages that I might have overlooked or know of reasons why they're not an issue . . not sure how much the list wants to hear, but feel free to email me direct if you want. J.
Re: [Dovecot] dovecot support ms-tnef mail parser?
On 2012-06-25 2:15 AM, Matthias-Christian Ott o...@mirix.org wrote: On 2012-06-25 04:52, DongYu.Zhen wrote: How to parse ms-tnef mail by dovecot? You can't do that directly in Dovecot. What you can do is to use a utility called tnef [1] (available in major GNU/Linux distributions) on the client to extract the data on the client. Otherwise you could use ytnef [2] with procmail or Dovecot sieve_pipe [3] on the server (see [4]). I tried tnef on rare occasions and it worked. Regards, Matthias-Christian [1] http://sourceforge.net/projects/tnef/ [2] http://sourceforge.net/projects/ytnef/ [3] http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe [4] http://wiki.clug.org.za/wiki/Automatic_winmail.dat_decoding Sounds like a good candidate for a plug-in. Currently I use the Lookout extension in Thunderbird to do this, but it isn't perfect... -- Best regards, Charles
Re: [Dovecot] Additional passdb result status
On 2012-06-24 4:37 PM, Jürgen Pabel juer...@pabel.net wrote: I am implementing a plugin (for the pop3/imap process) that requires some data to provided from the authentication phase (a derivative of the password). For that, I have now implemented a passdb plugin that generates this data and I would like to pass this data down to the mail process (pop3/imap) via extra_fields in the reply of the authentication. The general idea is that my custom passdb plugin calculates the data, sets the extra_field and returns some error (authentication was not successful) so that the real passdb backend can be invoked to really validate the authentication data. What specifically is the *purpose* of this? I hope you consider my proposal to be reasonable. If desired, I could implement this myself and provide a patch for merging (based on 2.0.x). If my proposal is generally unfavored, it would be great if any alternative approaches for my situation were suggested. Thanks. I think it is usually preferred that you do things like this against either the current shipping/stable branch (2.1.x), or even hg (2.2)... much better chance that it would be accepted. -- Best regards, Charles
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On 2012-06-25 3:20 AM, Kaya Saman kayasa...@gmail.com wrote: # cat dovecot.conf # v1.2+: auth_use_winbind = yes Please always only provide output of doveconf -n, not copy/pastes from the config files. This proves (to yourself and everyone else) that you are using the config that dovecot is actually using - it this shows you mistakes like typos, certain deprecated/invalid settings, and even if you are editing the wrong config file(s). -- Best regards, Charles
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On Mon, Jun 25, 2012 at 10:31 AM, Charles Marcus cmar...@media-brokers.com wrote: On 2012-06-25 3:20 AM, Kaya Saman kayasa...@gmail.com wrote: # cat dovecot.conf # v1.2+: auth_use_winbind = yes Please always only provide output of doveconf -n, not copy/pastes from the config files. This proves (to yourself and everyone else) that you are using the config that dovecot is actually using - it this shows you mistakes like typos, certain deprecated/invalid settings, and even if you are editing the wrong config file(s). -- Best regards, Charles Thanks for the tip! I didn't know of the dovecot -n command so thanks for pointing that out to me.. It's strange as I've been fiddling around with mail servers for some time in test labs at home but I still feel like I'm on the outside looking in; oh well at least this design at work is much better even though it took forever to get the PAM potion for AD sorted out. Regards, Kaya
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On 2012-06-25 3:58 AM, J E Lyon role.dovecot-read...@jlassocs.com wrote: I've not come up with any significant advantages of mbox that count for much in my experiences and installations . . Would be interested to hear of suggested advantages that I might have overlooked One major advantage of mbox (and now mdbox) over maildir is the time it takes to back things up for larger mail stores. It takes much less time to compare a single mbox file that contains 20,000 messages (and rsync only the changed bits) than it does to compare read/compare 20,000 individual files (maildir)... I too like maildir, but am seriously considering implementing a solution where older mail is automatically archived to slower/cheaper SATA III based storage using mdbox format. -- Best regards, Charles
[Dovecot] specifying home/sieve/sieve_dir relative to mail_location
With 1.2, is it possible to specify home, sieve and sieve_dir relative to mail_location? No-one, this one? Too simple? Too stupid? Too obvious? Not possible?
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On Mon, 25 Jun 2012 08:52:51 +0100 Kaya Saman kayasa...@gmail.com wrote: To start with the reason I'm not using LDAP is because I couldn't find enough information on how to set it up! I did post here a couple of times but got no responses.. so I figured it was something that people either didn't know or found trivial. For my own use I've switched to the LDAP as provider of user information and credentials (for Dovecot/Postfix/ejabberd/anything I can get to talk to the LDAP). It's not that hard to figure out, but getting used to LDAP itself can take a little bit of time. In my case I'm using the LDAP just for checking if a user is present on the system and for authentication purposes (for the mail server). Haven't tried using quota etc with LDAP. Anything in particular you're having problems coping with? :) -- Branko Majic Jabber: bra...@majic.rs Please use only Free formats when sending attachments to me. Бранко Мајић Џабер: bra...@majic.rs Молим вас да додатке шаљете искључиво у слободним форматима.
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On 25 Jun 2012, at 10:44, Charles Marcus wrote: On 2012-06-25 3:58 AM, J E Lyon role.dovecot-read...@jlassocs.com wrote: I've not come up with any significant advantages of mbox that count for much in my experiences and installations . . Would be interested to hear of suggested advantages that I might have overlooked One major advantage of mbox (and now mdbox) over maildir is the time it takes to back things up for larger mail stores. It takes much less time to compare a single mbox file that contains 20,000 messages (and rsync only the changed bits) than it does to compare read/compare 20,000 individual files (maildir)... I too like maildir, but am seriously considering implementing a solution where older mail is automatically archived to slower/cheaper SATA III based storage using mdbox format. Very interesting. I use rdiff-backup as a cronjob in the wee hours (, so the fact it takes a while to work out what to incrementally save, doesn't matter to me -- but the point is that I know it's an issue and have addressed it that way. I too have contemplated some automated archiving of older mail . . it's getting closer to needing to be addressed at some point soon I think. J.
Re: [Dovecot] Mail migration to dovecot with doveadm backup
On 2012-06-24 11:57 AM, Reinhard Vicinus r.vici...@metaways.de wrote: i try to migrate mails from a non dovecot imap server to a dovecot imap server with doveadm backup as described there: What version of dovecot (doveconf -n output_? http://wiki2.dovecot.org/Migration/Dsync i first tried (local-mailbox port 18143 is the non dovecot imap server): /usr/bin/doveadm -o imapc_user=u...@example.org -o imapc_password=imappw -o imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o mailbox_list_index=no -v -D backup -R -f -u u...@example.org -m Sent imapc: and got the following error: dsync(u...@example.org): Fatal: dsync backup: Looks like you're trying to run backup in wrong direction. Source is empty and destination is not. -- Best regards, Charles Marcus I.T. Director Media Brokers International, Inc. 678.514.6200 x224 | 678.514.6299 fax
Re: [Dovecot] Mail migration to dovecot with doveadm backup
On 25/06/12 13:39, Charles Marcus wrote: On 2012-06-24 11:57 AM, Reinhard Vicinus r.vici...@metaways.de wrote: i try to migrate mails from a non dovecot imap server to a dovecot imap server with doveadm backup as described there: What version of dovecot (doveconf -n output_? dovecot -n # 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-40-server x86_64 Ubuntu 10.04.4 LTS auth_cache_negative_ttl = 0 auth_cache_size = 10 M auth_cache_ttl = 1 mins auth_verbose = yes auth_verbose_passwords = sha1 deliver_log_format = mailbox: deliver: msgid=%m from=%f: %$ dict { quota = mysql:/etc/dovecot/conf.d/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no doveadm_password = xxx instance_name = dovecot-mailbox lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes login_greeting = Mailbox login_log_format = mailbox: login: %$: %s login_trusted_networks = 10.10.10.0/24 mail_debug = yes mail_fsync = always mail_gid = vmail mail_home = /mail/dovecot/%d/%n mail_location = mdbox:~/mail mail_log_prefix = mailbox: mail: %s(%u): mail_plugins = quota mail_privileged_group = vmail mail_uid = vmail managesieve_implementation_string = Sieve 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 mdbox_rotate_interval = 1 weeks mdbox_rotate_size = 50 M mmap_disable = yes passdb { args = /etc/dovecot/conf.d/dovecot-sql.conf.ext driver = sql } plugin { quota = dict:User quota::proxy::quota quota_rule = *:storage=10G quota_rule2 = Trash:storage=+100M quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap pop3 lmtp sieve service auth { unix_listener auth-userdb { group = dovecot mode = 0660 user = dovecot } } service dict { unix_listener dict { group = vmail mode = 0660 } } service doveadm { inet_listener doveadm-server { port = 19000 } } service imap-login { inet_listener imap { port = 19143 } } service imap-postlogin { executable = script-login /usr/local/bin/dovecot-postlogin user = $default_internal_user } service imap { executable = imap imap-postlogin } service lmtp { inet_listener lmtp { address = * port = 19024 } } service managesieve-login { inet_listener sieve { port = 19200 } } service pop3-login { inet_listener pop3 { port = 19110 } } service pop3-postlogin { executable = script-login /usr/local/bin/dovecot-postlogin user = $default_internal_user } service pop3 { executable = pop3 pop3-postlogin } service quota-warning { executable = script /usr/local/bin/quota-warning extra_groups = dovecot unix_listener quota-warning { user = vmail } user = vmail } ssl = no userdb { driver = prefetch } userdb { args = /etc/dovecot/conf.d/dovecot-sql.conf.ext driver = sql } verbose_proctitle = yes protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep mail_plugins = quota imap_quota } protocol lmtp { mail_plugins = quota sieve }
Re: [Dovecot] specifying home/sieve/sieve_dir relative to mail_location
On 25.6.2012, at 12.54, Edgar Fuß wrote: With 1.2, is it possible to specify home, sieve and sieve_dir relative to mail_location? No-one, this one? Too simple? Too stupid? Too obvious? Not possible? Mail/Sieve dirs can be relative to home dir, not vice versa.. I know it's possible to specify everything relative to home, so I could probably use relative ~/../-type paths for mail_locatin etc., but that looks a bit awkward. Yeah, that would probably work. Maybe look into changing your directory hierarchy so mails are under home.
Re: [Dovecot] specifying home/sieve/sieve_dir relative to mail_location
Mail/Sieve dirs can be relative to home dir, not vice versa. OK, thanks. Yeah, that would probably work. I'll try that. Maybe look into changing your directory hierarchy so mails are under home. Too late. Also, as directories corresponding to IMAP folders always start with a dot, it appeared quite natural to me to have ``home'' and ``sieve'' at the same level as ``.dovecot'' (and ``cur'', for that matter). Ah, and what about the WIKI ``user_attrs = .., mailDirectory=home=/var/vmail/%$'' example that I don't understand?
Re: [Dovecot] specifying home/sieve/sieve_dir relative to mail_location
On 25.6.2012, at 17.42, Edgar Fuß wrote: Ah, and what about the WIKI ``user_attrs = .., mailDirectory=home=/var/vmail/%$'' example that I don't understand? Well, you could use a single mailDirectory LDAP attribute that expands to your mail directory to provide for all of the other home/sieve fields as well. But that requires Dovecot v2.1.
Re: [Dovecot] dsync error: Mailboxes don't have unique GUIDs
On Sat, 2012-06-23 at 06:29 -0400, Charles Marcus wrote: snip # 2.0.13: /etc/dovecot/dovecot.conf As you are aware (since you participated in the thread discussion about this months ago), Timo is working on a total rewrite of dsync, and if memory serves, it is mainly for 2.1+, and it is not recommend to use it in earlier versions if you need reliability (ie, 2.0.x, as you are using)... I did try the 2.1.x version of dsync back in March. I found the version to be very unreliable. It would crash with many types of operations (e.g. maildir - mdbox conversions). ...Jeff
Re: [Dovecot] Mail migration to dovecot with doveadm backup
On 24.6.2012, at 18.57, Reinhard Vicinus wrote: i try to migrate mails from a non dovecot imap server to a dovecot imap server with doveadm backup as described there: http://wiki2.dovecot.org/Migration/Dsync i first tried (local-mailbox port 18143 is the non dovecot imap server): /usr/bin/doveadm -o imapc_user=u...@example.org -o imapc_password=imappw -o imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o mailbox_list_index=no -v -D backup -R -f -u u...@example.org -m Sent imapc: and got the following error: dsync(u...@example.org): Fatal: dsync backup: Looks like you're trying to run backup in wrong direction. Source is empty and destination is not. Strange. -R is supposed to make it copy from imapc to mdbox.. Have you tried if Dovecot can see mails at all from the remote server? Try doveadm -o mail=imapc: -o ... fetch instead of doveadm backup command. As the dovecot imap account is newly created and therefore empty it seams to try to backup from the dovecot imap server to the non dovecot imap server. So i tried instead: /usr/bin/doveadm -o imapc_user=u...@example.org -o imapc_password=imappw -o imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o mailbox_list_index=no -v -D backup -f -u u...@example.org -m Sent imapc: Now this is copying from mdbox to imapc, which is also why you're getting the crash: Sometimes (every other time?) i got the following segmentation fault: bt #0 0x7f15e2c9ed74 in strcasecmp () from /lib/libc.so.6 #1 0x7f15e327eaff in imapc_save_callback (reply=0x7fff56096a70, context=value optimized out) at imapc-save.c:168 Note how it's saving a mail to imapc. But still, that's a bug, fixed: http://hg.dovecot.org/dovecot-2.1/rev/20703dbd1168 dsync(u...@example.org): Warning: Destination mailbox Sent has been modified, need to recreate it before we can continue syncing I think this is also because it's going to wrong direction. i think the problem could be that the account name on the remote server and the local server is absolute identical and doveadm backup has therefore problems discerning between the two locations. But that's only a stab in the dark and any help is appreciated. Shouldn't be a problem.
Re: [Dovecot] dsync error: Mailboxes don't have unique GUIDs
On 2012-06-25 12:45 PM, Jeff Gustafson ncjeff...@zimage.com wrote: On Sat, 2012-06-23 at 06:29 -0400, Charles Marcus wrote: # 2.0.13: /etc/dovecot/dovecot.conf As you are aware (since you participated in the thread discussion about this months ago), Timo is working on a total rewrite of dsync, and if memory serves, it is mainly for 2.1+, and it is not recommend to use it in earlier versions if you need reliability (ie, 2.0.x, as you are using)... I did try the 2.1.x version of dsync back in March. I found the version to be very unreliable. It would crash with many types of operations (e.g. maildir - mdbox conversions). Well, the version in 2.0.x was problematic, which is why Timo was rewriting it from scratch. Also, that was 3 *months* ago - more than likely a lot has changed since then. I'd suggest you try again with 2.1.7... -- Best regards, Charles
Re: [Dovecot] dsync error: Mailboxes don't have unique GUIDs
On 25.6.2012, at 19.49, Charles Marcus wrote: I did try the 2.1.x version of dsync back in March. I found the version to be very unreliable. It would crash with many types of operations (e.g. maildir - mdbox conversions). Well, the version in 2.0.x was problematic, which is why Timo was rewriting it from scratch. Also, that was 3 *months* ago - more than likely a lot has changed since then. I'd suggest you try again with 2.1.7... The rewritten dsync is in v2.2 tree. v2.1's dsync is a fixed version of v2.0's dsync. I have no idea why v2.1's dsync would be less reliable than v2.0's. It only had bugfixes. Anyway, the GUID error could very well be because of buggy mailbox listing code in v2.0, which was rewritten for v2.1.
Re: [Dovecot] specifying home/sieve/sieve_dir relative to mail_location
But that requires Dovecot v2.1. I was refering to http://wiki1.dovecot.org/VirtualUsers/Home which, to my understanding, should apply to 1.2. I don't understand the Example at the bottom: LDAP with relative directory paths If your LDAP database uses e.g. mailDirectory = domain/user/, you can use it as a base for home directory: user_attrs = .., mailDirectory=home=/var/vmail/%$ Then just use mail_location = maildir:~/Maildir.
Re: [Dovecot] Virtual users - what is better Maildir or mbox?
On 06/25/2012 01:52 AM, Kaya Saman wrote: On Mon, Jun 25, 2012 at 8:37 AM, Trever L. Adams tre...@middleearth.sapphiresunday.org wrote: On 06/25/2012 01:20 AM, Kaya Saman wrote: Now what I would like to know is, which is better for virtual hosting Maildir or mbox? Basically my requirement is that I would like to separate users via either individual folders and then put each user's mbox or Maildir in the created directory, or simply name each mbox or Maildir according to the user name. First up is this possible? Secondly, how would I go about doing it? Sorry, I missed this at first. It is quite simple. I don't store it in passwd or any other place, since you are doing vmail, you might find this easiest: in /etc/dovecot/conf.d/10-mail.conf (where mail_location is): mail_home = /home/vmail/%Ld/%Ln mail_location = maildir:~/Maildir in /etc/dovecot/conf.d/10-mail.conf (after paragraph “# System user and group used to access mails...”): mail_uid=vmail mail_gid=vmail Obviously, vmail may not be your user for vmail. Also, some of my notes may no longer be accurate for location, just find where it exists and edit. I hope this helps. Of course, this is a Maildir setup. mbox is probably very similar, but I have had too many mbox style mail queues go south losing all of the mail (or more than one would like), so I do Maildir, even though it isn't necessarily the best use of disk space. Trever -- I do not fear computers. I fear the lack of them. -- Isaac Asimov Thanks for the responses! Sorry if I reply to every single one in this email however, I am using Gmail's awful Web UI so I don't really have much control over what I'm doing.. To start with the reason I'm not using LDAP is because I couldn't find enough information on how to set it up! I did post here a couple of times but got no responses.. so I figured it was something that people either didn't know or found trivial. Sorry, I missed these. I have been busy. Tim and others were very kind and helped me figure things out. I do not have any web sites where I can post things, so I will give an overview here and if you need help, either follow up privately or here. I'll take a look at the above config for Maildir format as briefly playing around with mbox it seems that folders on the / root (parent) IMAP directory are stored separately. It may be better if everything got stored under the Maildir heading I've previously **only** ever worked with Maildir but I was told that there are some benefits to mbox which is why I decided to try to use it here! Regards, Kaya The only draw back I see with maildir is one file per message. This makes it resilient to corruption that mbox sees (if a message gets corrupted, you erase one message and that corruption won't propagate even if you leave it in place). In many setups this also leads to MUCH faster system. On unix systems this doesn't just waste disk space, it could lead to inode (or whatever your *nix of choice calls it) depletion. I haven't yet seen this in my setups. I archive most of my personal mail, so I have at least some of my mail going back to 1998, I think. Kerberos Directions: Microsoft suggests on linux systems that you create an account (separate from the HOST account) and add the appropriate user principal names. There are pros and cons to this, their way is a and doing it as part of the host account is b. a) On S4 dc (replace MAILSERVER_HOST and MAILSERVER_FQDN with host and host.example.org, in lowercase as I use the caps only to help me see what I need to change, respectively as fits your domain - i.e. not example.org and create some long random password and put it wherever you see $RANDOMPASSWORD) : /usr/local/samba/sbin/samba-tool newuser mail-MAILSERVER_HOST /usr/local/samba/sbin/samba-tool spn add imap/MAILSERVER_FQDN mail-MAILSERVER_HOST /usr/local/samba/sbin/samba-tool spn add smtp/MAILSERVER_FQDN mail-MAILSERVER_HOST /root/samba-master/source4/scripting/bin/ktpass.sh --out /tmp/mail.keytab --princ smtp/MAILSERVER_FQDN --path-to-ldbsearch /usr/local/samba/bin/ --pass $RANDOMPASSWORD /root/samba-master/source4/scripting/bin/ktpass.sh --out /tmp/mail.keytab --princ imap/MAILSERVER_FQDN --path-to-ldbsearch /usr/local/samba/bin/ --pass $RANDOMPASSWORD /root/samba-master/source4/scripting/bin/ktpass.sh --out /tmp/mail.keytab --princ mail-MAILSERVER_HOST --path-to-ldbsearch /usr/local/samba/bin/ --pass $RANDOMPASSWORD Move the mail.keytab to dovecot's main configuration directory on dovecot server (/etc/dovecot here). Then do the appropriate version of: chmod 640 /etc/dovecot/mail.keytab chown dovecot.dovenull /etc/dovecot/mail.keytab b) Make sure your local samba setup is joined to the domain. Make sure it writes an appropriate krb5.keytab (/etc/krb5.keytab in my setup) as part of its password management, etc. net ads keytab add smtp/mail_server_fqdn net ads keytab add imap/mail_server_fqdn You may
Re: [Dovecot] Mail migration to dovecot with doveadm backup
On 25/06/12 18:46, Timo Sirainen wrote: On 24.6.2012, at 18.57, Reinhard Vicinus wrote: i try to migrate mails from a non dovecot imap server to a dovecot imap server with doveadm backup as described there: http://wiki2.dovecot.org/Migration/Dsync i first tried (local-mailbox port 18143 is the non dovecot imap server): /usr/bin/doveadm -o imapc_user=u...@example.org -o imapc_password=imappw -o imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o mailbox_list_index=no -v -D backup -R -f -u u...@example.org -m Sent imapc: and got the following error: dsync(u...@example.org): Fatal: dsync backup: Looks like you're trying to run backup in wrong direction. Source is empty and destination is not. Strange. -R is supposed to make it copy from imapc to mdbox.. Have you tried if Dovecot can see mails at all from the remote server? Try doveadm -o mail=imapc: -o ... fetch instead of doveadm backup command. You're right it was an error in my setup that caused this problem. After fixing that problem it now works as expected. The only thing I don't get working is running it via the doveadm-server socket with: /usr/bin/doveadm -o imapc_user=u...@example.org -o imapc_password=imappw -o imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o mailbox_list_index=no -v -D backup -S /var/run/dovecot-director/doveadm-server -R -u u...@example.org imapc: In the logfile on the server there is the following error message: Jun 25 20:01:26 10.129.3.200 dovecot: dsync(u...@example.org): Error: user u...@example.org: Initialization failed: Initializing mail storage from mail_location setting failed: imapc: missing imapc_host Jun 25 20:01:26 10.129.3.200 dovecot: dsync(u...@example.org): Fatal: User init failed So I think that all the -o configurations aren't transfered via the doveadm-server socket. As the dovecot imap account is newly created and therefore empty it seams to try to backup from the dovecot imap server to the non dovecot imap server. So i tried instead: /usr/bin/doveadm -o imapc_user=u...@example.org -o imapc_password=imappw -o imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o mailbox_list_index=no -v -D backup -f -u u...@example.org -m Sent imapc: Now this is copying from mdbox to imapc, which is also why you're getting the crash: Sometimes (every other time?) i got the following segmentation fault: bt #0 0x7f15e2c9ed74 in strcasecmp () from /lib/libc.so.6 #1 0x7f15e327eaff in imapc_save_callback (reply=0x7fff56096a70, context=value optimized out) at imapc-save.c:168 Note how it's saving a mail to imapc. But still, that's a bug, fixed: http://hg.dovecot.org/dovecot-2.1/rev/20703dbd1168 dsync(u...@example.org): Warning: Destination mailbox Sent has been modified, need to recreate it before we can continue syncing I think this is also because it's going to wrong direction. Yes, the problem there was that it was the wrong direction. # 2.1.7: /etc/dovecot-director/dovecot-director.conf # OS: Linux 2.6.32-40-server x86_64 Ubuntu 10.04.4 LTS auth_verbose = yes auth_verbose_passwords = sha1 base_dir = /var/run/dovecot-director deliver_log_format = director: deliver: msgid=%m from=%f: %$ director_doveadm_port = 2 director_mail_servers = 10.129.3.193 10.129.3.192 10.129.3.191 10.129.3.190 director_servers = 10.129.3.193 10.129.3.192 10.129.3.191 10.129.3.190 director_user_expire = 2 days disable_plaintext_auth = no doveadm_password = xxx doveadm_proxy_port = 19000 instance_name = dovecot-director lmtp_proxy = yes login_greeting = Mail Balancer login_log_format = director: login: %$: %s login_trusted_networks = 10.129.3.0/24 mail_debug = yes mail_fsync = always mail_gid = vmail mail_home = /mail/dovecot/%d/%n mail_location = mdbox:~/mail mail_log_prefix = director: mail: %s(%u): mail_privileged_group = vmail mail_uid = vmail 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 mmap_disable = yes passdb { args = proxy=y nopassword=y driver = static } protocols = imap pop3 lmtp sieve service auth { unix_listener auth-userdb { user = dovecot } } service director { fifo_listener login/proxy-notify { mode = 0666 } inet_listener { port = 9090 } unix_listener director-userdb { mode = 0600 } unix_listener login/director { mode = 0666 } } service doveadm { executable = doveadm-server director inet_listener doveadm-server { port = 2 } } service imap-login { executable = imap-login director inet_listener imap { port = 20143 } inet_listener imaps { port = 20993 ssl = yes } } service lmtp { inet_listener lmtp { address = * port = 20024 } } service managesieve-login { executable = managesieve-login director
Re: [Dovecot] specifying home/sieve/sieve_dir relative to mail_location
That example means that if you have in LDAP mailDirectory=domain.com/username field, and you want user's home to be /var/vmail/domain.com/username, then you can set mailDirectory=home=/var/vmail/%$ where %$ gets expanded to domain.com/username. I don't think it's relevant to what you want. On 25.6.2012, at 21.08, Edgar Fuß wrote: But that requires Dovecot v2.1. I was refering to http://wiki1.dovecot.org/VirtualUsers/Home which, to my understanding, should apply to 1.2. I don't understand the Example at the bottom: LDAP with relative directory paths If your LDAP database uses e.g. mailDirectory = domain/user/, you can use it as a base for home directory: user_attrs = .., mailDirectory=home=/var/vmail/%$ Then just use mail_location = maildir:~/Maildir.
Re: [Dovecot] Mail migration to dovecot with doveadm backup
On 25.6.2012, at 21.21, Reinhard Vicinus wrote: Jun 25 20:01:26 10.129.3.200 dovecot: dsync(u...@example.org): Error: user u...@example.org: Initialization failed: Initializing mail storage from mail_location setting failed: imapc: missing imapc_host Jun 25 20:01:26 10.129.3.200 dovecot: dsync(u...@example.org): Fatal: User init failed So I think that all the -o configurations aren't transfered via the doveadm-server socket. Correct. None of them are, and that's by design.
[Dovecot] started with dovecot sieve
As I am new to dovecot and sieve I am really happy to get it working in a straight forward way. Thanks for the documentation to whom it concerns. Now I came to my limits with this failure messages in /home/rolf/.dovecot.sieve.log: sieve: info: started log at Jun 25 20:22:54. error: msgid=1340648569.94073.yahoomailclas...@web190304.mail.sg3.yahoo.com: failed to store into mailbox 'INBOX': BUG: Unknown internal error. with this messages in mail.info: Jun 25 20:22:54 rolf14 postfix/smtpd[21674]: connect from localhost[127.0.0.1] Jun 25 20:22:54 rolf14 postfix/smtpd[21674]: 90898E0190: client=localhost[127.0.0.1] Jun 25 20:22:54 rolf14 postfix/cleanup[21669]: 90898E0190: message-id=1340648569.94073.yahoomailclas...@web190304.mail.sg3.yahoo.com Jun 25 20:22:54 rolf14 postfix/qmgr[21172]: 90898E0190: from=stephanie.ot...@live.com, size=5291, nrcpt=1 (queue active) Jun 25 20:22:54 rolf14 postfix/smtpd[21674]: disconnect from localhost[127.0.0.1] Jun 25 20:22:54 rolf14 dovecot: lda(rolf): Error: setegid(privileged) failed: Operation not permitted Jun 25 20:22:54 rolf14 dovecot: lda(rolf): Error: sieve: msgid=1340648569.94073.yahoomailclas...@web190304.mail.sg3.yahoo.com: failed to store into mailbox 'INBOX': BUG: Unknown internal error Jun 25 20:22:54 rolf14 dovecot: lda(rolf): Error: sieve: script /home/rolf/.dovecot.sieve failed with unsuccessful implicit keep (user logfile /home/rolf/.dovecot.sieve.log may reveal additional details) I guess the mentioned mail is spam. However, does this tell about some wrong configuration or access rights? Any indication what to improve? I get such an error about every 6 minutes.
Re: [Dovecot] dsync error: Mailboxes don't have unique GUIDs
On Mon, 2012-06-25 at 19:54 +0300, Timo Sirainen wrote: On 25.6.2012, at 19.49, Charles Marcus wrote: I'd suggest you try again with 2.1.7... The rewritten dsync is in v2.2 tree. v2.1's dsync is a fixed version of v2.0's dsync. I have no idea why v2.1's dsync would be less reliable than v2.0's. It only had bugfixes. Anyway, the GUID error could very well be because of buggy mailbox listing code in v2.0, which was rewritten for v2.1. I will try the latest 2.1.x code and see what happens. dsync in 2.0.x seems to work just fine... most of the time. ...Jeff
Re: [Dovecot] Additional passdb result status
Hi, I am replying to my own message because it's probably the cleanest reply since I am not subscribed to the mailing list and thus can't reply to Charles' message itself. What specifically is the *purpose* of this? To encrypt the data on the server (like the zlib plugin does for compression). Said value will be password used to unlock/decrypt the encryption key stored on the server. (I have implemented several cryptographic software components, so I believe that I understand what all is required for something like such a plugin to be implemented correctly). I think it is usually preferred that you do things like this against either the current shipping/stable branch (2.1.x), or even hg (2.2).. much better chance that it would be accepted. Agreed - I'm just developing on Ubuntu 12.04 which has 2.0. However, porting patches from 2.0 to 2.1/2.2 shouldn't be too hard from what I've seen so far. Cheers, Jürgen Am Sonntag, den 24.06.2012, 22:37 +0200 schrieb Jürgen Pabel: Dear Dovecot-Team, I am implementing a plugin (for the pop3/imap process) that requires some data to provided from the authentication phase (a derivative of the password). For that, I have now implemented a passdb plugin that generates this data and I would like to pass this data down to the mail process (pop3/imap) via extra_fields in the reply of the authentication. The general idea is that my custom passdb plugin calculates the data, sets the extra_field and returns some error (authentication was not successful) so that the real passdb backend can be invoked to really validate the authentication data. However, in auth_request_handle_passdb_callback() the extra_fields are reseted unless the return code is PASSDB_RESULT_USER_DISABLED. But if that return code is used then any following passdb's aren't invoked any more - which makes sense with respect to user authenticiation. I would therefore like to propose that some IGNORE/CONTINUE-status to be introduced in auth/passdb.h, that would be handled in that extra_fields and possible other values are not reseted in order to allow such propagation of data from authentication process down to the mail process (which could be extracted from the reply string by parsing it). As a further implementation alternative (to the parsing of the reply string), I also propose that some new environment item be introduced (in auth_request) in order to allow such data passing in a generic manner. I hope you consider my proposal to be reasonable. If desired, I could implement this myself and provide a patch for merging (based on 2.0.x). If my proposal is generally unfavored, it would be great if any alternative approaches for my situation were suggested. Thanks. Regards, Jürgen PS: please reply to my e-mail (or CC me), as I have not subscribed to the dovecot list
Re: [Dovecot] started with dovecot sieve
Hi Rolf, Rolf wrote: Now I came to my limits with this failure messages in /home/rolf/.dovecot.sieve.log: sieve: info: started log at Jun 25 20:22:54. error: msgid=1340648569.94073.yahoomailclas...@web190304.mail.sg3.yahoo.com: failed to store into mailbox 'INBOX': BUG: Unknown internal error. with this messages in mail.info: Jun 25 20:22:54 rolf14 postfix/smtpd[21674]: connect from localhost[127.0.0.1] Jun 25 20:22:54 rolf14 postfix/smtpd[21674]: 90898E0190: client=localhost[127.0.0.1] Jun 25 20:22:54 rolf14 postfix/cleanup[21669]: 90898E0190: message-id=1340648569.94073.yahoomailclas...@web190304.mail.sg3.yahoo.com Jun 25 20:22:54 rolf14 postfix/qmgr[21172]: 90898E0190: from=stephanie.ot...@live.com, size=5291, nrcpt=1 (queue active) Jun 25 20:22:54 rolf14 postfix/smtpd[21674]: disconnect from localhost[127.0.0.1] Jun 25 20:22:54 rolf14 dovecot: lda(rolf): Error: setegid(privileged) failed: Operation not permitted Jun 25 20:22:54 rolf14 dovecot: lda(rolf): Error: sieve: msgid=1340648569.94073.yahoomailclas...@web190304.mail.sg3.yahoo.com: failed to store into mailbox 'INBOX': BUG: Unknown internal error Jun 25 20:22:54 rolf14 dovecot: lda(rolf): Error: sieve: script /home/rolf/.dovecot.sieve failed with unsuccessful implicit keep (user logfile /home/rolf/.dovecot.sieve.log may reveal additional details) I guess the mentioned mail is spam. However, does this tell about some wrong configuration or access rights? Any indication what to improve? I get such an error about every 6 minutes. lda ist the local delivery agent which seems to fail during delivery. setegid(privileged) failed looks like your lda running under a specific user is not allowed to change to the specified group id, maybe the user not a member of the configured group, but this is just a guess. For a deeper analysis we will need the full output of the following command: doveconf -n Regards, Daniel -- https://plus.google.com/103021802792276734820
[Dovecot] What does namespace inbox {... mean
I'm trying to set up a dovecot server for which mail arrives in an mbox, and mail is stored in a maildir. The wiki (see http://wiki.dovecot.org/Namespaces) refers to this as Mixed mbox and Maildir. It advises handling this situation by creating two namespaces: one for the mbox and the other for the maildir. On the other hand the sample configuration coming with dovecot in my distro puts inbox in a namespace starting with: namespace inbox { # Namespace type: private, shared or public #type = private It appears from the wiki that the word following the namespace declarator (if this is the right word) should be either public, shared, or private, and describes a property of the namespace being declared. So what does: namespace inbox {... mean? Similarly in another part of the wiki (see http://wiki2.dovecot.org/Plugins/Virtual), I read that it's possible to have namespace virtual { namespace real { ... which only increases my perplexity. Please advise! Thanks - jon