Re: Option to not add "Received" header ?
You could remove them with sieve in the latest version of pigeonhole. On Mar 24, 2015 7:33 AM, Florent B wrote: > > I know about RFC's, but that could be an option, not enabled by default.
IMAP logging / rawlog
I am trying to monitor with Nagios that my phones are consistently checking into dovecot via IMAP. I used to be able to parse syslog for imap-login messages. I have since updated my phones, the phoness email client (k9-mail) and dovecot. Now the imap-login messages are few and far between. However, I can clearly see via tcpdump that some traffic is happening when I click refresh on k9. I enabled "rawlog" support in dovecot, but it doesn't seem to write to disc frequently enough. 1) Does anyone have a better suggestion for how to monitor that my phone is checking in regularly? 2) Is there a flush-to-disk capability for rawlog in dovecot? 3) Also, when you have imap_zlib plugin enabled, the rawlog logs the raw compressed data instead of the decompressed IMAP commands. Is this an oversight? (FYI: k9 is calling SELECT "INBOX" on refresh) Thanks, G H
Re: Shared inbox?
On May 25, 2015 12:59:45 PM EDT, Chris Ross wrote: > >I'm running dovecot 2.2.16 on my FreeBSD mail server. I've read >information on the wiki about setting up shared mailboxes, but I want >to do something that isn't really coved by the instructions I was >reading there. My son (now 7 years old) has an account on the system, >but doesn't use it directly. But, for things he's interested in like >Minecraft, and/or the local zoo, we have given out his email address in >a small number of places. What I would like to set up, both for now >while he's not actually ever reading his email himself, and perhaps >even for the future when we teach and/or allow for that, is for my wife >and I to be able to "view" his inbox from our accounts. > >The instructions for setting up shared folders all are written so that >they're secondary folders to all accounts. Is there a way to either >(a) configure sharing someone elses Inbox by other accounts, or (b) >setting up a separately configured shared folder to _act_ as the inbox >for a single account? > >Thanks. Any suggestions to achieve the above described end goal would >be appreciated. > > - Chris Look in to dovecot's master user feature as well.
[Dovecot] LMTP hostname ignoring ENV variables
I am having an issue with LMTP appending the local hostname to received mail from Postfix. I either want to append localhost, a custom string, or nothing at all. Looking through the source code, I believe I should be able to set "export DOVECOT_HOSTNAME" and "export DOVECOT_HOSTDOMAIN" in my initscript to override the hostname set in lmtp/commands.c, client_get_added_headers() I'm using Centos 5; my hostname is mailtest1.atest.qq -- it is not defined in /etc/hosts. The added header is below: Received: from mail.mailorxyz.de by mailtest1.atest.qq (Dovecot) with LMTP id sreUK1+sfFOseQAAPYI4hw for ; Wed, 21 May 2014 13:39:03 + Received: by mail.mailorxyz.de (Postfix, from userid 97) id CC743116AB5; Wed, 21 May 2014 13:39:03 + (UTC) I have the following defined in /etc/init.d/dovecot: export DOVECOT_HOSTDOMAIN=dovecot.mailorxyz.de export DOVECOT_HOSTNAME=dovecot.mailorxyz.de Am I missing something or did I misunderstand the source code? Thanks.
Login failure with SElinux enforcing + Sqlite user DB
I am having a very strange issue with Dovecot + Sqlite + SELinux in enforcing. I am able to log in via IMAPS if SELinux is in permissive, but not able to do so when in enforcing. I do not see any SELinux denials even with dontaudit's enabled. I am running Centos 5 on x86_64 with a customized kernel build and SElinux Strict policy. The log dumps below are in the following order: 1. My syslog output when SElinux is enforcing 2. My mail client's protocol log (using Sylpheed) 3. My syslog output when SElinux is permissive. From the audit log, syscall 2 (from the message "type=SYSCALL ... syscall=2 success=no" appears to be sys_open for x86_64 architectures. syscall 87 is sys_unlink. Why is my mail client getting a SQL error message even though dovecot's auth log reported login success? Is this a sqlite problem instead of a dovecot one? FYI, I am using dovecot-2.2.10 (from ATrpms.net) and sqlite-3.3.6-7 There appears to be several options related to the temporary store on sqlite's documentation, the solution may be to use memory (instead of files) for temporary tables... dovecot: auth-worker(29695): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so dovecot: auth-worker(29695): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_pgsql.so dovecot: auth-worker(29695): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so dovecot: auth-worker(29695): Debug: sql(mailadmin,10.0.77.80): query: SELECT password FROM users WHERE username = 'mailadmin' dovecot: auth: Debug: client passdb out: OK 1 user=mailadmin dovecot: auth: Debug: master in: REQUEST3487432705 29692 1 17d4d0374be5dec51ce20917470caed8session_pid=29696 request_auth_token dovecot: auth-worker(29695): Debug: sql(mailadmin,10.0.77.80): SELECT username FROM users WHERE username = 'mailadmin' AND view_mail = 't' AND 'imap' = 'imap' dovecot: auth: Debug: master userdb out: USER 3487432705 mailadmin uid=97 gid=12 home=/var/mail/mailadmin auth_token=e0d0ed3080574ab089f1a5302d43110ffa15ec42 dovecot: imap-login: Login: user=, method=PLAIN, rip=10.0.77.80, lip=10.0.78.223, mpid=29696, TLS, session=<0C+M3A/9OwCsEQFQ> audispd: node=myhost.somewhere type=SYSCALL msg=audit(1404144473.421:46298): arch=c03e syscall=2 success=no exit=-13 a0=7fff97f77ce0 a1=c2 a2=1a4 a3=0 items=1 ppid=29697 pid=29699 auid=7033 uid=8 gid=12 euid=8 suid=8 fsuid=8 egid=12 sgid=12 fsgid=12 tty=(none) ses=108 comm="sqlite3" exe="/usr/bin/sqlite3" subj=system_u:system_r:dovecot_t:s0 key="access" audispd: node=myhost.somewhere type=CWD msg=audit(1404144473.421:46298): cwd="/var/run/dovecot" audispd: node=myhost.somewhere type=PATH msg=audit(1404144473.421:46298): item=0 name="./sqlite_ZPh8vGq4ia1CCsJ" inode=8192027 dev=fb:02 mode=040755 ouid=0 ogid=97 rdev=00:00 obj=system_u:object_r:dovecot_var_run_t:s0 audispd: node=myhost.somewhere type=EOE msg=audit(1404144473.421:46298): audispd: node=myhost.somewhere type=SYSCALL msg=audit(1404144473.422:46299): arch=c03e syscall=2 success=no exit=-13 a0=7fff97f77ce0 a1=c2 a2=1a4 a3=0 items=1 ppid=29697 pid=29699 auid=7033 uid=8 gid=12 euid=8 suid=8 fsuid=8 egid=12 sgid=12 fsgid=12 tty=(none) ses=108 comm="sqlite3" exe="/usr/bin/sqlite3" subj=system_u:system_r:dovecot_t:s0 key="access" audispd: node=myhost.somewhere type=CWD msg=audit(1404144473.422:46299): cwd="/var/run/dovecot" audispd: node=myhost.somewhere type=PATH msg=audit(1404144473.422:46299): item=0 name="./sqlite_9i9aIbK0rBuJWFS" inode=8192027 dev=fb:02 mode=040755 ouid=0 ogid=97 rdev=00:00 obj=system_u:object_r:dovecot_var_run_t:s0 ... REPEATED MANY TIMES ... audispd: node=myhost.somewhere type=SYSCALL msg=audit(1404145638.097:46407): arch=c03e syscall=87 success=yes exit=0 a0=608872 a1=60aa50 a2=60e0d0 a3=0 items=2 ppid=29774 pid=29776 auid=7033 uid=8 gid=12 euid=8 suid=8 fsuid=8 egid=12 sgid=12 fsgid=12 tty=(none) ses=108 comm="sqlite3" exe="/usr/bin/sqlite3" subj=system_u:system_r:dovecot_t:s0 key="delete" audispd: node=myhost.somewhere type=CWD msg=audit(1404145638.097:46407): cwd="/var/run/dovecot" dovecot: imap(mailadmin): Debug: Effective uid=97, gid=12, home=/var/mail/mailadmin dovecot: imap(mailadmin): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=mdbox:/var/mail/mailadmin dovecot: imap(mailadmin): Debug: fs: root=/var/mail/mailadmin, index=, indexpvt=, control=, inbox=, alt= audispd: node=myhost.somewhere type=PATH msg=audit(1404145638.097:46407): item=0 name="/var/lib/maildb/" inode=3735776 dev=fb:02 mode=040775 ouid=0 ogid=12 rdev=00:00 obj=system_u:object_r:var_lib_t:s0 audispd: node=myhost.somewhere type=PATH msg=audit(1404145638.097:46407): item=1 name="/var/lib/maildb/users.db-journal" inode=3735779 dev=fb:02 mode=0100600 ouid=8 ogid=12 rdev=00:00 obj=system_u:object_r:var_lib_t:s0 audispd: node=myhost.somewhere type=EOE msg=audit(1404145638.097:46407
doveadm director userdb
How do you configure an iterate_query SQL lookup for the doveadm director? I tried: service director { userdb { ... } } but userdb is not a valid stanza for director. I do not have a default userdb stanza, all my userdb definitions are specified in service imap/lda/lmtp blocks. Thanks. G H
Solr 4+ schema.xml?
Does anyone have a Solr 4+ compatible schema.xml for dovecot indexing? I am trying to test to see if regex-based FTS searching works through IMAP, but Solr 4.9.0 is throwing an error, "SolrException: undefined field text", on startup with the schema.xml included with Dovecot 2.2.9. Thanks. G H
Re: Solr 4+ schema.xml?
The issue was the df parameter in solrconfig.xml was referencing field text. I changed it to reference subject. - Original Message - From: G H To: "dovecot@dovecot.org" Cc: Sent: Thursday, July 31, 2014 10:52 AM Subject: Solr 4+ schema.xml? Does anyone have a Solr 4+ compatible schema.xml for dovecot indexing? I am trying to test to see if regex-based FTS searching works through IMAP, but Solr 4.9.0 is throwing an error, "SolrException: undefined field text", on startup with the schema.xml included with Dovecot 2.2.9. Thanks. G H
solr_add_definite_query quotes queries
So Solr 4.0 and higher supports regular expressions in searching. However, Dovecot is quoting search queries in solr_add_definite_query (via solr_add_str_arg). This breaks regex searching. I do a sample search for emails with "merged" in their body via the query /merg.*/. If you look at the Solr logs, it is sending: q=body:"/merg.*/" which is converted to body:\"/merg.*/\" inside Solr. but if it had sent only: q=body:/merg.*/ then regex would have worked. Is regular expression searching on the dashboard? I'm considering patching fts-backend-solr.c to not quote-enclose the search, but am looking for any better suggestions. Or perhaps not quote-enclose if the search is prefixed with RX: (ie: "RX:/merg.*/")... Thanks, G H
Solr indexing appends domain to users
My users are set up as "admin", "john", etc -- as opposed to j...@example.com. When I run test command "/usr/libexec/dovecot/dovecot-lda -d admin < /tmp/mymail.txt", the mail is successfully imported with Solr, Tika (yay). However, results are never found when I search within IMAP. Why? Dovecot is appending the domain name to the user and admin fields of the Solr record ("ad...@example.com" instead of just "admin") during index. But during searching, Dovecot is only searching for the user directly, from the Solr logs: q=body:"TESTCONTENT"&fq=%2Bbox:7dff0b0d4f84df53f2533d823887+%2Buser:"admin" If I rerun the query via the Solr web gui with user:"ad...@example.com", the message is found. How do I disable appending the domain name to the solr index names? Thanks, G H
BUG: Solr FTS engine appends domain name to index records
The Solr FTS engine appends domain names to the "user" and "id" fields inside Solr when indexing. However, when an IMAP search is performed, the domain name is not appended, resulting in 0 results, 100% of the time. You can reproduce this by setting up dovecot to have user names like "admin", "james", etc (as opposed to ad...@example.com). Then import some mail (ie: "dovecot-lda -d admin < /tmp/mymail.txt"). Now attempt to search for that mail and it will not be returned as a result. You can see in the Solr GUI (http://:8983/solr/) that record is indexed as: { "uid": 1, "box": "7dff0b0d4f84df53f2533d823887", "user": "ad...@example.com", "id": "1/7dff0b0d4f84df53f2533d823887/ad...@example.com", "_version_": 1475511406809841700 } However, the IMAP search is sent to Solr performed with user:"admin" instead of user:"ad...@example.com". Either the Solr FTS plugin needs to not append the domain name or the search does need to do so.
Segfault with indexer-worker using Tika/Solr
Using Dovecot 2.2.13 with Tika 1.5 on Centos 5 64bit Tika is throwing an exception for some reason, which seems to be causing Dovecot's indexer to segfault. I'm using mdbox/gzipped compressed mail and private indexes for the shared folder. I'm importing mail via formail/dovecot-lda: formail -s /usr/libexec/dovecot/dovecot-lda -d admin -m Public/TestSubFolder < /tmp/Inbox.mbox dovecot -n and the GDB backtrace are attached. # find /var/mail/ -maxdepth 2 /var/mail/_public /var/mail/_public/dovecot.mailbox.log /var/mail/_public/dovecot-uidvalidity /var/mail/_public/dovecot-uidvalidity.53ecade1 /var/mail/_public/storage /var/mail/_public/subscriptions /var/mail/_public/mailboxes /var/mail/admin /var/mail/admin/dovecot-uidvalidity.53ecade2 /var/mail/admin/dovecot.mailbox.log /var/mail/admin/public /var/mail/admin/dovecot-uidvalidity /var/mail/admin/storage /var/mail/admin/subscriptions /var/mail/admin/mailboxes Core was generated by `dovecot/indexer-worker'. Program terminated with signal 11, Segmentation fault. #0 i_stream_ref (stream=0x0) at istream.c:42 42 istream.c: No such file or directory. in istream.c (gdb) bt full #0 i_stream_ref (stream=0x0) at istream.c:42 No locals. #1 0x7f13f5497ed0 in fts_tika_parser_response (response=0x7fffd5910230, parser=0x660460) at fts-parser-tika.c:87 __FUNCTION__ = "fts_tika_parser_response" #2 0x7f13f646e07d in http_client_request_callback (req=0x6690d0, response=0xc8) at http-client-request.c:767 callback = 0x7f13f5497e00 orig_attempts = 0 #3 0x7f13f646f5f2 in http_client_connection_return_response (conn=0x66c780, req=0x6690d0, response=0x7fffd5910230) at http-client-connection.c:456 payload = retrying = __FUNCTION__ = "http_client_connection_return_response" #4 0x7f13f6470b12 in http_client_connection_input (_conn=) at http-client-connection.c:640 aborted = false conn = 0x0 response = {version_major = 1 '\001', version_minor = 1 '\001', status = 200, reason = 0x672380 "OK", location = 0x0, date = 1408020040, retry_after = -1, header = 0x671fe0, payload = 0x0, headers = {arr = {buffer = 0x671ff0, element_size = 24}, v = 0x671ff0, v_modifiable = 0x671ff0}, connection_options = {arr = {buffer = 0x672328, element_size = 8}, v = 0x672328, v_modifiable = 0x672328}, connection_close = 0} req = 0x6690d0 finished = 0 ret = error = payload_type = __FUNCTION__ = "http_client_connection_input" #5 0x7f13f64aa0bc in io_loop_call_io (io=0x66bad0) at ioloop.c:441 ioloop = 0x66cd30 t_id = 6 __FUNCTION__ = "io_loop_call_io" #6 0x7f13f64ab7dd in io_loop_handler_run_internal (ioloop=) at ioloop-epoll.c:220 ctx = event = 0x66bd60 list = 0x66bb30 io = 0x0 tv = {tv_sec = 2147483, tv_usec = 0} events_count = msecs = ret = 1 i = 0 call = 200 __FUNCTION__ = "io_loop_handler_run_internal" #7 0x7f13f64aa159 in io_loop_handler_run (ioloop=0x0) at ioloop.c:488 No locals. #8 0x7f13f64aa1d8 in io_loop_run (ioloop=0x66cd30) at ioloop.c:465 __FUNCTION__ = "io_loop_run" #9 0x7f13f646e58d in http_client_request_continue_payload (_req=0x660490, data=0x0, size=0) at http-client-request.c:496 prev_ioloop = 0x60d720 req = 0x6690d0 conn = 0x66c780 client = 0x65ffc0 ret = __FUNCTION__ = "http_client_request_continue_payload" #10 0x7f13f5497acc in fts_parser_tika_more (_parser=0x660460, block=0x660460) at fts-parser-tika.c:161 data = size = ret = __FUNCTION__ = "fts_parser_tika_more" #11 0x7f13f54969d7 in fts_parser_more (parser=0x0, block=0x7fffd5910440) at fts-parser.c:67 No locals. #12 0x7f13f5494d2f in fts_body_parser_finish (ctx=0x7fffd59104b0) at fts-build-mail.c:256 block = {part = 0x0, hdr = 0x0, data = 0x0, size = 0} ret = #13 0x7f13f549530d in fts_build_mail_real (update_ctx=0x649b40, mail=0x63cd40) at fts-build-mail.c:361 __FUNCTION__ = "fts_build_mail_real" #14 fts_build_mail (update_ctx=0x649b40, mail=0x63cd40) at fts-build-mail.c:386 ---Type to continue, or q to quit--- _data_stack_cur_id = 5 ret = #15 0x7f13f549a404 in fts_mail_index (_mail=0x63cd40) at fts-storage.c:451 No locals. #16 fts_mail_precache (_mail=0x63cd40) at fts-storage.c:468 _data_stack_cur_id = 4 fmail = 0x6395b0 #17 0x00402522 in master_connection_input () No symbol table info available. #18 0x7f13f64aa0bc in io_loop_call_io (io=0x612000) at ioloop.c:441 ioloop = 0x60d720 t_id = 2 __FUNCTION__ = "io_loop_call_io" #19 0x7f13f64ab7dd in io_loop_handler_run_internal (ioloop=) at ioloop-epoll.c:220 ctx = event = 0x6113b0 list = 0x612060 io = 0x0 tv =
Re: BUG: Solr FTS engine appends domain name to index records
Some more information: Using the doveadm search command, the domain name is included in the user key in the search sent to Solr. IMAP appears to be the odd man out here. - Original Message - From: G H To: "dovecot@dovecot.org" Cc: Sent: Tuesday, August 12, 2014 9:35 AM Subject: BUG: Solr FTS engine appends domain name to index records The Solr FTS engine appends domain names to the "user" and "id" fields inside Solr when indexing. However, when an IMAP search is performed, the domain name is not appended, resulting in 0 results, 100% of the time. You can reproduce this by setting up dovecot to have user names like "admin", "james", etc (as opposed to ad...@example.com). Then import some mail (ie: "dovecot-lda -d admin < /tmp/mymail.txt"). Now attempt to search for that mail and it will not be returned as a result. You can see in the Solr GUI (http://:8983/solr/) that record is indexed as: { "uid": 1, "box": "7dff0b0d4f84df53f2533d823887", "user": "ad...@example.com", "id": "1/7dff0b0d4f84df53f2533d823887/ad...@example.com", "_version_": 1475511406809841700 } However, the IMAP search is sent to Solr performed with user:"admin" instead of user:"ad...@example.com". Either the Solr FTS plugin needs to not append the domain name or the search does need to do so.
Public root folder is \Noselect
I am utilizing a public namespace via http://wiki2.dovecot.org/SharedMailboxes/Public and using sdbox storage format. How can I get rid of the \Noselect flag that is set by default for this folder? IMAP output: b LIST "" "*" * LIST (\HasNoChildren \Sent) "/" Sent * LIST (\HasNoChildren \Trash) "/" Trash * LIST (\Noselect \HasNoChildren) "/" Public * LIST (\HasNoChildren) "/" INBOX If this is not possible, what is the best way to create a sub-folder in here upon system setup (one w/o a \Noselect flag)? Thanks, G H