Dovecot plugin and Push Mail
I’m posting this here and will in a couple other places to see if anyone has any experience with this and knows what I can do. My setup is CentOS 6 with postfix, procmail and dovecot administered via Virtualmin. Postfix of course receives the email. Procmail uses it’s hooks to run the email through spam assassin and clamd. After than procmail hands it off to dovecot/deliver to drop it in the user’s mail box. I use the following plugin for dovecot with the daemon to provide Apple push mail for iPhones. https://github.com/st3fan/dovecot-xaps-daemon https://github.com/st3fan/dovecot-xaps-plugin For the most part, this works awesome but have run into a bit of a race issue with notification of mail in a particular instance. On my computer I use Outlook for Mac which says it supports IDLE but is broken. When an email comes in, I ALWAYS get the notification via the dovecpt plugin for a push since Outlook is checking IMAP every 2 minutes. On a buddy’s setup, he uses Apple Mail which supports IDLE that actually works. When his email client is connected from his laptop, it does actually maintain a persistent connection and NEVER receives a notification from the dovecot plugin because I’m guessing dovecot/deliver sees that the email was received by the desktop client. I’m not sure how to make the plugin ALWAYS give a push. Is it a dovecot config? A bug in the plugin? I’m not sure. Suggestions? Thank you, Steffan Cline 602-793-0014
Re: how to treat synonymous domain names as one
Hallo Thanks for your reply. I thought about using symlinks, i do not like this solution. Anyway, it is acceptable for paths to passdb/userdb. Thanks for the hits about user=xxx ! I will use it for paths to mail directories. Thanks again! Best regards, Nikolai On Wed, Oct 7, 2015 at 3:09 PM, Steffen Kaiser < skdove...@smail.inf.fh-brs.de> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Wed, 7 Oct 2015, Nikolai Krot wrote: > > I am curious if there is a way to rewrite domain name to another domain >> name. My goal is to provide authentication and mailboxes for the >> synonymous >> domains in a single source while keeping all other domains separate. >> >> I have setup: >> >>auth_username_format = %Lu >>mail_location = /var/vmail/%d/%u/Maildir >> >>in userdb/passdb (passwd-file): >>/etc/dovecot/%d/users >> >> Say I have two synonymous domain names >> >> my-domain-1.com >> my-long-named-domain-1.com >> > > symlink the passdb of both domains together, as well as the userdb files. > If you use the same file for both passdb and userdb, symlink just this > single file. Then add the "user" ExtraField to all users in passdb and > userdb. E.g. for user XYZ add user=x...@my-domain-1.com > > see: > http://wiki2.dovecot.org/AuthDatabase/PasswdFile > > >> I want both to resolve to my-domain-1.com when %d variable is used in >> Dovecot configs, so that >> >> passwd-file is /etc/dovecot/my-domain-1.com/users >> mailbox is /var/vmail/my-domain-1.com/user/Maildir >> >> while keeping other domains unchanged >> >> my-other-domain-2.com >> >> should resolve to: >> >> passwd-file is /etc/dovecot/my-other-domain-2.com/users >> mailbox is /var/vmail/my-other-domain-2.com/user/Maildir >> >> thanks, >> Nikolai >> >> > - -- Steffen Kaiser > -BEGIN PGP SIGNATURE- > Version: GnuPG v1 > > iQEVAwUBVhUZgHz1H7kL/d9rAQIp/Af/X27OvJWg6QjlWeIYS9m/JmEuyiWGkBlH > hzdIr3moczMejv1829tYIJzMPM9LiDcysf/crMwCCF56AXLkDOfjENh9dUpd8pDx > thOJ1xD1oHG+VdAh/+YV0IX2VKruu8lA+ZW0h5HshaDgBaXXshgXMkvi7TI8cOYd > 1G9nVMbip7qsjeCNmynNMgtwTEBb4HiBNEvkr7aVl+L4AF4z8L130EpX2BMVNdTX > xqQuF9GK6xy24noLXBIxoNpt28y0bHK04S43zyuErHvWoI9tBMJrzq4MLPJq8coZ > FaUemvGW5sDLbb86PRGtFUTXG7RVmmOJVrvrBZSVHysHszdvB9douA== > =xkTg > -END PGP SIGNATURE- >
Dovecot auth-ldap ignores tls_* settings when using ldaps://
Hi, I'm using dovecot 2.2.9 (but after checking src/auth/db-ldap.c in 2.2.13 there seems to be the same bug/feature). The userdb and passdb use LDAP. All further configuration is done in auth-ldap.conf.ext. uri = ldaps:/// # tls = tls_cert_file = /etc/ssl/certs/client-cert.pem tls_key_file = /etc/ssl/certs/client-key.file Dovecot ignores the tls_* options. If I use an ldap:// URI and switch on TLS using tls=yes it works as expected. But I do not see any reason why LDAPS should not read the tls_* settings. This small patch solved it for me --- dovecot-2.2.9/src/auth/db-ldap.c2013-11-24 14:37:39.0 +0100 +++ dovecot-2.2.9.hs12/src/auth/db-ldap.c 2015-10-08 21:24:47.051446465 +0200 @@ -1043,7 +1043,7 @@ static void db_ldap_set_tls_options(struct ldap_connection *conn) { - if (!conn->set.tls) + if (!(conn->set.tls || strncmp(conn->set.uris, "ldaps:", 6) == 0)) return; #ifdef OPENLDAP_TLS_OPTIONS It would be great, if somebody can confirm this and if this or some equivalent patch could make it upstream. Best regards from Dresden/Germany Viele Grüße aus Dresden Heiko Schlittermann -- SCHLITTERMANN.de internet & unix support - Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} - gnupg encrypted messages are welcome --- key ID: F69376CE - ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 - signature.asc Description: Digital signature
Re: Dovecot plugin and Push Mail
I figured this might be handy for anyone to look over. # doveconf -n # 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-71.29.1.el6.x86_64 x86_64 CentOS release 6.7 (Final) auth_mechanisms = plain login disable_plaintext_auth = no mail_debug = yes mail_location = maildir:~/Maildir managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date mbox_write_locks = fcntl passdb { driver = pam } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve xaps_socket = /var/run/xapsd/xapsd.sock } postmaster_address = postmas...@hldns.com protocols = imap pop3 sieve service managesieve-login { inet_listener sieve { port = 4190 } } ssl_ca = wrote: >I’m posting this here and will in a couple other places to see if anyone has >any experience with this and knows what I can do. > >My setup is CentOS 6 with postfix, procmail and dovecot administered via >Virtualmin. > >Postfix of course receives the email. Procmail uses it’s hooks to run the >email through spam assassin and clamd. After than procmail hands it off to >dovecot/deliver to drop it in the user’s mail box. > >I use the following plugin for dovecot with the daemon to provide Apple push >mail for iPhones. > >https://github.com/st3fan/dovecot-xaps-daemon > >https://github.com/st3fan/dovecot-xaps-plugin > >For the most part, this works awesome but have run into a bit of a race issue >with notification of mail in a particular instance. > >On my computer I use Outlook for Mac which says it supports IDLE but is >broken. When an email comes in, I ALWAYS get the notification via the dovecpt >plugin for a push since Outlook is checking IMAP every 2 minutes. > >On a buddy’s setup, he uses Apple Mail which supports IDLE that actually >works. When his email client is connected from his laptop, it does actually >maintain a persistent connection and NEVER receives a notification from the >dovecot plugin because I’m guessing dovecot/deliver sees that the email was >received by the desktop client. > >I’m not sure how to make the plugin ALWAYS give a push. Is it a dovecot >config? A bug in the plugin? I’m not sure. > >Suggestions? > > >Thank you, >Steffan Cline >602-793-0014 >