{"id":355,"date":"2012-06-27T14:49:15","date_gmt":"2012-06-27T14:49:15","guid":{"rendered":""},"modified":"2016-01-11T13:06:29","modified_gmt":"2016-01-11T12:06:29","slug":"dovecot-compilation-and-installation","status":"publish","type":"post","link":"https:\/\/drfugazi.eu.org\/en\/dovecot-compilation-and-installation\/","title":{"rendered":"Dovecot &#8211; compilation and installation"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2012\/07\/dovecot.gif\" data-rel=\"lightbox-gallery-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"552\" data-permalink=\"https:\/\/drfugazi.eu.org\/en\/pigeonhole-compilation\/dovecot\/\" data-orig-file=\"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2012\/07\/dovecot.gif?fit=125%2C60&amp;ssl=1\" data-orig-size=\"125,60\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"dovecot\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2012\/07\/dovecot.gif?fit=125%2C60&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2012\/07\/dovecot.gif?fit=125%2C60&amp;ssl=1\" class=\"alignleft size-full wp-image-552\" src=\"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2012\/07\/dovecot.gif?resize=125%2C60\" alt=\"dovecot\" width=\"125\" height=\"60\" data-recalc-dims=\"1\" \/><\/a>On Linux systems you can install Dovecot from packages. Appropriate packages supports also LDAP authentication, MySQL and so on. Unfortunatelly you probably would not find a newest versions, when you install in this manner. Eg. for today in Ubuntu packages you will find version 2.0.19-0ubuntu1, while on <a href=\"http:\/\/dovecot.org\/\">Dovecot page<\/a> version 2.1.7 is available. For this reason it is worth to compile and install software by yourself, even it is available in package.<!--more--><\/p>\n<p>Below is my script, which I used to compilation of Dovecot server on Solaris 10 SPARC with SunStudio compiler.<\/p>\n<pre><code>\r\n#!\/bin\/sh\r\n#\r\n\r\n# for GCC:\r\n#CC=gcc\r\n#CFLAGS=\"-O2 -mcpu=v9\"\r\n#MAKE=gmake\r\n#\r\n# for Sun Studio\r\nCC=cc\r\nCXX=CC\r\nCFLAGS=\"-xO3 -xautopar\"\r\nCXXFLAGS=$CFLAGS\r\nCPPFLAGS=\"-I\/usr\/local\/ssl\/include -I\/usr\/local\/openldap\/include -I\/usr\/local\/include\"\r\nMAKE=dmake\r\n#DMAKE_MODE=serial\r\n\r\nexport CC CFLAGS CPPFLAGS MAKE DMAKE_MODE\r\nexport CXX CXXFLAGS LDFLAGS LIBS\r\n\r\n# $CC -v\r\n$CC -V\r\nset|grep PATH\r\nset|grep FLAGS\r\n\r\nDIR=\"dovecot\"\r\nVER=\"2.1.7\"\r\n\r\ncd $DIR-$VER\r\n\r\ntn=\"n\"\r\necho \"=============================================\"\r\necho \"$MAKE clean [y|n] ?\"\r\nread tn\r\nif [ \"$tn\" = \"t\" ] || [ \"$tn\" = \"y\" ]; then\r\n  $MAKE distclean || $MAKE realclean || $MAKE clean\r\n\r\n  rm -f config.status\r\n  rm -f config.log\r\nfi;\r\n\r\ntn=\"n\"\r\necho \"=============================================\"\r\necho \"configure [y|n] ?\"\r\nread tn\r\nif [ \"$tn\" = \"t\" ] || [ \"$tn\" = \"y\" ]; then\r\n    .\/configure \\\r\n    --prefix=\/usr\/local\/$DIR-$VER \\\r\n    --infodir=\/usr\/local\/info --mandir=\/usr\/local\/man \\\r\n    --sysconfdir=\/data\/etc \\\r\n    --localstatedir=\/data\/var\/$DIR \\\r\n    --with-libiconv-prefix=\/usr\/local \\\r\n    --with-ldap \\\r\n    --with-ssl \\\r\n    --with-ssldir=\/data\/etc\/certs\r\n\r\nfi;\r\n\r\ntn=\"n\"\r\necho \"=============================================\"\r\necho \"$MAKE [y|n] ?\"\r\nread tn\r\nif [ \"$tn\" = \"t\" ] || [ \"$tn\" = \"y\" ]; then\r\n  $MAKE &amp;&amp; echo \"Compillation successful\"\r\nfi;\r\n\r\nDMAKE_MODE=serial\r\nexport DMAKE_MODE\r\n\r\ntn=\"n\"\r\necho \"=============================================\"\r\necho \"$MAKE test || $MAKE check [y|n] ?\"\r\nread tn\r\nif [ \"$tn\" = \"t\" ] || [ \"$tn\" = \"y\" ]; then\r\n  $MAKE test || $MAKE check\r\nfi;\r\n<\/code><\/pre>\n<p>Transcript of session:<\/p>\n<pre>checking for a BSD-compatible install... \/usr\/local\/bin\/install -c\r\nchecking whether build environment is sane... yes\r\nchecking for a thread-safe mkdir -p... \/usr\/local\/bin\/mkdir -p\r\nchecking for gawk... gawk\r\nchecking whether dmake sets $(MAKE)... yes\r\n...\r\nInstall prefix . : \/usr\/local\/dovecot-2.1.7\r\nFile offsets ... : 64bit\r\nI\/O polling .... : poll\r\nI\/O notifys .... : none\r\nSSL ............ : yes (OpenSSL)\r\nGSSAPI ......... : no\r\npassdbs ........ : static passwd passwd-file shadow pam checkpassword ldap\r\n                 : -bsdauth -sia -sql -vpopmail\r\nuserdbs ........ : static prefetch passwd passwd-file checkpassword ldap\r\n                 : -sql -vpopmail -nss\r\nSQL drivers .... :\r\n                 : -pgsql -mysql -sqlite\r\nFull text search : squat\r\n                 : -lucene -solr\r\n<\/pre>\n<pre>dmake [y|n] ?\r\ny\r\ndmake  all-recursive\r\nMaking all in .\r\nold=`pwd` &amp;&amp; cd . &amp;&amp; abs_builddir=`pwd` &amp;&amp; cd $old &amp;&amp; \\\r\ncd . &amp;&amp; abs_srcdir=`pwd` &amp;&amp; cd $old &amp;&amp; \\\r\ncat dovecot-config.in | sed \\\r\n-e \"s|\\$(top_builddir)|$abs_builddir|g\" \\\r\n-e \"s|\\$(incdir)|$abs_srcdir|g\" \\\r\n-e \"s|\\$(LIBICONV)|\/usr\/local\/lib\/libiconv.so -R\/usr\/local\/lib|g\" \\\r\n-e \"s|^\\(dovecot_pkgincludedir\\)=|\\1=\/usr\/local\/dovecot-2.1.7\/include\/dovecot|\" \\\r\n-e \"s|^\\(dovecot_pkglibdir\\)=|\\1=\/usr\/local\/dovecot-2.1.7\/lib\/dovecot|\" \\\r\n-e \"s|^\\(dovecot_pkglibexecdir\\)=|\\1=\/usr\/local\/dovecot-2.1.7\/libexec\/dovecot|\" \\\r\n-e \"s|^\\(dovecot_docdir\\)=|\\1=\/usr\/local\/dovecot-2.1.7\/share\/doc\/dovecot|\" \\\r\n-e \"s|^\\(dovecot_moduledir\\)=|\\1=\/usr\/local\/dovecot-2.1.7\/lib\/dovecot|\" \\\r\n&gt; dovecot-config\r\n...\r\nMaking all in wiki\r\nMaking all in example-config\r\nMaking all in conf.d\r\ncat .\/README.in | sed \"s|@exampledir@|\/usr\/local\/dovecot-2.1.7\/share\/doc\/dovecot\/example-config|\" &gt; README\r\nCompillation successful\r\n=============================================\r\n<\/pre>\n<pre>dmake test || dmake check [y|n] ?\r\ny\r\ndmake: Fatal error: Don't know how to make target `test'\r\nMaking check in .\r\n\/bin\/bash .\/update-version.sh . .\r\nMaking check in src\r\nMaking check in lib-test\r\nMaking check in lib\r\nfor bin in test-lib; do \\\r\n  if !  .\/$bin; then exit 1; fi; \\\r\ndone\r\naqueue ............................................................... : ok\r\narray foreach ........................................................ : ok\r\narray reverse ........................................................ : ok\r\nbase64_encode() ...................................................... : ok\r\n...\r\n0 \/ 73 tests failed\r\ndmake  check-am\r\nMaking check in lib-auth\r\n...\r\nmbox_from_parse(1,14) ................................................ : ok\r\nmbox_from_create() ................................................... : ok\r\n0 \/ 31 tests failed\r\n...\r\nproxy server msg copy ................................................ : ok\r\nproxy server msg save ................................................ : ok\r\n0 \/ 13 tests failed\r\nMaking check in ssl-params\r\nMaking check in stats\r\n...\r\n<\/pre>\n<p>Installation with root privileges (<code>su -<\/code> or <code>sudo -i<\/code>)<\/p>\n<pre><code># dmake install<\/code><\/pre>\n<p>If you have Sieve support, you need to compile sieve for new version before you switch to new Dovecot.<\/p>","protected":false},"excerpt":{"rendered":"<p>Sorry, this entry is only available in Polish. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.Dovecota w&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[110],"tags":[12,16,22,9,11],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7M9Tz-5J","jetpack-related-posts":[{"id":206,"url":"https:\/\/drfugazi.eu.org\/en\/dovecot-1213\/","url_meta":{"origin":355,"position":0},"title":"dovecot-1.2.13","author":"drfugazi","date":"Friday August 13th, 2010","format":false,"excerpt":"Dovecot jest Open Sourceowym serwerem IMAP i POP3 dla system\u00f3w Linux\/UNIX, napisanym z naciskiem na bezpiecze\u0144stwo. Dovecot jest doskona\u0142ym wyborem zar\u00f3wno dla ma\u0142ych jak i wielkich instalacji. Jest szybki, \u0142atwy do ustawienia, nie wymaga specjalnej administracji i u\u017cywa niewiele pami\u0119ci. \u0179r\u00f3d\u0142o: http:\/\/dovecot.org\/ Poni\u017cej znajdziecie zapis sesji konfiguracji i kompilacji serwera\u2026","rel":"","context":"In \"Dovecot\"","block_context":{"text":"Dovecot","link":"https:\/\/drfugazi.eu.org\/en\/tag\/dovecot\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":366,"url":"https:\/\/drfugazi.eu.org\/en\/pigeonhole-compilation\/","url_meta":{"origin":355,"position":1},"title":"Pigeonhole &#8211; compilation and installation","author":"drfugazi","date":"Friday July  6th, 2012","format":false,"excerpt":"You can download Pigeonhole for Dovecot from http:\/\/pigeonhole.dovecot.org\/download.html % wget http:\/\/www.rename-it.nl\/dovecot\/2.1\/dovecot-2.1-pigeonhole-0.3.1.tar.gz % tar -xf dovecot-2.1-pigeonhole-0.3.1.tar.gz This is my script to configure and compile Pigeonhole 0.3.1 for Dovecot 2.1","rel":"","context":"In &quot;Compilation&quot;","block_context":{"text":"Compilation","link":"https:\/\/drfugazi.eu.org\/en\/category\/compilation\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":281,"url":"https:\/\/drfugazi.eu.org\/en\/imap-proxy\/","url_meta":{"origin":355,"position":2},"title":"(Polski) Imap Proxy","author":"drfugazi","date":"Wednesday July  6th, 2011","format":false,"excerpt":"Sorry, this entry is only available in Polish. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.IMAP Proxy jest cacheuj\u0105cym serwerem proxy IMAP przeznaczonym do u\u017cycia z klientami webmail, kt\u00f3re nie potrafi\u0105 utrzymywa\u0107 sta\u0142ych\u2026","rel":"","context":"In &quot;Mail system&quot;","block_context":{"text":"Mail system","link":"https:\/\/drfugazi.eu.org\/en\/category\/mail-system\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":207,"url":"https:\/\/drfugazi.eu.org\/en\/dovecot-12-sieve-0117\/","url_meta":{"origin":355,"position":3},"title":"dovecot-1.2-sieve-0.1.17","author":"drfugazi","date":"Friday August 13th, 2010","format":false,"excerpt":"Dovecot Sieve jest kompletnie przepisan\u0105 implementacj\u0105 Sieve dla Dovecota w wersji 1.2 i nowszych. G\u0142\u00f3wnym powodem przepisania silnika Sieve by\u0142o zapewnienie bardziej niezawodnego wykonywania skryptu oraz lepszych komunikat\u00f3w b\u0142\u0119d\u00f3w dla u\u017cytkownik\u00f3w i administrator\u00f3w systemu. Ta implementacja jest cz\u0119\u015bci\u0105 Projektu Pigeonhole. \u0179r\u00f3d\u0142o: http:\/\/wiki.dovecot.org\/LDA\/Sieve\/Dovecot \u015aci\u0105gni\u0119cie \u017ar\u00f3de\u0142, rozpakowanie i edycja skryptu do konfiguracji\u2026","rel":"","context":"In \"Dovecot\"","block_context":{"text":"Dovecot","link":"https:\/\/drfugazi.eu.org\/en\/tag\/dovecot\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":216,"url":"https:\/\/drfugazi.eu.org\/en\/dovecot-203\/","url_meta":{"origin":355,"position":4},"title":"dovecot-2.0.3","author":"drfugazi","date":"Tuesday September 21st, 2010","format":false,"excerpt":"Dovecot jest Open Sourceowym serwerem IMAP i POP3 dla system\u00f3w Linux\/UNIX, napisanym z naciskiem na bezpiecze\u0144stwo. Dovecot jest doskona\u0142ym wyborem zar\u00f3wno dla ma\u0142ych jak i wielkich instalacji. Jest szybki, \u0142atwy do ustawienia, nie wymaga specjalnej administracji i u\u017cywa niewiele pami\u0119ci. \u0179r\u00f3d\u0142o: http:\/\/dovecot.org\/ Poni\u017cej znajdziecie zapis sesji konfiguracji i kompilacji serwera\u2026","rel":"","context":"In \"Dovecot\"","block_context":{"text":"Dovecot","link":"https:\/\/drfugazi.eu.org\/en\/tag\/dovecot\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":348,"url":"https:\/\/drfugazi.eu.org\/en\/dovecot-2\/","url_meta":{"origin":355,"position":5},"title":"Dovecot","author":"drfugazi","date":"Monday June  4th, 2012","format":false,"excerpt":"Dovecot is an open source IMAP and POP3 email server for Linux\/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory.","rel":"","context":"In &quot;Mail system&quot;","block_context":{"text":"Mail system","link":"https:\/\/drfugazi.eu.org\/en\/category\/mail-system\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/355"}],"collection":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/comments?post=355"}],"version-history":[{"count":3,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/355\/revisions"}],"predecessor-version":[{"id":561,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/355\/revisions\/561"}],"wp:attachment":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/media?parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/categories?post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/tags?post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}