Re: replicating (manage)sieve - no symlink on replica?
On 9/11/2014 3:36 PM, Philipp wrote: > 2.2.13/0.4.2, both from source-tarball, no fancy options. > > tcp-replication between two nodes and following plugin parameters > (same on both sides, except the ip-addr) > plugin { > sieve_before = /home/ssfn/etc/dovecot/sieve.default > sieve_global_dir = /home/ssfn/etc/dovecot > sieve = ~/.dovecot.sieve > sieve_dir = ~/.sieve > sieve_extensions = +vnd.dovecot.duplicate > sieve_duplicate_period = 6h > mail_replica = tcp:10.66.50.15:9993 > } > > mail_location = sdbox:/home/ssfn/var/mail/boxes/%n > mail_home = /home/ssfn/var/mail/boxes/%n > > Testbed: user getting first email delivered, the subdir %n/.sieve/tmp > is automatically created as expected. > User logs into managesieve on node1 and uploads a script. > The %n/.sieve/managesieve.sieve and the symlink .dovecot.sieve -> > .sieve/managesieve.sieve > is created as expected. > > One node2 (via replica) happens: > automatically create %n/.sieve/tmp > automatically create/sync %n/.sieve/managesieve.sieve > just NOT the symlink .dovecot.sieve -> .sieve/managesieve.sieve > > Logfiles for lmtp,doveadm,dsync-local dont indicate an error why it > could not create the link or such, > to me it looks like it wouldnt even try. > > mail-syncing works flawlessly (for delivery, just read about the > expunge .. hum.) > > I tried to force a full-resync via doveadm replicator afterwards, to > no change on the matter. > > Any input? Sorry, I haven't had time to look at this one. I believe a similar issue was reported earlier. It is on my list, but testing this is a bit cumbersome for me at the moment. Regards, Stephan.
Issue creating mailboxes
CentOS 6.5, cyrus-imapd 2.3.16-6 So, I gather you're supposed to create mailboxes called user. But I wind up with user^, and mailbox can't be found. [joliver@localhost ~]$ cyradm -u testuser1 localhost Password: localhost> cm user.testuser2 localhost> cm user.testuser3 localhost> cm user.textuser4 [joliver@localhost ~]$ sudo ls -l /var/vmail/u/ total 12 drwx--. 2 cyrus mail 4096 Sep 15 15:07 user^testuser2 drwx--. 2 cyrus mail 4096 Sep 15 14:51 user^testuser3 drwx--. 2 cyrus mail 4096 Sep 15 15:07 user^textuser4 Sep 15 15:05:18 localhost lmtpunix[15704]: verify_user(user.testuser2) failed: Mailbox does not exist Sep 15 15:05:18 localhost master[15929]: about to exec /usr/lib/cyrus-imapd/lmtpd Sep 15 15:05:18 localhost lmtpunix[15929]: executed Sep 15 15:05:18 localhost postfix/lmtp[15928]: 4B2E61ED5: to=, relay=localhost.localdomain[/var/lib/imap/socket/lmtp], delay=32, delays=32/0.01/0/0.02, dsn=5.1.1, status=bounced (host localhost.localdomain[/var/lib/imap/socket/lmtp] said: 550-Mailbox unknown. Either there is no mailbox associated with this 550-name or you do not have authorization to see it. 550 5.1.1 User unknown (in reply to RCPT TO command)) What did I do wrong? -- *** * John Oliver http://www.john-oliver.net/ * * * ***
Re: Clear a single user mapping in Director setup
Hi there, Please see "doveadm director move". This forces a specific backend for one user, for the duration of TTL. Kind regards Daniel
Re: Case sensitivity
Am 11.09.2014 um 19:42 schrieb John Oliver: I think I've answered my last question by changing mail_location But I'm still getting duplicate mailboxes: [joliver@localhost ~]$ sudo ls -l /var/vmail/ total 8 drwx--. 3 vmail vmail 4096 Sep 11 10:30 testuser1 drwx--. 3 vmail vmail 4096 Sep 11 10:36 testUser1 The cn for my user is 'testUser1', and that's where postfix writes mail. But dovecot wants to use 'testuser1', even if I log in as 'testUser1' I suppose one answer may be to try to get postfix to always use lower-case, but in case that can't happen, how can I get dovecot to ignore case when looking for mailboxes? Is the username modified by your user query? Something like "%Ln"? http://wiki2.dovecot.org/Variables -- Alex JOST
Re: Configure Dovecot Master User
Hi, Oscar, Thank you all, worked with these tips. Very nice. "a login username*masteruser master_password " Clovis Em 12-09-2014 10:45, Oscar del Rio escreveu: On 12/09/2014 7:58 AM, Listas@Adminlinux wrote: Replace "a login mailadm*master master_password" for "a login master*clovis master_password" It should be the opposite: a login username*masteruser master_password where username is the regular user (e.g. "clovis") and masteruser is the master defined in /etc/dovecot/passwd.masterusers Dovecot would log: auth: passdb(*masteruser*,IPADDRESS,master,): Master user logging in as *username* The OP should also check that the master password file has the correct entries (it is a standard htpasswd file format) and it is readable by the dovecot process. -- Clovis Tristao - UNICAMP/Faculdade de Engenharia Agricola Administrador de Redes - Secao de Informatica (SINFO) E-mail: clo...@feagri.unicamp.br http://www.feagri.unicamp.br MSN: clovis_trista...@hotmail.com Fone: 55(19) 35211031-35211038-35211047-91173116
dovecot and gmail backup
Hello, I'm trying to use my server running dovecot to receive via imap a backup of my gmail account, messages. I'm getting an error from imap.gmail.com that it does support plain authentication but that it failed to download messages. If anyone has this working please let me know what you had to do. Thanks. Dave.
Re: vsz_limit is 18,447 PB
On Sep 8, 2014, at 6:38 PM, Jiri Bourek wrote: >>> Background: I’m in the only user on this system, but this server is accessed by my phone, my laptop, my tablet, and perhaps a web interface. >>> But there are some interesting values when I look at the output of doveconf. Specifically, vsz_limit is 18,447 PB… yeah, that’s pretty big. service imap-login { vsz_limit = 18446744073709551615 B } >>> >>> According to your log it was process “im ap" what ran out of memory. You >>> are showing configuration for imap-login - they are not the same thing, see >>> http://wiki2.dovecot.org/Design/Processes >> >> My errror, sorry. OK, here’s imap: >> >> service imap { >> chroot = >> client_limit = 1 >> drop_priv_before_exec = no >> executable = imap >> extra_groups = >> group = >> idle_kill = 0 >> privileged_group = >> process_limit = 1024 >> process_min_avail = 0 >> protocol = imap >> service_count = 1 >> type = >> unix_listener login/imap { >> group = >> mode = 0666 >> user = >> } >> user = >> vsz_limit = 18446744073709551615 B >> } >> >> Still the same value… why not 265MB? > > Hm, I can only guess (someone with more knowledge of dovecot source code > probably knows better), but it seems like that value is magic number for "not > set". My doveconf outputs the same thing on services which don't have > vsz_limit set explicitly, but when I list /proc/[pid]/limits on such a > service, the row called "Max address space" (which is - AFAIK - limit on vsz) > shows 2GB, a value of default_vsz_limit setting. > > I'd say don't overthink it, just put explicit vsz_limit = 512M into service > imap section (if your machine's RAM allows) and be done with it. For the record, the error has recurred a few times, so after today’s incident, I added this to dovecot.conf, and restarted dovecot: service imap { vsz_limit = 512MB } FWIW, the server contains 8192 MB of RAM. signature.asc Description: Message signed with OpenPGP using GPGMail
migration from cyrus with dsync sieve problem
Hi all i'm migrating a cyrus imapd server to dovecot with dsync everyting seems working but sieve rules are not copied to dovecot server I searched for documentation but without any luck I use the configuration below with doveadm -v -o mail_fsync=never backup -R -u emailaddr imapc: Is sieve supported with dsync? How I can specify sieve server address and port? # 2.2.13.21 (606efd4a4f35): /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-431.29.2.el6.x86_64 x86_64 CentOS release 6.5 (Final) ext4 auth_default_realm = mydomain.com auth_mechanisms = plain login auth_realms = mydomain.com auth_socket_path = /var/run/dovecot/auth-userdb first_valid_gid = 492 first_valid_uid = 492 hostname = mydomain.com imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags imap_id_log = * imap_idle_notify_interval = 29 mins imapc_features = rfc822.size fetch-headers imapc_host = oldserver.mydomain.com imapc_master_user = cyrus imapc_password = xxx imapc_user = %u last_valid_gid = 492 last_valid_uid = 492 lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k mail_attachment_dir = /var/vmail/%d/attachments/ mail_location = maildir:/var/vmail/%d/%n/Maildir:LAYOUT=fs mail_plugins = zlib listescape acl mail_prefetch_count = 20 mailbox_list_index = yes 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 duplicate mbox_write_locks = fcntl namespace inbox { inbox = yes list = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator = / subscriptions = yes type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { acl = vfile sieve = file:~/sieve;active=~/.dovecot.sieve } protocols = imap lmtp sieve service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } } service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { user = vmail } ssl = required ssl_cert = ssl_cipher_list = EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+AES EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS ssl_dh_parameters_length = 2048 ssl_key =
Re: Announce: Plugin for iOS Push Email support
On 05 Sep 2014, at 04:35, Stefan Arentz wrote: > I’ve been hacking on a personal side project to support native iOS Push Email > in Dovecot. This is specifically for people who are migrating their mail away > from OS X Server while keeping their existing Push Email functionality. Nice. I had been planning to look into this as well, but never had much time. Some comments from a quick look: - xaps_str_append_quoted() doesn't quote CR/LF/TABs. Of course those shouldn't normally exist in any of the fields, but older Dovecot versions would have allowed creating folder names with them. Using the str_append_tabescaped() would escape them as well, although then you'd have to implement the unescaping also with Python. - ideally the communication between Dovecot and xaps-daemon would be done asynchronously, but as a quick change you could also use i_stream_create_fd() + i_stream_read_next_line() instead of the strtok_r call. Oh and in internal Dovecot protocols it has always used LF, not CRLF, which would also make it a bit easier to handle. - in xaps_notify() especially async IO would be much better to avoid latency. It's also easier to do than in init, since it wouldn't really even need to wait for the response. Even without async IO does it really even need to read the answer from the server? - also to avoid bursts of notifications in some situations, you could use timeout_add(NOTIFY_DELAY_MSECS, ...) and have the timeout function send the notification. The delay being for example 0,5 seconds or maybe configurable. BTW. We could have some other Dovecot plugins that need to be developed if you want more (paid) work. :) We need to hire more developers to reduce my work load..
Re: Per-folder (per-mailbox) message expiration with control from client side — is it possible?
Am 15.09.2014 um 11:50 schrieb Lev Serebryakov: > On 15/09/2014 11:26, Robert Schetterer wrote: > >> i am not sure what exact you searching for if youre on linux try >> look here > >> http://www.athensfbc.com/imap_tools/details.html > It looks like good toolset, but not solution, > >> http://imapsync.lamiral.info/ > >> thunderbird also has plugins like > >> https://addons.mozilla.org/de/thunderbird/addon/awesome-auto-archive/ > > I'm searching for solution like this, but running on server (from > cron, by example) but I want configure it from client, like I > configure sieve from Thunderbird. like this https://github.com/thsmi/sieve/blob/master/nightly/README.md https://addons.mozilla.org/de/thunderbird/addon/sieve ? Best solution will be to translate > Thunderbird native settings to some server solution, you mean some auto translation from thunderbird "local" filter rules to server sieve rules ? some other TB filter stuff is here https://addons.mozilla.org/de/thunderbird/search/?q=filter&appver=&platform= as typing long > folder (mailbox) names by hands (and I have hierarchy with depth of > 5!) is error-prone, so it is better to have GUI for configuration > which shows real folders (mailboxes). It is place where I prefer > clicking to typing. roundcube , horde-ingo has online gui sieve editors > >> however i would prefer doveadm expunge via ssh or cron etc > It is solution too, but see part about configuration. you may look too at http://linux.die.net/man/5/imapfilter_config > > i am not sure that an "exact" solution exists to what you ask for, guess you have to to find a workaround practice or code something by your own Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
Re: Per-folder (per-mailbox) message expiration with control from client side — is it possible?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 15/09/2014 11:26, Robert Schetterer wrote: > i am not sure what exact you searching for if youre on linux try > look here > > http://www.athensfbc.com/imap_tools/details.html It looks like good toolset, but not solution, > http://imapsync.lamiral.info/ > > thunderbird also has plugins like > > https://addons.mozilla.org/de/thunderbird/addon/awesome-auto-archive/ > I'm searching for solution like this, but running on server (from cron, by example) but I want configure it from client, like I configure sieve from Thunderbird. Best solution will be to translate Thunderbird native settings to some server solution, as typing long folder (mailbox) names by hands (and I have hierarchy with depth of 5!) is error-prone, so it is better to have GUI for configuration which shows real folders (mailboxes). It is place where I prefer clicking to typing. > however i would prefer doveadm expunge via ssh or cron etc It is solution too, but see part about configuration. - -- Black Lion AKA Lev Serebryakov -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQJ8BAEBCgBmBQJUFrZhXxSAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGOTZEMUNBMEI1RjQzMThCNjc0QjMzMEFF QUIwM0M1OEJGREM0NzhGAAoJEOqwPFi/3EePIPcQANySDvl2Z/lEr0wnqllSyR22 BbLly7G3fs6anT9eNxsJ9UJokYu+yD2sEOVekX24/AnM5wfpSH5VqB6AJbFOBmgr ZUVhIL7Z2txGJ/0jfuGm97nkMl3O6yYGYuJyET+ZtPk1jEh70Idv1XPpPvG+h4r+ Bex0WLMRhE89PuCIAalRzfvOhTsEQ+TKu2Z0VhEccT56FQcPnIeaWo/Gg9eozOwq SrVSd/NJp5npKJYcL19BxQ4XGPQiJdUBIU9+2N20FWKlHS+p3GGGhILxlWasSu4k dJLR5UZXhD7tMYTIwY36batcow/Iv+/NLbSIusnsC98LuYrPBXQys5/9OeiVcYCs N4iCxWsGBQz7vtMlgVQ0+pBpXeLv/ox3vqtR86cXRqXzmRISIuGuMJvlQD1oIK33 gOL9R7+3PyqHa0khv0BiYuxdtkdGvcPQMOvtfWK21hULRspmk0faIFj/oVigzuif k7l8gMYi9GUhnNnn7ikZMEifiY4V9FW2RnWTjJ4x1YuWJ4Caa0METJfUqkUJwlR1 XIv0ni3kr7GJyWwsJ+0NzGhVuapf6iyGAzsdvukVVwW3ExWz0IFn3kd6l4DVkhIh IU9z/FyZ/ec9NzCAZaLpmErIWKgU6JxpC/vuAeDxSqNnkRB2rX5sURA5OKsa8aRH QVPpHiX5QR+vCBkhzOhA =9/4X -END PGP SIGNATURE-
Re: sieve: is it possible to filter ALL mailing lists (with header List-Id) to their folders with ONE rule?
On Fri, Sep 12, 2014 at 10:25:19PM +0400, Lev Serebryakov wrote: > Hello, Dovecot. > > > Is it possible to write one rule in sieve, which will: > > (1) Trigger on any message with "List-Id" header > > AND > > (2) Put this message to folder with name build from content of "List-Id" > header, in such way, that message with List-Id > > List-Id: This is decription of list > > will be put into folder "org.host.list-name" where "." is namespace > separator (so, such folders will be shown as hierarchy in mail client)? > > I don't want to write ~50 rules by hands and add new ones from time to > time. > > I'm speaking about dovecot/pigeonhole sieve implementation, of course. All > examples on net shows only manual one-rule-per-list approach :( Not one rule, but I use the following script to filter mailing lists into folders. It handles most mailing list types and, for consistency, the folder name is case-folded to title case. ## require [ "regex", "variables", "fileinto", "envelope", "mailbox", "imap4flags" ]; # Mailinglist Killfile if anyof (header :contains "from" "unwan...@example.com", header :contains "from" "spam...@example.net", header :contains "from" "tr...@example.org"){ discard; stop; } if anyof (header :contains "x-spam-flag" "yes", allof (header :regex "X-DSPAM-Result" "^(Spam|Virus|Bl[ao]cklisted)$", not header :contains "X-DSPAM-Reclassified" "Innocent")){ # Spam goes into the spam folder setflag "\\Seen"; fileinto :create "spam"; stop; } # split out the various list forms # Mailman & other lists using list-id if exists "list-id" { if header :regex "list-id" "<([a-z_0-9-]+)[.@]" { set :lower "listname" "${1}"; fileinto :create "${listname}"; } else { if header :regex "list-id" "^\\s* signature.asc Description: Digital signature
Re: Per-folder (per-mailbox) message expiration with control from client side — is it possible?
Am 14.09.2014 um 22:41 schrieb Lev Serebryakov: > > I'm migrating from «old skool» solution with one mail client (MUA) on > one computer, which retrieves mail via POP3, sorts it and manages it > locally to installation when there are several MUAs on different > devices, accessing mail via IMAP4, and all sorting and management > should be server-side. > > Sorting is “easy”: sieve. Here are some nuisance (like, if I want to > rename folder/mailbox I need to edit script manually. BTW, it looks > like that such thing could be done automagically, as language is very > simple and find all references to mailboxes is not too hard task), but > it works. > > But is here good solution for expiration? I have abut 50 folders > (mailboxes) and rules are very different for them. They are mostly > time-based (like "last 30 days"), but some folders are count-limited > ("last 2000 messages") and some folders should have time limit but > non-read messages could not be deleted at all. > > Ok, Thunderbird almost could do it (it doesn't have “don't remove > unread messages” option), but I don't want to have any meaningful > configuration in MUAs, as each of it could be non-active for long time. > > Only thing I could find about expiration in dovecot documentation is > "doveadm expunge" and helper "Expire" plugin, but it looks like very > low-level solution for admins, it could not be managed from client > side without direct ssh access to server and it is, in general, very > inconvenient. > > Is here any better solution, maybe, 3rd party one? i am not sure what exact you searching for if youre on linux try look here http://www.athensfbc.com/imap_tools/details.html http://imapsync.lamiral.info/ thunderbird also has plugins like https://addons.mozilla.org/de/thunderbird/addon/awesome-auto-archive/ however i would prefer doveadm expunge via ssh or cron etc you might also try external sieve plugin to execute doveadm expunge etc via some parameter perhaps as global rule > > Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein