Re: Syncing two mail servers?
For sure Knute. Take a look at this: http://wiki2.dovecot.org/Replication I think a good implementation would be using a dovecot director layer + dovecot replication. On 08/15/2015 06:26 PM, Knute Johnson wrote: I currently have a mail server using Dovecot and sendmail. I was thinking I would like to have a backup of my mail and an additional server in case of hardware failure. Is it possible to run two identical or nearly identical server setups and sync the mail files between them? If it is possible, in general terms how would one go about this? Thanks,
Re: Trying to back
Kevin, Why don't you use dsync? http://wiki2.dovecot.org/Tools/Doveadm/Sync On 08/08/2015 03:38 PM, Benny Pedersen wrote: Kevin Laurie skrev den 2015-08-08 20:17: Appreciate if someone could advise. http://imapsync.lamiral.info/ or try google imapsync howto but do read man pages first
Re: director
It seems that you are having problem with connection between dovecot and ldap. Does your ldap server log anything? What about firewall configuration in both? On 06/02/2015 01:48 PM, jjhoffart wrote: Hello, I am currently trying to setup dovecot with a director instance and have managed to configure to invocations of dovecot on my server but my dovecot log keeps giving me errors about authentication. A little background on my config I am running dovecot with postfix and using an LDAP directory. Here are the errors I am seeing in my logs. dovecot.log Jun 02 10:42:59 auth: Fatal: LDAP: ldap_init() failed with hosts: 1.1.1.1:389 Jun 02 10:42:59 master: Error: service(auth): command startup failed, throttling for 60 secs Jun 02 10:42:59 director: Error: Auth server disconnected unexpectedly Jun 02 10:42:59 pop3-login: Info: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=, rip=1.1.3.4, lip=1.1.1.1, session=EumVoosXpQDAqAbv Jun 02 10:43:59 auth: Fatal: LDAP: ldap_init() failed with hosts: 1.1.1.1:389 Jun 02 10:43:59 master: Error: service(auth): command startup failed, throttling for 60 secs Jun 02 10:43:59 director: Error: Auth server disconnected unexpectedly Jun 02 10:43:59 pop3-login: Info: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=, rip=1.1.1.1, lip=1.1.1.2, session=rpEpposXxADAqAbv dovecot-seive.log Jun 01 14:39:57 lda: Fatal: Internal error occurred. Refer to server log for more information. Jun 01 14:47:51 lda: Error: userdb lookup(postmas...@mydomain.com): Disconnected unexpectedly Jun 01 14:47:51 lda: Fatal: Internal error occurred. Refer to server log for more information. mail.log Jun 2 10:41:25 mail1 postfix/smtpd[2932]: name_mask: noanonymous Jun 2 10:41:25 mail1 postfix/smtpd[2932]: xsasl_dovecot_server_connect: Connecting Jun 2 10:41:25 mail1 postfix/smtpd[2932]: fatal: no SASL authentication mechanisms Jun 2 10:41:26 mail1 postfix/master[2068]: warning: process /usr/lib/postfix/smtpd pid 2932 exit status 1 Jun 2 10:41:26 mail1 postfix/master[2068]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling Jun 2 10:43:06 mail1 postfix/anvil[2934]: statistics: max connection rate 1/60s for (smtp:0.0.0.0) at Jun 2 10:41:25 Jun 2 10:43:06 mail1 postfix/anvil[2934]: statistics: max connection count 1 for (smtp:0.0.0.0) at Jun 2 10:41:25 Jun 2 10:43:06 mail1 postfix/anvil[2934]: statistics: max cache size 1 at Jun 2 10:41:25
indexes with ocfs2
Hi guys! I'm having performance issues with my dovecot+ocfs2 environment, so I'm thinking about some changes. Now, I have mail store and indexes stored in a iscsi-ocfs2 volume with that options: mmap_disable = yes dotlock_use_excl = yes mail_fsync = always mail_nfs_storage = yes mail_nfs_index = yes lock_method = dotlock I want to change indexes to local volume ext4 and do this: mmap_disable = no mail_nfs_index = no Could it cause some problem? Thanks.
Re: pop3/imap hanging processes
Take a look at ' shutdown_clients' parameter. http://wiki2.dovecot.org/RunningDovecot On 11/12/2014 07:37 PM, absolutely_f...@libero.it wrote: Hi, I am using Dovecot 2.0.9 on CentOS server.I noticed that when I type: service dovecot stop, there are several imap / pop3 dovecot processes that remain active.Which parameter controls this?How can I have dovecot closing these processes more quickly?Thank you
smtp lastlogin
Hey guys! I've been googling without success. Do anyone know if there is a way to track last login of a smtp authentication? I've tried without success using: service auth { executable = auth lastlogin unix_listener auth-userdb { } unix_listener /var/spool/postfix/private/auth { mode = 0660 group = postfix } } service lastlogin { executable = script-login -d /usr/local/bin/lastlogin.sh unix_listener lastlogin { user = $default_internal_user mode = 0666 } }
Re: Help with shared folder
Hi Gianluca, I have roundcubemail as webmail. It has a plugin called 'acl', that allows users create acls easly. My users use to use thunderbird too, and the solution is that add-on: https://addons.mozilla.org/en-US/thunderbird/addon/imap-acl-extension/ On 10/06/2014 09:49 AM, Gianluca Calloni wrote: Hi dovecot guru.. I need some help configuring shared folder in my server.. This is the situation: DOVECOT 2.0.19 with POSTFIX - CLAMAV - AMAVISD - SPAMASSASSIN This is the production server and sharing folder between user work.. But i need some explanation.. 1) It's possible to share only a subfolder (E.G. = .INBOX.ESTERO) without share the main folder .INBOX? 2) Which is the best way (or best practice) to manage the dovecot-acl and dovecot-acl-list file?? Actually, i modifiy the dovecot-acl by hand (vi editor). but every time i modify it i need to restart the dovecot server to apply the configuration. And i need to reset the /var/run/dovecot/dict owner and group cause with dovecot restart the file go back in root:root owner - group Thank's in advance. Gianluca
Re: Help with shared folder
Sorry Gianluca, I know IMP/Horde just by name. Some googling show me that the option: $servers['advanced'] = array(...,'acl' = true,...) could help you, but you can get some issues: https://sys4.de/en/blog/2013/11/06/imap-acl-dovecot-horde-5-imp-6-warning/ On 10/07/2014 09:30 AM, Gianluca Calloni wrote: HI Eduardo. Thank you for your replay.. You know if there is a plug-in also for Horde webmail GUI? Unfortunately we use outlook and it seems there is not addon for this.
Re: director
Run 'doveadm -i director config' and 'doveadm -i backend config'. Send us the result, please. On 09/26/2014 12:58 PM, jjhoffart wrote: Still having some trouble with director. I have copied the var/run/dovecot director along with the /etc/dovecot directory. So I know have /var/run/dovecot-director and dovecot-backend along with /etc/dovecot-director and /etc/dovecot-backend. The base_dir in these corresponds with the named directory in /var/run. The issue I have now is that only one instance will run the other outputs a bunch of errors: root@mail1:~# service dovecot-backend start [] Starting IMAP/POP3 mail server: dovecot-backendError: service(managesieve-login): listen(*, 4190) failed: Address already in use Error: service(pop3-login): listen(*, 110) failed: Address already in use Error: service(pop3-login): listen(*, 995) failed: Address already in use Error: service(lmtp): Socket already exists: /var/spool/postfix/private/dovecot-lmtp Error: service(lmtp): listen(*, 24) failed: Address already in use Error: service(imap-login): listen(*, 143) failed: Address already in use Error: service(imap-login): listen(*, 993) failed: Address already in use Error: service(auth): Socket already exists: /var/spool/postfix/private/dovecot-auth Fatal: Failed to start listeners i have edited the 10-master.conf file in the backend directory to use different port numbers but still receive the following output above. On Sep 23, 2014, at 3:07 PM, Chris Lasater vorg...@gmail.com wrote: The configuration and run/base_dir directories can be where ever you like. The locations Eduardo stated are the most appropriate for dovecot installed with an RPM. Mine were compiled and set in the home directory, so they are in a slightly different location. As long as you use the -c to point to the correct configuration file you should be good. For mine I kept my dovecot config file in the default location and put the director one elsewhere and created an alias, so that I can start the director by just typing director. This might make things easier for you to manage, then you can just stop it by running doveadm -i instance_name stop alias director=sudo -E PATH=${PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} /home/user/dovecot/sbin/dovecot -c /home/user/dovecot/etc/dovecot/director.conf On 09/23/2014 05:00 PM, jjhoffart wrote: Thanks for the replies, I am still fairly new to dovecot and still learning. This is a quick run down of my setup: 3 servers running iRedMail (this is a package that installs dovecot 2.1.7, postfix, and LDAP). All three servers share an NFS backend. The same 3 servers are also sitting behind a load balancer. What I want to do is use these three servers as directors and mail servers. So from the replies I have gotten I understand that I need to create 2 config files 1 for director and 1 for dovecot. Now my next question is do these config files need to be stored in /etc/dovecot or /var/run/dovecot? Also is creating the second config file as simple as copying and renaming the dovecot.conf file? On Sep 23, 2014, at 2:26 PM, Eduardo Ramos edua...@freedominterface.org wrote: Hi, In fact you don't NEED a director. You can use two dovecot servers sharing a NFS storage with a normal (backend) implementation. It's good to see that page: http://wiki2.dovecot.org/NFS for some good recomendations. You must have a base_dir for each instance of dovecot you want to run, and a dovecot.conf as well. One could be director and other backend. I suggest you have two separated configuration directories, /etc/dovecot-director and /etc/dovecot-backend. Each with the respective configuration. Start dovecot with dovecot -c /etc/dovecot-director/dovecot.conf. Backend is the same. In order to help more, provide us more details about your environment and doulbts. On 09/23/2014 03:57 PM, jjhoffart wrote: Hello, I am currently trying to setup a cluster of mail servers. I currently have two servers I am trying to cluster together. These servers will also have a shared NFS backend. I have read on the site that I will need to configure director since I am using NFS. I have read through all of the documentation on director but still need a little guidance to get things up and running. One of the questions I have is about the base_dir on the Multiple Invocations section of the wiki. It states that I will need to change the bas_dir to the new run directory, not sure what needs to happen here, can anyone help me out?
Re: director
Hi, In fact you don't NEED a director. You can use two dovecot servers sharing a NFS storage with a normal (backend) implementation. It's good to see that page: http://wiki2.dovecot.org/NFS for some good recomendations. You must have a base_dir for each instance of dovecot you want to run, and a dovecot.conf as well. One could be director and other backend. I suggest you have two separated configuration directories, /etc/dovecot-director and /etc/dovecot-backend. Each with the respective configuration. Start dovecot with dovecot -c /etc/dovecot-director/dovecot.conf. Backend is the same. In order to help more, provide us more details about your environment and doulbts. On 09/23/2014 03:57 PM, jjhoffart wrote: Hello, I am currently trying to setup a cluster of mail servers. I currently have two servers I am trying to cluster together. These servers will also have a shared NFS backend. I have read on the site that I will need to configure director since I am using NFS. I have read through all of the documentation on director but still need a little guidance to get things up and running. One of the questions I have is about the base_dir on the Multiple Invocations section of the wiki. It states that I will need to change the bas_dir to the new run directory, not sure what needs to happen here, can anyone help me out?
Re: director
The configuration use to be in /etc/dovecot, and the working dir is /var/run/dovecot. You should store your configuration file in the /etc/dovecot. The dovecot.conf file can be copied to dovecot-backend.conf and dovecot-director, for example, and you will use '-c' argument of dovecot binary to load on or another. If you do this, you will need create two separated working dir, that will be defined in base_dir on each configuration file. On 09/23/2014 05:39 PM, jjhoffart wrote: Thanks for the replies, I am still fairly new to dovecot and still learning. This is a quick run down of my setup: 3 servers running iRedMail (this is a package that installs dovecot 2.1.7, postfix, and LDAP). All three servers share an NFS backend. The same 3 servers are also sitting behind a load balancer. What I want to do is use these three servers as directors and mail servers. So from the replies I have gotten I understand that I need to create 2 config files 1 for director and 1 for dovecot. Now my next question is do these config files need to be stored in /etc/dovecot or /var/run/dovecot? Also is creating the second config file as simple as copying and renaming the dovecot.conf file? On Sep 23, 2014, at 2:26 PM, Eduardo Ramos edua...@freedominterface.org wrote: Hi, In fact you don't NEED a director. You can use two dovecot servers sharing a NFS storage with a normal (backend) implementation. It's good to see that page: http://wiki2.dovecot.org/NFS for some good recomendations. You must have a base_dir for each instance of dovecot you want to run, and a dovecot.conf as well. One could be director and other backend. I suggest you have two separated configuration directories, /etc/dovecot-director and /etc/dovecot-backend. Each with the respective configuration. Start dovecot with dovecot -c /etc/dovecot-director/dovecot.conf. Backend is the same. In order to help more, provide us more details about your environment and doulbts. On 09/23/2014 03:57 PM, jjhoffart wrote: Hello, I am currently trying to setup a cluster of mail servers. I currently have two servers I am trying to cluster together. These servers will also have a shared NFS backend. I have read on the site that I will need to configure director since I am using NFS. I have read through all of the documentation on director but still need a little guidance to get things up and running. One of the questions I have is about the base_dir on the Multiple Invocations section of the wiki. It states that I will need to change the bas_dir to the new run directory, not sure what needs to happen here, can anyone help me out?
Re: Multiple A Records for IMAP service
I agree with Alex and Jiri. Here I have the same scenario, DNS round-robin and 2 dovecot instances. It works well, but depends on the client implementation. I think keepalived or corosync/pacemaker is a more elegant solution too. I can help you implement. On 08/29/2014 08:34 AM, Jiri Bourek wrote: On 29.8.2014 13:00, Alex Crow wrote: Hi Vijay, No, this will not work properly. 50% of the time the client will still try to connect to the downed server. You need something like keepalived or corosync/pacemaker. Cheers Alex AFAIK some clients - with Thunderbird among them - will try the other IP address before reporting an error to the user.
Director health checker
Hi all. I'm writing a director health checker and ask you for suggestions. My project repository: https://github.com/duderamos/dovesitter Thanks.
Re: Multiple servers and NFS
Hi Richard, I think its better balance with a router too. Is there any problem with use postfix+amavis in the front-end? I did not understand what the advantage of use dovecot LMTP with director too. On 07/25/2014 01:58 AM, Richard Hector wrote: On 25/07/14 15:30, Eduardo Ramos wrote: Hi Richard, In fact I thought it a little confusing. I had some bad experience with DNS RR when one of my IMAP server got down. Clients continued trying connect to broken server and it caused some problems. But when everything is ok, it works well. I drew a diagram with my idea. What do you think? https://dl.dropboxusercontent.com/u/41373531/mail.png Interesting, thanks. I'd forgotten to draw in the director ring. As I said, if we need load balancing we can do that on the router, which as I understand it will do more or less the same thing as LVS. It might be Cisco SLB, but I'm not sure; I'm not the router guy :-) But what interests me most is that your diagram shows the mx servers connecting directly to the backend servers, rather than going through the proxy director - I thought that was a no-no. Oh, and I don't think we want to load down our front-end MX servers with amavis, either. Thanks for your input :-) Richard
Re: Multiple servers and NFS
Hi Richard, You can use one or more instances of Dovecot on the same machine, as you can see here (http://wiki2.dovecot.org/RunningDovecot) Running Multiple Invocations of Dovecot. The problem with DNS round-robind is that if you server goes down, DNS continues resolving for it. I would recommend use some balancer like LVS+keepalived. Consider that multi layer solution: | LVS + keepalived || LVS + keepalived | || -- -- | Director 1 | | Director 2 | -- -- || - - | IMAP/POP/LMTP | | IMAP/POP/LMTP | |Backend| |Backend| - - \/ \ / \ / ---| NetAPP |- Remember, directors and backends could run on the same machine. I have a lab running that way. Maybe I can help you deploy. On 07/23/2014 07:23 PM, Richard Hector wrote: Hi all, For some reason, I didn't go to http://wiki2.dovecot.org/NFS until now, and I'm starting to get worried ... The plan was to have multple servers (MXes) receiving mail, and delivering via LMTP to multiple backend dovecot servers (with amavis in front of dovecot; LMTP both sides). Then we'd have multiple servers for clients to use IMAP or POP3. This is more or less how the system already works, except with Courier IMAP, and postfix on the backends, delivering to maildirs with procmail. But with the recommendation to use the Director for both IMAP/POP3 and LMTP - that starts to sound like I need a whole bunch more servers to run Directors and proxies, and even then it might not be a good idea to have different servers running lmtp and imap/pop. One possible mitigating point is that our 'load balancing' is DNS round-robin, so a given client will probably stick with a single imap/pop server anyway, but if the user has multiple clients (desktop/mobile etc) then they may still hit different servers. Can someone clarify best practice for a setup needing multiple servers for load balancing and redundancy? Is Courier already likely to have been suffering these problems? Oh, the NFS server is a NetApp Filer, if that matters. I'm using dovecot 2.2.9 from debian wheezy backports, in order to get the quota policy daemon support. Thanks, Richard
Re: Multiple servers and NFS
Hi Nathan! I think you can consider about your index files. By default dovecot stores index files in mailbox, but you can define another location. Local disk could be better choice. Take I look at this: http://wiki2.dovecot.org/MailLocation http://wiki2.dovecot.org/MailLocation/SharedDisk http://wiki2.dovecot.org/IndexFiles I think it will help you. On 07/24/2014 02:09 PM, Nathan Schultheiss wrote: Hi Eduardo, Since I few day I try to setup this config 2, but I've really problem with the NFS. We come from Google Apps :) I several people on the hospital have large mailbox. For example 96000 mails in the INBOX folder, when I do ls that is quick for display mail, but with dovecot... I need wait 1 minuts the first time and after display the amount of mail it's quick. We don't have NetAPP, we've Dell Equallogic with SATA2 7200rpm, gigabits ports. The Equallogic it's just for store email, and index file. My config: Dell Equallogic |- VMWare ESXI (iscsi mount in VMware with VMWare VMFS 5 format 4To) |-- Mounted as slave disk on a VM Ubuntu and exported with this options (rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,async) and formated as ReiserFS (I've read it's the best for many small files). |--- My 2 Dovecot Backend mount the NFS (fstab) to my previous VM with this options nfs defaults 0 0 | Mail it's stored in MailDir format mail_location = maildir:%h When I go on Roundcube with a mailbox who I've 96000 in the INBOX cur folder, the first time I need 1 minutes waiting. The second time it's a little more quick 10 seconds... But when I go back again (after a few hours) it's slow again... And we'are just 5 users at the moment for test... I've not setup director for the moment I try first dovecot on my lab befor add director and move mailbox from Google... Have you recommandation for tune or make NFS more quickly, because with Google it's really fast (ok it's google) but if we move to a more slow system, the user on the hospital would no be happy. I've try many config, but no really success for have a fast NFS, I don't know if the problem it's VMWARE or if the problem it's just my NFS options. I'm not pettry good with linux, I'm most good with Windows server, I'm not a good man Google, Microsoft, I know it's devil for every linux sysadmin :) Thanks, Nathan - Mail original - De: Eduardo Ramos edua...@freedominterface.org À: dovecot@dovecot.org Envoyé: Jeudi 24 Juillet 2014 14:01:33 Objet: Re: Multiple servers and NFS Hi Richard, You can use one or more instances of Dovecot on the same machine, as you can see here (http://wiki2.dovecot.org/RunningDovecot) Running Multiple Invocations of Dovecot. The problem with DNS round-robind is that if you server goes down, DNS continues resolving for it. I would recommend use some balancer like LVS+keepalived. Consider that multi layer solution: | LVS + keepalived || LVS + keepalived | || -- -- | Director 1 | | Director 2 | -- -- || - - | IMAP/POP/LMTP | | IMAP/POP/LMTP | |Backend| |Backend| - - \/ \ / \ / ---| NetAPP |- Remember, directors and backends could run on the same machine. I have a lab running that way. Maybe I can help you deploy. On 07/23/2014 07:23 PM, Richard Hector wrote: Hi all, For some reason, I didn't go to http://wiki2.dovecot.org/NFS until now, and I'm starting to get worried ... The plan was to have multple servers (MXes) receiving mail, and delivering via LMTP to multiple backend dovecot servers (with amavis in front of dovecot; LMTP both sides). Then we'd have multiple servers for clients to use IMAP or POP3. This is more or less how the system already works, except with Courier IMAP, and postfix on the backends, delivering to maildirs with procmail. But with the recommendation to use the Director for both IMAP/POP3 and LMTP - that starts to sound like I need a whole bunch more servers to run Directors and proxies, and even then it might not be a good idea to have different servers running lmtp and imap/pop. One possible mitigating point is that our 'load balancing' is DNS round-robin, so a given client will probably stick with a single imap/pop server anyway, but if the user has multiple clients (desktop/mobile etc) then they may still hit different servers. Can someone clarify best practice for a setup needing multiple servers for load
Re: Multiple servers and NFS
Hi Richard, In fact I thought it a little confusing. I had some bad experience with DNS RR when one of my IMAP server got down. Clients continued trying connect to broken server and it caused some problems. But when everything is ok, it works well. I drew a diagram with my idea. What do you think? https://dl.dropboxusercontent.com/u/41373531/mail.png On 07/24/2014 09:25 PM, Richard Hector wrote: On 25/07/14 09:12, Richard Hector wrote: Rather than trying to draw increasingly complex diagrams in ASCII, I've put some here (without the LVS layer): https://walnut.gen.nz/mail-architectures.png I've come up with a revised plan - I think we can do without LVS; SMTP should just work with multiple MX records, and IMAP/POP should be fine as well with RRDNS - the machines should be up most of the time, and if a customer has to click to reconnect every now and then on the rare occasions when they're not it's not a huge deal. Otherwise, we could also do load balancing on our routers. Anyway - any comments on the sanity of this diagram most welcome :-) https://walnut.gen.nz/mail-architecture-2.png Richard
Maildir index
Hi all! I store my maildir mailboxes in a ocfs2 volume. By default, my indexes are stored with the inbox. If I change now to a local disk, could I have trouble? That's my production server. Thanks!