Re: Question about verbose_proctitle

2018-07-12 Thread Gedalya
On 07/13/2018 08:45 AM, J Doe wrote:
> I’m aware that this is because the code does not state to specify “TLS” for 
> the dovecot/imap [u...@example.com 1.2.3.4 IDLE] line of output, but I’m 
> curious as to why that decision was made ?

TLS is done by the imap-login process. This process does all the actual talking 
to the client. The imap process blindly trusts whoever invoked it (imap-login), 
it doesn't authenticate the user either. Timo didn't want any crypto or 
authentication code, or to link against any such libraries in the imap process 
itself.

Your imap-login process does show TLS and this can be logged in the log file as 
well, see login_log_format_elements and the variables %c and %k



Re: Question about verbose_proctitle

2018-07-12 Thread J Doe


> On Jul 10, 2018, at 7:19 PM, J Doe  wrote:
> 
> Hello,
> 
> I have a question relating to the detail that the verbose_proctitle parameter 
> enables for ps.
> 
> I have TLS configured for IMAP as follows:
> 
>/etc/dovecot/dovecot.conf
>ssl = required
>ssl_cert = 
>ssl_key = 
> 
>protocols = imap lmtp
> 
>service imap-login {
># Disable insecure IMAP over TCP 143
>inet_listener imap {
>port=0
>}
>}
> 
>. . . 
> 
>verbose_proctitle = yes
> 
> If I have a single MUA connect (Apple Mail in this case), I see:
> 
>$ ps aux | grep -i dovevot
> 
>dovenull  5552  0.0  0.1  18820  5444 ?S18:53   0:00 
> dovecot/imap-login [1 connections (1 TLS)]
>vmail   5553  0.3  0.1  13612  4304 ?S18:53   0:00 
> dovecot/imap [u...@example.com 1.2.3.4 IDLE]
> 
> The first part makes sense to me - imap-login is showing the user being 
> connected via imap-login and with TLS.
> The second part, however, shows the IMAP session with the username, IP 
> address and IMAP command (IDLE),
> but it does not state TLS.
> 
> Does this mean that I have logins for IMAP connections protected by TLS but 
> the actual IMAP traffic (mail
> contents, etc.), is *NOT* configured to use TLS ?  That is to say, IMAP 
> traffic is flowing over port 993 without
> TLS ?
> 
> From the wiki [1] it appears to state that I only have to configure TLS 
> settings for IMAP if the IMAP protocol is
> being secured via a *DIFFERENT* TLS certificate.
> 
> Is this correct ?
> 
> Thanks, 
> 
> - J
> 
> Sources:
> 
>[1] https://wiki2.dovecot.org/SSL/DovecotConfiguration

Hi,

I was able to partially answer my question, today.

I used tcpdump to record the traffic between a single client computer and the 
server running Dovecot and can confirm that all of the IMAP traffic to and from 
the server was over TLS 1.2 with the configuration I mentioned (see previous 
e-mail above).  This still makes me wonder, though, why Dovecot does not 
specify “TLS” when I use ps:

/etc/dovecot/dovecot.conf
. . .
verbose_proctitle = yes
. . .

$ ps aux | grep -I dovevot

dovenull  5552  0.0  0.1  18820  5444 ?S18:53   0:00 
dovecot/imap-login [1 connections (1 TLS)]
vmail   5553  0.3  0.1  13612  4304 ?S18:53   0:00 
dovecot/imap [u...@example.com 1.2.3.4 IDLE]

I’m aware that this is because the code does not state to specify “TLS” for the 
dovecot/imap [u...@example.com 1.2.3.4 IDLE] line of output, but I’m curious as 
to why that decision was made ?

Thanks,

- J

Re: Pigeonhole extdata repo?

2018-07-12 Thread Stephan Bosch

Hi,

Migrated the repository to Git and upgraded the code for v0.5 and 
Pigeonhole master:


https://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Extdata

Haven't tested it much though...

Regards,

Stephan.


Op 27/06/2018 om 07:21 schreef ta...@vfemail.net:
Hello (Stephan?), is this planned? Have to abandon dovecot 2.3.2 if 
extdata not available.




thanks you AKi for alway responding!


Pigeonhole download page has links for extdata plugin up to v0.4 but
nothing more and no link to the master repository

https://pigeonhole.dovecot.org/download.html

I want to use with dovecot 2.3.2rc1 but v0.4 won't compile with it.


Seems to need v0.5 for it. What are you using it for?


For a custom sieve script that needs database reference. No one has 
updated it for 0.5? Is Stephan Bosch the only person who can help? 
Looks like incompatibilities with changes in dovecot dict things:


ext-extdata-common.c: In function 'ext_extdata_interpreter_get_context':
ext-extdata-common.c:113:3: warning: passing argument 3 of 
'dict_init' from incompatible pointer type [enabled by default]

   svinst->base_dir, , );
   ^
In file included from ext-extdata-common.c:6:0:
/usr/local/include/dovecot/dict.h:86:5: note: expected 'struct dict 
**' but argument is of type 'const char *'

 int dict_init(const char *uri, const struct dict_settings *set,
 ^
ext-extdata-common.c:113:3: warning: passing argument 4 of 
'dict_init' from incompatible pointer type [enabled by default]

   svinst->base_dir, , );
   ^
In file included from ext-extdata-common.c:6:0:
/usr/local/include/dovecot/dict.h:86:5: note: expected 'const char 
**' but argument is of type 'const char *'

 int dict_init(const char *uri, const struct dict_settings *set,
 ^
ext-extdata-common.c:113:3: error: too many arguments to function 
'dict_init'

   svinst->base_dir, , );
   ^
In file included from ext-extdata-common.c:6:0:
/usr/local/include/dovecot/dict.h:86:5: note: declared here
 int dict_init(const char *uri, const struct dict_settings *set,
 ^
ext-extdata-common.c: In function 'ext_extdata_get_value':
ext-extdata-common.c:162:3: error: too few arguments to function 
'dict_lookup'

   pool_datastack_create(), key, )) <= 0 ) {
   ^
In file included from ext-extdata-common.c:6:0:
/usr/local/include/dovecot/dict.h:99:5: note: declared here
 int dict_lookup(struct dict *dict, pool_t pool,
 ^




-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out 
of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No 
bandwidth quotas!
Commercial and Bulk Mail Options! 




Re: sievescript is not working

2018-07-12 Thread Stephan Bosch




Op 22/06/2018 om 12:57 schreef ratatouille:

Benny Pedersen  schrieb am 22.06.18 um 03:32:26 Uhr:


ratatouille skrev den 2018-06-21 20:25:


# sieve-test ./managesieve.sieve ./testfile -D
sieve-test(andreas): Debug: sieve: Pigeonhole version 0.4.2
initializing
sieve-test(andreas): Debug: sieve: include: sieve_global_dir is not
set; it is currently not possible to include `:global' scripts.
debug: script binary ./managesieve.svbin is not up-to-date.
debug: script `managesieve' from ./managesieve.sieve successfully
compiled.

what happends if runned again now ?

it seem it was not compiled before

remember only content in svbin is used

Since I defined mailbox_command = /usr/lib/dovecot/dovecot-lda -f "$SENDER" -a 
"$RECIPIENT"
in main.cf of postfix I have some more problems.

Jun 22 12:36:45 bitmachine1 postfix/smtpd[31220]: connect from 
smtp.amimanera.de[2a02:248:2:3377:5054:ff:fe80:307]
Jun 22 12:36:45 bitmachine1 postfix/smtpd[31220]: Trusted TLS connection 
established from smtp.amimanera.de[2a02:248:2:3377:5054:ff:fe80:307]: TLSv1.2 
with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Jun 22 12:36:47 bitmachine1 postgrey[2377]: action=pass, reason=triplet found, 
client_name=smtp.amimanera.de, client_address=2a02:248:2:3377:5054:ff:fe80:307, 
sender=andr...@amimanera.de, recipient=a.me...@bitcorner.de
Jun 22 12:36:47 bitmachine1 postfix/smtpd[31220]: NOQUEUE: 
client=smtp.amimanera.de[2a02:248:2:3377:5054:ff:fe80:307]
Jun 22 12:36:51 bitmachine1 postfix/smtpd[31224]: connect from 
localhost[127.0.0.1]
Jun 22 12:36:51 bitmachine1 postfix/smtpd[31224]: 0DAC7219AE: 
client=localhost[127.0.0.1]
Jun 22 12:36:51 bitmachine1 postfix/cleanup[31225]: 0DAC7219AE: 
message-id=<20180622123414.08aac41d@workstation>
Jun 22 12:36:51 bitmachine1 postfix/qmgr[23073]: 0DAC7219AE: 
from=, size=1826, nrcpt=1 (queue active)
Jun 22 12:36:51 bitmachine1 postfix/smtpd[31224]: disconnect from 
localhost[127.0.0.1]
Jun 22 12:36:51 bitmachine1 postfix/smtpd[31220]: proxy-accept: END-OF-MESSAGE: 250 2.0.0 from 
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 0DAC7219AE; 
from= to= proto=ESMTP 
helo=
Jun 22 12:36:51 bitmachine1 postfix/smtpd[31220]: disconnect from 
smtp.amimanera.de[2a02:248:2:3377:5054:ff:fe80:307]
Jun 22 12:36:51 bitmachine1 postfix/local[31226]: 0DAC7219AE: to=, 
relay=local, delay=0.31, delays=0.04/0.03/0/0.23, dsn=2.0.0, status=sent (delivered to command: 
/usr/lib/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT")
Jun 22 12:36:51 bitmachine1 postfix/qmgr[23073]: 0DAC7219AE: removed

But the mail is not stored in the mailbox of the user. This is from 
dovecot-debug.log:

Jun 22 12:36:51 lda(a.meyer): Debug: acl: initializing backend with data: vfile
Jun 22 12:36:51 lda(a.meyer): Debug: acl: acl username = a.meyer
Jun 22 12:36:51 lda(a.meyer): Debug: acl: owner = 0
Jun 22 12:36:51 lda(a.meyer): Debug: acl vfile: Global ACLs disabled
Jun 22 12:36:51 lda(a.meyer): Debug: userdb lookup skipped, username taken from 
USER environment
Jun 22 12:36:51 lda(a.meyer): Debug: Quota root: name=User quota 
backend=maildir args=
Jun 22 12:36:51 lda(a.meyer): Debug: Quota rule: root=User quota mailbox=* 
bytes=1073741824 messages=0
Jun 22 12:36:51 lda(a.meyer): Debug: Quota rule: root=User quota mailbox=Trash 
bytes=+21474836 (2%) messages=0
Jun 22 12:36:51 lda(a.meyer): Debug: Quota grace: root=User quota 
bytes=10737418 (1%)
Jun 22 12:36:51 lda(a.meyer): Debug: none: root=, index=, indexpvt=, control=, 
inbox=, alt=
Jun 22 12:36:51 lda(a.meyer): Debug: Destination address: a.me...@bitcorner.de 
(source: -a parameter)
Jun 22 12:36:51 lda(a.meyer): Debug: sieve: Pigeonhole version 0.4.2 
initializing
Jun 22 12:36:51 lda(a.meyer): Debug: sieve: include: sieve_global_dir is not 
set; it is currently not possible to include `:global' scripts.
Jun 22 12:36:51 lda(a.meyer): Debug: sieve: script file 
/home/a.meyer/.dovecot.sieve not found
Jun 22 12:36:51 lda(a.meyer): Debug: sieve: user's script ~/.dovecot.sieve 
doesn't exist (trying default script location instead)
Jun 22 12:36:51 lda(a.meyer): Debug: sieve: no default script configured for 
user
Jun 22 12:36:51 lda(a.meyer): Debug: sieve: user has no valid location for a 
personal script
Jun 22 12:36:51 lda(a.meyer): Debug: sieve: no scripts to execute: reverting to 
default delivery.

 From dovecot-lda.log:

Jun 22 12:36:51 lda(a.meyer): Info: 
msgid=<20180622123414.08aac41d@workstation>: saved mail to INBOX


This means no Sieve script was found for this user.


But the mail is not there.


That is weird.. are you sure you're looking at the correct user?


I'll disable mailbox_command now until I understand how to enable sieve for 
systemusers.
For virtual users sieve works without problem.


That shouldn't really work differently.


The question is how do I enable sieve for systemusers. I guess it must be with 
the help of lda.


Either LDA or LMTP.

Regards,

Stephan.



Re: Sieve_default

2018-07-12 Thread Stephan Bosch




Op 16/06/2018 om 02:14 schreef @lbutlr:

On Jun 15, 2018, at 14:52, Reio Remma  wrote:

Did you try running /usr/lib/dovecot/sieve/sa-learn-spam.sh outside of the 
sieve script?

Yes. And that works not also works if I take out the global defaults 
declaration I added. What does not work at all is the drfefault.sieve action. 
AFAICT it doesn’t even try to run.



You should enable mail_debug=yes, which should log in detail what Sieve 
is doing.


Regards,

Stephan.



Re: dsync panic

2018-07-12 Thread Sami Ketola


> On 7 Jul 2018, at 4.31, Infoomatic  wrote:
> 
> Hi,
> I just upgraded from dovecot 2.2.19 to 2.3.2. "doveadm backup" worked fine in 
> v 2.2.19, but now panics (user with shared folder):
> /opt/dovecot/bin/doveadm backup -u testuser -1 sdbox:/tmp/testuser

Not sure why it panics, but at least your command line looks incorrect. 

please try: doveadm backup -u testuser sdbox:/tmp/testuser

your options are:

doveadm backup
doveadm sync
doveadm sync -1

https://wiki2.dovecot.org/Tools/Doveadm/Sync 


Sami

Aw: dsync panic

2018-07-12 Thread Infoomatic
Hi,

Any info on this one? btw, did a c error (standl2 is the username, of course)

Regards,
infoomatic


> Gesendet: Samstag, 07. Juli 2018 um 03:31 Uhr
> Von: Infoomatic 
> An: dovecot@dovecot.org
> Betreff: dsync panic
>
> Hi,
> I just upgraded from dovecot 2.2.19 to 2.3.2. "doveadm backup" worked fine in 
> v 2.2.19, but now panics (user with shared folder):
> /opt/dovecot/bin/doveadm backup -u testuser -1 sdbox:/tmp/testuser
> 
> dsync(standl2): Panic: file mailbox-attribute.c: line 360 
> (mailbox_attribute_get_stream): assertion failed: (value_r->value != NULL || 
> value_r->value_stream != NULL)
> dsync(standl2): Error: Raw backtrace: 
> /opt/dovecot/lib/dovecot/libdovecot.so.0(+0xcb6fa) [0x7f43679986fa] -> 
> /opt/dovecot/lib/dovecot/libdovecot.so.0(+0xcb769) [0x7f4367998769] -> 
> /opt/dovecot/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f43679069c1] -> 
> /opt/dovecot/lib/dovecot/libdovecot-storage.so.0(+0x568ff) [0x7f4367c9d8ff] 
> -> /opt/dovecot/bin/doveadm(dsync_mailbox_import_attribute+0x4d) 
> [0x56234f7b68dd] -> /opt/dovecot/bin/doveadm(dsync_brain_sync_mails+0x2fd) 
> [0x56234f7b217d] -> /opt/dovecot/bin/doveadm(dsync_brain_run+0x538) 
> [0x56234f7adb28] -> /opt/dovecot/bin/doveadm(+0x27fec) [0x56234f793fec] -> 
> /opt/dovecot/bin/doveadm(+0x2a0e7) [0x56234f7960e7] -> 
> /opt/dovecot/bin/doveadm(+0x2ad7b) [0x56234f796d7b] -> 
> /opt/dovecot/bin/doveadm(doveadm_mail_try_run+0x1fa) [0x56234f79769a] -> 
> /opt/dovecot/bin/doveadm(main+0x45b) [0x56234f786b2b] -> 
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f4367523830] -> 
> /opt/dovecot/bin/doveadm(_start+0x29) [0x56234f786ca9]
> 
> regards,
> infoomatic
> 


Re: LMTP crashing heavily for my 2.2.36 installation (and now with 2.3.2.1)

2018-07-12 Thread Wolfgang Rosenauer
Hi,

I will try to create a coredump later but now I see version 2.3.2.1 also
crashing in LMTP :-(

2018-07-12T10:09:57.336062+02:00 saruman dovecot:
lmtp(an007498)<11814>: Fatal: master:
service(lmtp): child 11814 killed with signal 6 (core dumps disabled -
https://dovecot.org/bugreport.html#coredumps)
2018-07-12T10:09:57.382925+02:00 saruman dovecot:
lmtp(an007498)<11819>: Panic: file
imap-bodystructure.c: line 116 (part_write_body_multipart): assertion
failed: (part->data != NULL)
2018-07-12T10:09:57.383835+02:00 saruman dovecot:
lmtp(an007498)<11819>: Error: Raw backtrace:
/usr/lib64/dovecot/libdovecot.so.0(+0xc9e06) [0x7ff42cac0e06] ->
/usr/lib64/dovecot/libdovecot.so.0(+0xc9ebe) [0x7ff42cac0ebe] ->
/usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) [0x7ff42ca35813] ->
/usr/lib64/dovecot/libdovecot.so.0(imap_bodystructure_write+0x3b1)
[0x7ff42ca95f81] -> /usr/lib64/dovecot/libdovecot-storage.so.0(+0xbd397)
[0x7ff42ce2b397] -> /usr/lib64/dovecot/libdovecot-storage.so.0(+0xc005c)
[0x7ff42ce2e05c] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(index_mail_get_special+0x20d)
[0x7ff42ce2e4cd] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_get_special+0xd)
[0x7ff42cdb0b6d] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_set_attachment_keywords+0x162)
[0x7ff42cdb0f42] -> /usr/lib64/dovecot/libdovecot-storage.so.0(+0xbdd25)
[0x7ff42ce2bd25] -> /usr/lib64/dovecot/libdovecot-storage.so.0(+0xbe10b)
[0x7ff42ce2c10b] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(index_mail_get_parts+0x60)
[0x7ff42ce2dcd0] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_get_parts+0x28)
[0x7ff42cdb04d8] -> /usr/lib64/dovecot/libdovecot-sieve.so.0(+0x2f11e)
[0x7ff4285e611e] ->
/usr/lib64/dovecot/libdovecot-sieve.so.0(sieve_message_body_get_text+0x38)
[0x7ff4285e76a8] ->
/usr/lib64/dovecot/libdovecot-sieve.so.0(ext_body_get_part_list+0x47)
[0x7ff42861b187] -> /usr/lib64/dovecot/libdovecot-sieve.so.0(+0x648d2)
[0x7ff42861b8d2] ->
/usr/lib64/dovecot/libdovecot-sieve.so.0(sieve_interpreter_continue+0x71)
[0x7ff4285f8611] ->
/usr/lib64/dovecot/libdovecot-sieve.so.0(sieve_interpreter_run+0x2b)
[0x7ff4285f886b] -> /usr/lib64/dovecot/libdovecot-sieve.so.0(+0x53fb2)
[0x7ff42860afb2] ->
/usr/lib64/dovecot/libdovecot-sieve.so.0(sieve_multiscript_run+0x38)
[0x7ff42860bd28] ->
/usr/lib64/dovecot/modules/lib90_sieve_plugin.so(+0x3907) [0x7ff428873907]
-> /usr/lib64/dovecot/libdovecot-lda.so.0(mail_deliver+0xdc)
[0x7ff42d0c41cc] -> dovecot/lmtp(lmtp_local_data+0x6eb) [0x55d90309e95b] ->
dovecot/lmtp(cmd_data_continue+0x23d) [0x55d90309d4ed] ->
/usr/lib64/dovecot/libdovecot.so.0(+0x507f0) [0x7ff42ca477f0] ->
/usr/lib64/dovecot/libdovecot.so.0(io_loop_call_io+0x55) [0x7ff42cad7b35]
-> /usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0xe7)
[0x7ff42cad9307]

I'm still on maildir and my current setting about attachments is:
mail_attachment_detection_options = add-flags-on-save exclude-inlined


Wolfgang