Re: Upgrade Dovecot from 2.1.17 to 2.2.13 lmtp child killed with signal 6

2016-03-24 Thread Ivan Jurišić
Hi Teemu,

I upgrade Dovecot on 2.2.22-1~auto+6 from repository
http://xi.dovecot.fi/debian/ and now all works well.

Thanks loot,
Ivan

On 03/22/2016 11:45 AM, Teemu Huovila wrote:
>
> On 22.03.2016 11:43, Ivan Jurišić wrote:
>> After upgrade Debian (Wheezy to Jessie) Dovecot version 2.1.17 is
>> upgraded to 2.2.13.
>> I have random crash of lmtp-a and I got lot message in queue. Any
>> solution for this problem?
> This looks like it is fixed by 
> https://github.com/dovecot/core/commit/98449946caeaf8a3b413a0d93128315b158cbffb
> Please upgrade, if possible.
>
> br,
> Teemu Huovila
>
>> -- Postqueue --
>>
>> 7A5B77F72B  1160457 Tue Mar 22 10:10:15  i...@jurisic.org
>> (delivery temporarily suspended: lost connection with
>> mail.jurisic.org[private/dovecot-lmtp] while sending end of data --
>> message may be sent more than once)
>>  ante.starce...@gmail.com
>>
>> -- Log file --
>>
>> Mar 22 10:10:15 lmtp(23497, i...@jurisic.org): Panic: file fs-api.c:
>> line 615 (fs_copy): assertion failed: (src->fs == dest->fs)
>>
>> Mar 22 10:10:15 lmtp(23497, i...@jurisic.org): Error: Raw backtrace:
>> /usr/lib/dovecot/libdovecot.so.0(+0x6b6fe) [0x7f7647a8b6fe] ->
>> /usr/lib/dovecot/libdovecot.so.0(+0x6b7ec) [0x7f7647a8b7ec] ->
>> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f7647a428fb] ->
>> /usr/lib/dovecot/libdovecot.so.0(fs_copy+0x90) [0x7f7647a4c4a0] ->
>> /usr/lib/dovecot/libdovecot-storage.so.0(sdbox_copy+0x4e0)
>> [0x7f7647d3ec10] ->
>> /usr/lib/dovecot/modules/lib10_quota_plugin.so(+0xbaab) [0x7f764726aaab]
>> -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_copy+0x7d)
>> [0x7f7647d7b01d] ->
>> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver_save+0x196)
>> [0x7f76480229d6] ->
>> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver+0xf3) [0x7f7648022e13]
>> -> dovecot/lmtp(+0x6171) [0x7f7648452171] ->
>> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x3f) [0x7f7647a9cd0f]
>> -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0xf9)
>> [0x7f7647a9dd09] ->
>> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x9)
>> [0x7f7647a9cd79] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38)
>> [0x7f7647a9cdf8] ->
>> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13)
>> [0x7f7647a47dc3] -> dovecot/lmtp(main+0x165) [0x7f76484509b5] ->
>> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f7647696b45]
>> -> dovecot/lmtp(+0x4a95) [0x7f7648450a95]
>>
>> Mar 22 10:10:15 lmtp(23497, i...@jurisic.org): Fatal: master:
>> service(lmtp): child 23497 killed with signal 6 (core dumps disabled)
>>
>> -- Dovecot configuration  --
>>
>> # 2.2.13: /etc/dovecot/dovecot.conf
>> # OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.3 ext4
>> auth_mechanisms = plain login
>> debug_log_path = /var/log/dovecot.debug
>> default_client_limit = 1
>> default_process_limit = 1000
>> default_vsz_limit = 512 M
>> dict {
>>   quota = pgsql:/etc/dovecot/dovecot-dict-sql.conf.ext
>> }
>> hostname = mail.jurisic.org
>> info_log_path = /var/log/dovecot.info
>> lda_mailbox_autocreate = yes
>> lda_mailbox_autosubscribe = yes
>> listen = *
>> log_path = /var/log/dovecot.log
>> mail_attachment_dir = /var/mail/vhosts/%d/attachment
>> mail_home = /var/mail/vhosts/%d/mail/%n
>> mail_location = sdbox:/var/mail/vhosts/%d/mail/%n
>> mail_plugins = " quota"
>> mail_privileged_group = vmail
>> 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
>> namespace inbox {
>>   inbox = yes
>>   location =
>>   mailbox Drafts {
>> auto = subscribe
>> special_use = \Drafts
>>   }
>>   mailbox Junk {
>> auto = subscribe
>> special_use = \Junk
>>   }
>>   mailbox Sent {
>> auto = subscribe
>> special_use = \Sent
>>   }
>>   mailbox "Sent Messages" {
>> special_use = \Sent
>>   }
>>   mailbox Trash {
>> auto = subscribe
>> special_use = \Trash
>>   }
>>   prefix =
>> }
>> passdb {
>>   args = /etc/dovecot/dovecot-sql.conf.ext
>>   driver = sql
>> }
>> plugin {
>>   autocreate = Sent
>>   autocreate2 = Drafts
>>   autocreate3 = Junk
>>   autocreate4 = Trash
>>   autosubscribe = Sent
>>   autosubscribe2 = Drafts
>>   autosubscribe3 = Junk
>>   autosubscribe4 = Trash
>>   expire = Trash
>>   expire2 = Trash/*
>>   expire3 = Spam
>>   expire_dict = proxy::expire
>>   quota = dict:user::proxy::quota
>>   quota_rule = *:storage=102400
>>   quota_warning = storage=75%% quota-warning 75 %u
>>   quota_warning2 = storage=90%% quota-warning 90 %u
>>   sieve = ~/.dovecot.sieve
>>   sieve_dir = ~/sieve
>> }
>> postmaster_address = postmaster@%d
>> protocols = " imap lmtp sieve pop3"
>> service auth-worker {
>>   user = vmail
>> }
>> service auth {
>>   unix_listener /var/spool/postfix/private/auth {
>> group = postfix

sieve: filtering based on default destination/folder

2016-03-24 Thread Andrzej A. Filip
Is it possible to make sieve filter based on default destination/folder?

How to trigger special processing/filtering rules when deliver has been 
executed as
'deliver -m archive ...' ?

-- 
A. Filip


Re: Setting up replication?

2016-03-24 Thread Knute Johnson

On 3/23/2016 14:26, Knute Johnson wrote:
I'm trying to set up replication between two servers and I've hit a 
snag.  I have two users and am using mbox files.  If anybody has a 
sample config file for a simple system like mine I would really be 
grateful to see it.


Thanks,

The error I'm getting is:

Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: 
user nobody: Initialization failed: Namespace '': 
mkdir(/nonexistent/mail) failed: Permission denied (euid=65534(nobody) 
egid=65534(nogroup))
Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: 
dsync-server: User init failed
Mar 23 14:07:31 knute2 dovecot: doveadm(nobody): Error: sync: Failed 
to start dsync-server command: 75


knute@knute2:/etc/dovecot/conf.d $ sudo doveadm user '*'
nobody
knute
penny

I don't know why the user 'nobody' shows up here?  nobody is in the 
/etc/passwd file but he has no group.


knute@knute2:/ $ cat /etc/passwd | grep nobody
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin

---

I created a separate config file as suggested in Peer Heinlein's book.

knute@knute2:/etc/dovecot/conf.d $ cat 12-replication.conf
mail_plugins = $mail_plugins notify replication

service replicator {
process_min_avail = 1
unix_listener replicator-doveadm {
mode = 0600
}
}

service aggregator {
fifo_listener replication-notify-fifo {
mode = 0666
}
unix_listener replication-notify {
mode = 0666
}
}

service doveadm {
inet_listener {
port = 30303
}
}

#doveadm_port = 30303

doveadm_password = secret

plugin {
mail_replica = tcp:knute2.frazmtn.com:30303
}

replication_dsync_parameters = -d -N -l 30 -U

-


I've got it working more or less.  I had to change the mode of 
replicator-doveadm to 0666.  I'm still getting errors for 'nobody' but 
that doesn't seem to cause it to not work, just annoying.


Can anybody explain the significance of the mode?

I'm syncing between a 2.2.9 and 2.2.13 system.  Any thing I should look for?

Thanks,

--

Knute Johnson


Re: Replication issues master <-> master nfs backend

2016-03-24 Thread William L. Thomson Jr.
On Tuesday, March 22, 2016 03:30:38 PM William L. Thomson Jr. wrote:
>
> Then I manually log into mail2 and run this command, though usually I can
> run it from either side, and just change the name to the other server.
> 
> doveadm sync -u "*" remote:mail1
>
> Tempted to have cron invoke that on the regular, but seems very hackish and
> likely will have its own issues doing that. 

Broke down and went with the hackish approach of having cron run doveadm sync 
every 15 
minutes during business hours. Not ideal, but seems to correct the syncing 
delays. 
Hopefully no side effects.

*/15 8-18 * * * root/usr/bin/doveadm sync -u "*" remote:mail2

It corrects or bandaids the problem where mail remains on one server only for 
extended 
periods, several hours. While users check email on another, and never see the 
emails on the 
other server. While sync status shows fast and full sync having completed, no 
errors in logs 
etc.

-- 
William L. Thomson Jr.
Obsidian-Studios, Inc.
http://www.obsidian-studios.com


Re: sieve: filtering based on default destination/folder

2016-03-24 Thread Stephan Bosch
Op 3/24/2016 om 4:45 PM schreef Andrzej A. Filip:
> Is it possible to make sieve filter based on default destination/folder?
>
> How to trigger special processing/filtering rules when deliver has been 
> executed as
> 'deliver -m archive ...' ?
>
Not in any standard way.

Dovecot has a vendor-specific extension for this:

https://raw.githubusercontent.com/dovecot/pigeonhole/master/doc/rfc/spec-bosch-sieve-dovecot-environment.txt

But only for fairly recent versions.

You need to enable this extension using the sieve_extensions setting (or
sieve_global_extensions).

Regards,

Stephan.


Fw: new important message

2016-03-24 Thread dovecot
Hello!

 

New message, please read 

 

dovecot


Re: sieve: filtering based on default destination/folder

2016-03-24 Thread Andrzej A. Filip
Stephan Bosch  wrote:
> Op 3/24/2016 om 4:45 PM schreef Andrzej A. Filip:
>> Is it possible to make sieve filter based on default destination/folder?
>>
>> How to trigger special processing/filtering rules when deliver has been 
>> executed as
>> 'deliver -m archive ...' ?
>>
> Not in any standard way.
>
> Dovecot has a vendor-specific extension for this:
>
> https://raw.githubusercontent.com/dovecot/pigeonhole/master/doc/rfc/spec-bosch-sieve-dovecot-environment.txt
>
> But only for fairly recent versions.
>
> You need to enable this extension using the sieve_extensions setting (or
> sieve_global_extensions).
>
> Regards,
>
> Stephan.

It seems to be what I have wanted.  Precompiled dovecot package I use
does not support it (yet).

Thank you for the hint what I should wait for :-)

-- 
A. Filip


Trouble handling encrypted passwords

2016-03-24 Thread Dan Wilson

I am running into trouble when I try to use encrypted passwords.

I set my dovecot 2.2.10-5 installation back to plain text passwords and 
was then able to login and retrieve emails. When I set the 
default_pass_scheme to MD5-CRYPT in my sql config file, and store an 
MD5-CRYPT password in the sql database, I invariably get password 
mismatch errors on login:


Mar 24 19:40:30 server1 dovecot: auth: Debug: client in: 
AUTH#0113#011PLAIN#011service=imap#011secured#011session=25HcztQuwQBHCDBi#011lip=xx.x.xx.xxx#011rip=71.8.48.98#011lport=993#011rport=60609#011resp=
Mar 24 19:40:34 server1 dovecot: auth-worker(9443): Debug: 
sql(te...@xx.com,xx.x.xx.xx): query: SELECT email as user, password 
FROM virtual_users WHERE email='te...@xx.com';
Mar 24 19:40:34 server1 dovecot: auth-worker(9443): 
sql(test1@xx,xx.x.xx.xx): Password mismatch
Mar 24 19:40:36 server1 dovecot: auth: Debug: client passdb out: 
FAIL#0113#011user=te...@xx.com


The password in the database was created using doveadm pw command and is 
stored as:


{MD5-CRYPT}$1$5QAeG70c$dP8y7XJVd.VxZBF/DvcAa0

I tried removing the {MD5-CRYPT} from the password string, but that 
didn't help.


I have to be doing something stupid because this should just work! Any 
ideas from anyone?


Thanks much,

Dan


IMAP Idle

2016-03-24 Thread Joy
Hi guys,
 We have implement imap idle in web mail built by us to have
push mail feature. IMAP idle working perfectly with browser notification
and we are happy with it but having one issue with users who close the
browser directly and never logout in that case there are number of idle
connection which are not in use and users are unable to login once IP wise
connection limit is reached.

Dovecot is not closing connection which are not in use, is there any
setting available which can help me to resolve this issue.