Re: [Dovecot] Benchmarking: Dovecot vs Courier. Courier wins as POP3 server
Am 17.01.2013 08:30, schrieb Frank Elsner: > On Wed, 16 Jan 2013 23:47:33 + Alexandr Sabitov wrote: >> Hi All, >> >> I have compared Dovecot performance to Courier and it appears that as a POP3 >> server Dovecot is slower in 2 times but as an IMAP server it is faster in >> 1.5 times. The same node (16CPUs), testing time is 30 min, please see >> results and dovecot configs attached. >> Benchmark software is MStone used by Sendmail Inc so is is quite reliable. >> >> I do not see anything else to tweak in Dovecot to increase POP3 performance. >> Can we all have some tips to improve it please ? > > The Middle Age has called, it wants POP3 back. > > --Frank Elsner > i have about 1000 pop3 tls logins per minute with dovecot ( one server ) ( real users ! ) so its simply fast enough, in real live , after optimize dovecot setup to your needs, at some point you will use loadbalancers/directors etc to pump up performance thats for all pop3 server you might use 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, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich
Re: [Dovecot] Reviewing end-user ham/spam submissions before feeding them to sa-learn via Dovecot Antispam plug-in
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 16 Jan 2013, Ben Johnson wrote: Currently, I'm using the Dovecot Antispam plug-in with great success. Everything works as expected. However, I would like to change the plug-in's behavior such that it simply sends a copy of a message that is moved from Inbox -> Junk (or Junk -> Inbox) to an administrator, instead of calling sa-learn (I'm using SpamAssassin) automatically. Basically, I would like to be able to review messages that end-users submit for training before they are actually fed to sa-learn. Hmm, if you use Maildir: plugin { antispam_backend = spool2dir antispam_allow_append_to_spam = true [snip] antispam_spool2dir_spam = /path/to/admin/Maildir/.TrainingReview.spam/new/%%020lu-%%05lu antispam_spool2dir_notspam = /path/to/admin/Maildir/.TrainingReview.not_spam/new/%%020lu-%%05lu } any of your mail users need write permission those directories, the admin needs read permissions for the spooled files, you need some method to pass the reviewed messages to sa-learn. IMHO, for 3rd step: I would either flag messages to be learned or move them into another folder. And a cron job feeds them to sa-learn, so they do not get into the message queue again and are probably re-filterred or modified before sa-learn picks them up. If you do not have Maildir to drop the files to or get problems, because the messages appear in "new" before they are spooled on disk and hence they may get indexed wrongly, because their content changes (which is forbidden in IMAP), you could spool them into antispam_spool2dir_spam = /tmp/spamspool/spam/%%020lu-%%05lu-%u antispam_spool2dir_notspam = /tmp/spamspool/ham/%%020lu-%%05lu-%u -or- antispam_spool2dir_spam = /tmp/spamspool/%%020lu-%%05lu-%u-S antispam_spool2dir_notspam = /tmp/spamspool/%%020lu-%%05lu-%u-H and have another cron job or inotify-wrapper move the messages to the reviewer's mailbox. In this case, you can make use of the "%u" component, which is expanded by the username, who spooled the message. So you could ignore messages of some users and/or ... . Kind regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUPfFC13r2wJMiz2NAQLSCAf/VEKn0DN9ueXLB9EDE7DOhzfn3ccqO9p+ k4xhuNVA6GaNdcpGpe69EgRfPaRkwbQrskyPABgdgS3nnSQPXA7nlnQm9BIr4cti OPsse+scQBtmRlmiIgXBO4RsDdZGSKg6f3ob+BLUU579MrzBVCiR4fsVtKZBefJv qK1TFYxGLUtimUx8lznrs053vBO/Y1cCpGe5u55UY8OnA8qu0gu9b3l6LWNHkiAu 5aL3thDqlnirrzQVvsCfEgb0N11vy2eT+KYn+WsfG+d/JCt/tDVEoPAs19C5NPgR moMKqmU1EnUNxNuK8GHAEAgcAiixIhXbj95MkhTAYU9ephXMcGRodg== =ynjz -END PGP SIGNATURE-
Re: [Dovecot] dovecot + antispam plugin - no retraining
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 16 Jan 2013, Michael Moerz wrote: plugin { antispam_backend = pipe Er, this module is called "mailtrain", isn't it? At least in antispam changeset 50:0319240072d8. You should get an error "configured non-existent antispam backend: pipe" antispam_mail_notspam = h...@example.org antispam_mail_sendmail = /usr/sbin/sendmail You could replace this program by a shell script to get the info, that it is called, e.g.: /usr/local/bin/mailtrain.sh #!/bin/bash ( date id -a echo "$@" /usr/sbin/sendmail "%@" rc=$? echo rc=$rc exit $rc ) >>/tmp/mailtrain.log 2>&1 = So you see, if the program is fired up and which uid is used and what problem sendmail had. Kind regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUPfPjV3r2wJMiz2NAQL5Swf/X8UYD0PH/WG1qUp9QkzqCCaq0U33aTCU qGy9nYAHjvaXbjv9iDOorTb9kOdX0ApkliHtGnSWTOB9aJSwltDk2Cg+AFLudZaa UoyBE67P3XajPh4hxJ7Q/qaMDmqSnOV7W2bvMuQXe0tWgA19dppQIHCN+P0tUhva p3UiQGShp2yCOW9lPGCrVxALyv/0IeJzNzfRjIf7bfd586HCxuNWirPRP4VQ8Dni oz2KLIwABGlaCl5dk+d6r0OrTnln0YpHWfa2vDpOShqLN4J0AncQoDV4VBqEYUyH HzD1SEhTHU++bVWvni7vrGPVa9LEy/4vdPzeBkHcVlbowOzn5zokoA== =9u45 -END PGP SIGNATURE-
[Dovecot] dovecot nightly 20130117: dsync does returns "Name or service not known"
Hello. I have this settings of imapc: # doveconf -a | grep imapc imapc_features = imapc_host = imapc_list_prefix = imapc_master_user = imapc_max_idle_time = 29 mins imapc_password = imapc_port = 143 imapc_rawlog_dir = imapc_ssl = no imapc_ssl_ca_dir = imapc_ssl_verify = yes imapc_user = %u and try to sync mailbox on old server and new one: $ dsync -o imapc_user="u...@example.org" -o imapc_password="pass" -o imapc_host=imap.example.org -o imapc_features=rfc822.size -o mailbox_list_index=no backup -R -f -u "u...@example.org" imapc: get this error: ssh: Could not resolve hostname remote: Name or service not known dsync-local(ba...@megagroup.ru): Error: read(remote) failed: EOF dsync-local(ba...@megagroup.ru): Error: Remote command returned error 255 In this time new dovecot finds local user: 2013-01-17T17:21:29.837415+04:00 imap1 dovecot: auth: Debug: userdb out: USER#0111#011u...@example.org#011home=/var/vmail/example.org/user/#011quota2_rule=*:storage=40M#011nodelay=Y#011uid=999#011gid=999 I don't understand what's mean under 'hostname remote'. What hostname? Is it bug or incorrect settings?
Re: [Dovecot] how to setup different quota for multiple namespaces
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 16 Jan 2013, Steffen Kaiser wrote: On Fri, 11 Jan 2013, Andreas Oster wrote: Am 10.01.2013 15:30, schrieb Steffen Kaiser: On Wed, 9 Jan 2013, Andreas Oster wrote: namespace { type = private I just saw on important difference in the doc and this configuration: see http://wiki2.dovecot.org/Quota/Configuration#Quota_for_public_namespaces the ns=name syntax is for _public_ namespaces only. I just tested it with this setup and every message is counted for both namespaces, if delivered into INBOX or a mailbox of the Archive namespace. separator = . prefix = Archives. location = maildir:/var/vmail/archive/%Ln/Maildir subscriptions = yes list = children inbox = no } I configured the quota plugin in the following way: plugin { quota = maildir:User quota:ns= quota2 = maildir:Archive quota:ns=Archives. quota_rule = *:storage=1G quota_rule2 = ns=Archives.:ignore } unfortunately this does not give the desired result. Folders under the Archives namespace use the same quota as INBOX. If I understand the Wiki correctly, you need to write: quota2_rule = *:storage=10G The "quota2"_rule# settings apply to the "quota2" root by namespace. Whereas the "quota"_rule# settings apply to the default, the first quota root. unfortunately this does not work. when I configure it the way you have proposed the 10G quote will be assigned to the base namespace (INBOX) the Archives namespace has no quota assigned. I tried this setup: namespace { type = private separator = . prefix = Archive. location = mdbox:/home/%u/archive #subscriptions = no #list = children } plugin { quota = dict:User quota::proxy::quota quota2 = dict:Archive quota:ns=Archive.:proxy::quota quota2_rule = *:storage=1048576 } telnet localhost 143 1 login .. .. 2 list "" * * LIST (\HasNoChildren \Sent) "." "Sent" * LIST (\HasNoChildren \Trash) "." "Trash" * LIST (\HasNoChildren \Junk) "." "Junk" * LIST (\HasNoChildren \Drafts) "." "Drafts" * LIST (\HasNoChildren) "." "INBOX" * LIST (\Noselect \HasChildren) "." "Archive" * LIST (\HasNoChildren) "." "Archive.Test" 2 OK List completed. 2 getquotaroot "" * QUOTAROOT "" "User quota" "Archive quota" * QUOTA "User quota" (STORAGE 259 7540259) * QUOTA "Archive quota" (STORAGE 2109 1048576) 2 OK Getquotaroot completed. So the configuration is running in Dovecot v2.1.13. The value of "User quota" comes from LDAP. What I did not tested was, if the quota is actually calculated and tracked in the database. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUPgICV3r2wJMiz2NAQINFQf8CBRMs9ogiVutYJQr/pdlKUKLItDG62fx hylc3s7mJ9odm0B3EMi5vztNv8wUlwMJf8RZpxLIFbXzoCMq6QzfAaFt0EsHHe/T 2HyM//pfhoFuc2qrBvUEsJlxQEGc7CLqhCGlEIgOXFBrn9zUmuzZUtKLLWsDcNhe Vs0IQRsM1vdBGPEGNO/CKVkmLmbKAs2dQKMuXmsbpT/k4VCvzI7zrOz/D0gsgczz w5fQCgVNGu1rHdWjrSaya6Y3ErE6mVZsUkNmTQ9cP8WHfKuRHkkkUhaeXxLv08S7 pUnFcJUp7I31VPVyyxCNVv99sssKVKdxCxnSe6VGADalwW2f8nHV2Q== =S+t+ -END PGP SIGNATURE-
[Dovecot] namespace o shared folder, deleting index no message
when I set up namespace or shared folder, I need to delete the mail from the mailbox of the user who does not want to see him, but not the rest of the users. Is this possible in dovecot?.
[Dovecot] possible: two private namespaces with different quota?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, in thread "how to setup different quota for multiple namespaces" I tried to get an additional, private namespace "archive" with yet another quota. Every message, regardless if delivered to INBOX or archive, counts for both namespaces, the default one and the archive one. Furthermore the dict records the quota of the archive namespace as user "ns=archive". Because the quota_rules does not accept "*", I see no way to have two or more private quota roots. Could one improve quota_root_rule_find(struct quota_root_settings *root_set, const char *name) { struct quota_rule *rule; array_foreach_modifiable(&root_set->rules, rule) { char *p = strchr(rule->mailbox_name, '\0'); if(p && p > rule->mailbox_name + 1 && p[-1] == '*' ) { /* compare box* */ if(memcmp(rule->mailbox_name, name, p - rule->mailbox_name - 2) == 0) return rule; } else if (strcmp(rule->mailbox_name, name) == 0) return rule; } return NULL; } So one could add a relative rule for the default private namespace. Kind regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUPgKuF3r2wJMiz2NAQJRbAf/Rb993MR/j6NeLqxqqaqkry6BU2Kw2Sti xVwU9P6hAK/tb4o647PO1015Pd5XbbUpY0itqNzHguqof8+PuT4bGeECT33Y9mKA l0+Soq0Pi9war+ZHKYoQZizNDSb+fQkyGPSi3AsuHDapSpxwc6zj9v/HjxpHkr7+ l1ln8NcFG9gKZ/dB+eIM14GNHOsVKVI/lKfR4b50CFabIX871KIyXP8GEGyl9mUC te6ROCzcNTbRpyksQEjCh/UQ8PVWz8GNKAzreLMqGfdxp9SRkhSKiJYSGL9i8Rn6 CTKBmLy0Gq5MoF+7roAMBLzJe1TC0mxCkeT6s0G/iJB5vCVnYyo9BQ== =K3ko -END PGP SIGNATURE-
Re: [Dovecot] how to setup different quota for multiple namespaces
Am 17.01.2013 15:17, schrieb Steffen Kaiser: > On Wed, 16 Jan 2013, Steffen Kaiser wrote: > >> On Fri, 11 Jan 2013, Andreas Oster wrote: > >>> Am 10.01.2013 15:30, schrieb Steffen Kaiser: On Wed, 9 Jan 2013, Andreas Oster wrote: > namespace { > type = private > > I just saw on important difference in the doc and this configuration: > > see > http://wiki2.dovecot.org/Quota/Configuration#Quota_for_public_namespaces > > the ns=name syntax is for _public_ namespaces only. I just tested it > with this setup and every message is counted for both namespaces, if > delivered into INBOX or a mailbox of the Archive namespace. > > separator = . > prefix = Archives. > location = maildir:/var/vmail/archive/%Ln/Maildir > subscriptions = yes > list = children > inbox = no > } > I configured the quota plugin in the following way: > plugin { >quota = maildir:User quota:ns= >quota2 = maildir:Archive quota:ns=Archives. >quota_rule = *:storage=1G >quota_rule2 = ns=Archives.:ignore > } > unfortunately this does not give the desired result. Folders under the > Archives namespace use the same quota as INBOX. If I understand the Wiki correctly, you need to write: quota2_rule = *:storage=10G The "quota2"_rule# settings apply to the "quota2" root by namespace. Whereas the "quota"_rule# settings apply to the default, the first quota root. >>> >>> unfortunately this does not work. when I configure it the way you have >>> proposed the 10G quote will be assigned to the base namespace (INBOX) >>> the Archives namespace has no quota assigned. > >> I tried this setup: > >> namespace { >> type = private >> separator = . >> prefix = Archive. >> location = mdbox:/home/%u/archive >> #subscriptions = no >> #list = children >> } > >> plugin { >> quota = dict:User quota::proxy::quota >> quota2 = dict:Archive quota:ns=Archive.:proxy::quota >> quota2_rule = *:storage=1048576 >> } > >> telnet localhost 143 >> 1 login .. .. >> 2 list "" * >> * LIST (\HasNoChildren \Sent) "." "Sent" >> * LIST (\HasNoChildren \Trash) "." "Trash" >> * LIST (\HasNoChildren \Junk) "." "Junk" >> * LIST (\HasNoChildren \Drafts) "." "Drafts" >> * LIST (\HasNoChildren) "." "INBOX" >> * LIST (\Noselect \HasChildren) "." "Archive" >> * LIST (\HasNoChildren) "." "Archive.Test" >> 2 OK List completed. >> 2 getquotaroot "" >> * QUOTAROOT "" "User quota" "Archive quota" >> * QUOTA "User quota" (STORAGE 259 7540259) >> * QUOTA "Archive quota" (STORAGE 2109 1048576) >> 2 OK Getquotaroot completed. > >> So the configuration is running in Dovecot v2.1.13. The value of "User >> quota" comes from LDAP. What I did not tested was, if the quota is >> actually calculated and tracked in the database. > > -- Steffen Kaiser > Hello Steffen, thanks again for testing. I also did some tests but had no luck so far. I guess it is not possible to have different quotas for multiple private namespaces. best regards Andreas
Re: [Dovecot] dovecot + antispam plugin - no retraining
On Thursday, January 17, 2013 11:16:45 AM Steffen Kaiser wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Wed, 16 Jan 2013, Michael Moerz wrote: > > plugin { > > > > antispam_backend = pipe > > Er, this module is called "mailtrain", isn't it? At least in antispam > changeset 50:0319240072d8. You should get an error "configured > non-existent antispam backend: pipe" tmp = getenv("BACKEND", getenv_data); if (tmp) { if (strcmp(tmp, "crm114") == 0) cfg->backend = &crm114_backend; else if (strcmp(tmp, "dspam") == 0) cfg->backend = &dspam_backend; else if (strcmp(tmp, "pipe") == 0) cfg->backend = &pipe_backend; else if (strcmp(tmp, "spool2dir") == 0) cfg->backend = &spool2dir_backend; else { debug(&cfg->dbgcfg, "selected invalid backend!\n"); exit(3); } probably i fail to see something important here, but to me 'pipe' seems correct. > > antispam_mail_notspam = h...@example.org > > antispam_mail_sendmail = /usr/sbin/sendmail > > You could replace this program by a shell script to get the info, that it > is called, e.g.: > This is really a nifty idea, i'll give it a try and report back on that. kind regards, Michael Moerz
Re: [Dovecot] dovecot nightly 20130117: dsync does returns "Name or service not known"
More debug ouput: $ dsync -D -v -o imapc_user="u...@example.org" -o imapc_password="password" -o imapc_host=imap.example.org -o imapc_features=rfc822.size -o mailbox_list_index=no backup -R -f -u "u...@example.org" imapc: doveadm(vmail): Debug: Loading modules from directory: /usr/lib64/dovecot doveadm(vmail): Debug: Module loaded: /usr/lib64/dovecot/lib10_quota_plugin.so doveadm(vmail): Debug: Loading modules from directory: /usr/lib64/dovecot/doveadm doveadm(vmail): Debug: Skipping module doveadm_acl_plugin, because dlopen() failed: /usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so: undefined symbol: acl_user_module (this is usually intentional, so just ignore this message) doveadm(vmail): Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: /usr/lib64/dovecot/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: expire_set_deinit (this is usually intentional, so just ignore this message) doveadm(vmail): Debug: Module loaded: /usr/lib64/dovecot/doveadm/lib10_doveadm_quota_plugin.so doveadm(vmail): Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: /usr/lib64/dovecot/doveadm/lib20_doveadm_fts_plugin.so: undefined symbol: fts_backend_rescan (this is usually intentional, so just ignore this message) doveadm(u...@example.org): Debug: auth input: u...@example.org home=/var/vmail/example.org/user/ quota2_rule=*:storage=40M nodelay=Y uid=999 gid=999 doveadm(u...@example.org): Debug: Added userdb setting: plugin/nodelay=Y doveadm(u...@example.org): Debug: Added userdb setting: plugin/quota2_rule=*:storage=40M doveadm(u...@example.org): Debug: Effective uid=999, gid=999, home=/var/vmail/example.org/user/ doveadm(u...@example.org): Debug: Quota root: name=Domain quota backend=dict args=example.org:redis:host=127.0.0.1:prefix=domain/ doveadm(u...@example.org): Debug: Quota rule: root=Domain quota mailbox=* bytes=0 messages=0 doveadm(u...@example.org): Debug: Quota rule: root=Domain quota mailbox=Trash bytes=0 (5%) messages=0 doveadm(u...@example.org): Debug: Quota root: name=User quota backend=dict args=:redis:host=127.0.0.1:prefix=user/ doveadm(u...@example.org): Debug: Quota rule: root=User quota mailbox=* bytes=41943040 messages=0 doveadm(u...@example.org): Debug: Quota rule: root=User quota mailbox=Trash bytes=+2097152 (5%) messages=0 doveadm(u...@example.org): Debug: dict quota: user=example.org, uri=redis:host=127.0.0.1:prefix=domain/, noenforcing=0 doveadm(u...@example.org): Debug: dict quota: user=u...@example.org, uri=redis:host=127.0.0.1:prefix=user/, noenforcing=0 doveadm(u...@example.org): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=mdbox:/var/vmail/example.org/user:INDEX=/var/vmail_indexes/example.org/user/ doveadm(u...@example.org): Debug: fs: root=/var/vmail/example.org/user, index=/var/vmail_indexes/example.org/user, indexpvt=, control=, inbox=, alt= doveadm(u...@example.org): Debug: Namespace : Using permissions from /var/vmail/example.org/user: mode=0700 gid=default ssh: Could not resolve hostname remote: Name or service not known dsync-local(u...@example.org): Debug: brain M: in state=send_mailbox_tree dsync-local(u...@example.org): Debug: brain M: out state=send_mailbox_tree_deletes changed=1 dsync-local(u...@example.org): Debug: brain M: in state=send_mailbox_tree_deletes dsync-local(u...@example.org): Debug: brain M: out state=recv_mailbox_tree changed=1 dsync-local(u...@example.org): Debug: brain M: in state=recv_mailbox_tree dsync-local(u...@example.org): Error: read(remote) failed: EOF dsync-local(u...@example.org): Debug: brain M: out state=recv_mailbox_tree changed=0 dsync-local(u...@example.org): Error: Remote command returned error 255 $ ping imap.example.org PING imap.example.org (111.222.333.444) 56(84) bytes of data. 64 bytes from mail.example.org (111.222.333.444): icmp_req=1 ttl=63 time=0.700 ms 64 bytes from mail.example.org (111.222.333.444): icmp_req=2 ttl=63 time=0.500 ms 17.01.2013 17:31, Evgeny Basov пишет: > Hello. > > I have this settings of imapc: > > # doveconf -a | grep imapc > imapc_features = > imapc_host = > imapc_list_prefix = > imapc_master_user = > imapc_max_idle_time = 29 mins > imapc_password = > imapc_port = 143 > imapc_rawlog_dir = > imapc_ssl = no > imapc_ssl_ca_dir = > imapc_ssl_verify = yes > imapc_user = %u