Re: [Dovecot] Dovecot 2 + IMAP

2013-06-13 Thread Alex Dubinin
12.06.2013 22:34, Michael Kliewe пишет:
 Hello Alex,
 you asked exactly the same question 5 days ago and already got the
 answer (from 2 people). Why did you ask again, didn't you receive the
 answers?
Thank you for your answer.
Yes, i didn't receive answer 


signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Connection closed by foreign host.

2013-06-13 Thread Michael Cramer

Zitat von Timo Sirainen t...@iki.fi:


On 13.6.2013, at 7.37, Michael Cramer mich...@bigmichi1.de wrote:


3 LIST ()  (*)
Connection closed by foreign host.

the command with number 3 results everytime in a connection closed. i
turned on debug_log but nothing is shown there.


doveconf -n output?


sorry forgot that part to post

root@i920:/srv/www/horde.bigmichi1.de/conf# doveconf -n
# 2.2.2 (45399357008a): /etc/dovecot/dovecot.conf
# OS: Linux 3.8.0-23-generic x86_64 Ubuntu 13.04 ext4

..

mdbox_preallocate_space = yes
   user = postfix
 }


That seems to be missing a (big?) part in here. I was mainly  
wondering what namespace configs you have?


Oh and BTW:

mail_location =  
mdbox:/srv/vmail/mail/%d/%n:INDEXPVT=/srv/vmail/indexes/private/%d/%n:INDEX=/srv/vmail/indexes/shared/%d/%n


You don't need INDEXPVT for your own mails, only for the shared namespaces.


now the full conf

# 2.2.2 (45399357008a): /etc/dovecot/dovecot.conf
# OS: Linux 3.8.0-23-generic x86_64 Ubuntu 13.04 ext4
auth_mechanisms = plain login
debug_log_path = /var/log/dovecot/debug.log
dict {
  acl = pgsql:/etc/dovecot/dovecot-dict-sql.conf.ext
  expire = pgsql:/etc/dovecot/dovecot-dict-sql.conf.ext
  quota = pgsql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_gid = 8
first_valid_uid = 8
info_log_path = /var/log/dovecot/info.log
last_valid_gid = 8
last_valid_uid = 8
log_path = /var/log/dovecot/error.log
mail_debug = yes
mail_gid = 8
mail_location =  
mdbox:/srv/vmail/mail/%d/%n:INDEXPVT=/srv/vmail/indexes/private/%d/%n:INDEX=/srv/vmail/indexes/shared/%d/%n

mail_plugins = quota zlib acl expire virtual
mail_uid = 8
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 imapflags notify

mdbox_preallocate_space = yes
mdbox_rotate_size = 10 M
namespace {
  list = children
  location =  
mdbox:/srv/vmail/mail/%%d/%%n:INDEXPVT=/srv/vmail/indexes/private/%d/%n/shared/%%u:INDEX=/srv/vmail/indexes/shared/%d/%n/shared/%%u

  prefix = Shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  location =
  mailbox Archive {
auto = subscribe
special_use = \Archive
  }
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Spam {
auto = subscribe
special_use = \Junk
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  mailbox virtual/All {
auto = subscribe
special_use = \All
  }
  mailbox virtual/Flagged {
auto = subscribe
special_use = \Flagged
  }
  prefix =
  separator = /
  type = private
}
namespace virtual {
  location =  
virtual:/srv/vmail/virtual:INDEXPVT=/srv/vmail/indexes/private/%d/%n/virtual:INDEX=/srv/vmail/indexes/shared/%d/%n/virtual

  prefix = virtual/
  separator = /
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile:/srv/vmail/acl:cache_secs=300
  acl_anyone = allow
  acl_shared_dict = proxy::acl
  expire = Trash 7 Trash/* 7 Spam 30
  expire_dict = proxy::expire
  quota = dict:User quota::proxy::quota
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  quota_warning3 = -storage=100%% quota-warning below %u
  sieve = /srv/vmail/sieve/%d/%n/.dovecot.sieve
  sieve_default = /srv/vmail/sieve/default.sieve
  sieve_dir = /srv/vmail/sieve/%d/%n/
  sieve_extensions = +notify +imapflags
  sieve_global_dir = /srv/vmail/sieve/global
}
postmaster_address = postmas...@bigmichi1.de
protocols =  imap sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
  unix_listener auth-userdb {
group = mail
mode = 0666
user = mail
  }
}
service dict {
  unix_listener dict {
group = mail
mode = 0660
user = mail
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  unix_listener quota-warning {
user = mail
  }
  user = dovecot
}
ssl_cert = /srv/ssl/ssl-unified.crt
ssl_key = /srv/ssl/ssl-decrypted.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lda {
  debug_log_path = /var/log/dovecot/deliver-debug.log
  info_log_path = /var/log/dovecot/deliver-info.log
  log_path = /var/log/dovecot/deliver-errors.log
  mail_plugins = quota zlib acl expire virtual sieve
}
protocol imap {
  mail_plugins = quota zlib acl expire virtual imap_quota imap_acl imap_zlib
}




Re: [Dovecot] dovecot corrupted transaction log

2013-06-13 Thread John Fawcett
On 13/06/13 04:31, Timo Sirainen wrote:
 On Tue, 2013-06-11 at 00:34 +0200, John Fawcett wrote:
 Hi I came across this error which happend immedately after a mail
 delivery to the inbox. Should I look for the problem externally to
 dovecot (ie. file system, operating system) or within dovecot? I never
 saw this error before installing 2.2.1, with 2.2.2 I seemed to get even
 more of them so currently back on 2.2.1

 Jun 11 00:00:05 rosalia dovecot: imap(myemail@mydomain): Error:
 Corrupted transaction log file
 /var/vmail/mydomain/myemail@mydomain/dovecot.index.log seq 311: file
 size shrank (1184  1304) (sync_offset=1304)
 Are you using NFS or some other cluster filesystem with multiple
 servers? If yes, see http://wiki2.dovecot.org/NFS. If not, show doveconf
 -n and describe the setup more.


TImo

thanks for your response. There is no NFS involved. The file system
seems to  be reiserfs (as reported by df -T) thogh I wonder why
fsck reports it would use fsck.ext2 (which I did not run).

It is a single server vpn container hosting a few sites and
low volume mail service. The operating system is centos 6.4

The setup is with postfix, amavisd and dovecot using sieve. Dovecot and
sieve are built from source

Clients are roundcube and usual mail clients mainly thunderbird.

I cannot link the errors to anything specific, except that they started
happening 5 minutes after upgrade to 2.2.1 from 2.1.5. The error happens on
multiple mailboxes. I never saw the error prior to that, looking at logs
back to
version 2.1.7.

Below is the dovecot -n output

Thanks
John

dovecot -n
# 2.2.1: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.18-028stab092.1 x86_64 CentOS release 6.4 (Final)
auth_mechanisms = plain login
dict {
  expire = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_uid = 200
listen = 80.237.194.64
mail_plugins = quota expire
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
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  expire = Trash
  expire2 = Trash/*
  expire3 = Spam
  expire4 = Postmaster
  expire_dict = proxy::expire
  fts = squat
  fts_squat = partial=4 full=10
  quota = dict:User quota::proxy::quota
  quota_rule = *:storage=1G
  quota_rule2 = Trash:storage=+100M
  sieve = ~/sieve/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener auth-userdb {
group = mail
mode = 0660
  }
}
service dict {
  unix_listener dict {
group = mail
mode = 0660
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
}
ssl_cert = /etc/ssl/extcerts/mail.erba.tv.dovecot-bundle.crt
ssl_key = /etc/ssl/extcerts/mail.erba.tv.dovecot.nopass.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lmtp {
  mail_plugins = quota expire sieve
}
protocol lda {
  mail_plugins = quota expire sieve
}
protocol imap {
  mail_plugins = quota expire imap_quota fts fts_squat
}




Re: [Dovecot] LMTP crash with sdbox and SIS

2013-06-13 Thread Bernhard Schmidt

Am 13.06.2013 03:56, schrieb Timo Sirainen:


On Wed, 2013-06-12 at 19:51 +, Bernhard Schmidt wrote:

Debian Wheezy amd64 plus Stefan's stable-auto/dovecot2.2 repository
2:2.2.2-0~auto+57 = 16495:d447dcc6b611

Crash goes away when I disable mail_attachment_dir, happens with a
fresh home as well

..

Jun 12 21:46:23 lxmhs69 dovecot: lmtp(20120,
ext44...@mstoretest.mail.xxx.de): Panic: file istream.c: line 163
(i_stream_read): assertion failed: (old_size == _stream-pos -
_stream-skip)


Can you easily reproduce this? Does it happen with all mails? Only mails
that contain attachments? Only one specific mail? I couldn't reproduce
with a couple of tests.


I can reproduce with mails with a random attachment  128k. I'm using 
smtp-cli to test


dd if=/dev/random of=random1M bs=1M count=1
./smtp-cli-3.2 --server serverlist  --from sender --to recipient 
--subject Test --attach=random1M


I can send you a sample.

Bernhard


Re: [Dovecot] rawlog without setting home in userdb

2013-06-13 Thread claus . r

Am 2013-06-13 04:41, schrieb Timo Sirainen:

On Sun, 2013-06-02 at 10:11 +0200, Claus wrote:
Hi all,

in my settup i decided to set mail_home in 10-mail.conf,
and let dovecot do the hashing to a 2-level directory structure.

mail_location = mdbox:~/mdbox:ALT=/altstorage/%h/mdbox
mail_home = /vmail/%1Mu/%2.1Mu/%u

In my userdb ist homedirectory not set and everythink works as 
expected,

except when i use rawlog i get only logs in ~/dovecot.rawlog if home is
set in userdb.
In wiki http://wiki2.dovecot.org/Debugging/Rawlog
it reads:

If you don't have the home directory and you can't or don't want to
modify userdb configuration, you can add:
mail_home = /home/%u
# or temporarily even e.g. mail_home = /tmp/temp-home

Looks like the wiki was wrong, mail_home field can't work there. 
Updated

it with a new suggestion about userdb { default_fields }.


Thank's for your reply, i changed my configuration and did'nt set the 
mail_home but the homr in uderdb default_fieled now it works perfect for 
me.


A little extra question: why do you split in and out in rawlog?



Re: [Dovecot] Replication and LAYOUT=fs

2013-06-13 Thread Simon Fraser
On Thu, 2013-06-13 at 04:59 +0300, Timo Sirainen wrote:
 On Wed, 2013-06-12 at 11:39 +0100, Simon Fraser wrote:
  Hello folks,
  
  I have a problem with replication and mail_location with LAYOUT=fs set.
  
  If I set mail_location = maildir:~/mail (leaving out the :LAYOUT=fs),
  create and populate some mailboxes and subfolders, they all get
  replicated. If I start with a clean mail spool and LAYOUT=fs, I can
  create some new mailboxes and subfolders but only the inbox is
  replicated. Subfolders are ignored.
 
 I can't think of how that's possible, unless you have different
 mail_location settings in different places (e.g. doveadm sees something
 different than imap). Does doveadm mailbox list -u user@domain work
 with LAYOUT=fs?

Good question: no, it doesn't. I only have one mail_location setting,
though, which is global rather than in a scoped area.

# doveadm mailbox list -u testu...@sanger.ac.uk
test2
test2/test3
Trash
INBOX
# find /mail/spool/testuser/mail/ -type d
/mail/spool/testuser/mail/
/mail/spool/testuser/mail/test2
/mail/spool/testuser/mail/test2/test3
/mail/spool/testuser/mail/test2/test3/cur
/mail/spool/testuser/mail/test2/test3/tmp
/mail/spool/testuser/mail/test2/test3/new
/mail/spool/testuser/mail/test2/cur
/mail/spool/testuser/mail/test2/tmp
/mail/spool/testuser/mail/test2/new
/mail/spool/testuser/mail/Trash
/mail/spool/testuser/mail/Trash/cur
/mail/spool/testuser/mail/Trash/tmp
/mail/spool/testuser/mail/Trash/new
/mail/spool/testuser/mail/cur
/mail/spool/testuser/mail/tmp
/mail/spool/testuser/mail/INBOX
/mail/spool/testuser/mail/INBOX/test1
/mail/spool/testuser/mail/INBOX/test1/cur
/mail/spool/testuser/mail/INBOX/test1/tmp
/mail/spool/testuser/mail/INBOX/test1/new
/mail/spool/testuser/mail/new

I asked Thunderbird to create 'test1' as a subfolder of 'INBOX'. I've
tested some more with folders on the same level as inbox, and those
work, including their subfolders.

So it must be the non-folder 'INBOX' that isn't replicated: without
LAYOUT=fs it's represented as .INBOX.test1, which has all the relevant
folder entries in it. Presumably it skips a directory and its
subdirectories if it doesn't contain this data? 

I found the following option, which moves INBOX and so makes it all
work:
mail_location = maildir:~/mail:LAYOUT=fs:INBOX=~/mail/INBOX

Is this a relatively sane thing to do?

Thank you for your help,
Simon.



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 


[Dovecot] quota-status not working in distributed environment

2013-06-13 Thread Benoit Panizzon
Hello List

Quick overview of our set-up:

Postfix / Dovecot (2.2.2.1) / MySQL Cluster on (at the moment) three Servers 
to create a HA environment where you could easily add additional servers as 
the demand or load grows.

Circular dovecot replication is used so each server uses another one as 
replication partner and allowing one server to fail.

Dovecot Proxy Feature being used, so we can use round-robin DNS and each 
server can forward the connecting user to the correct 'master' for his 
mailbox.

So far, everything works as expected.

Now we want to reject emails to 'full' mailboxes during SMTP to prevent 
backscatter and use the quota-status policy service from within postfix.

That works fine, if the mailbox or it's replica is present on the machine 
where quota-status is called, but it fails if it's run on a machine where 
neither the mailbox or the replica is present.
In our case, we get a correct SMTP 550 'Mailbox Full' Reject in two cases and 
a LMTP generated bounce in the later case.

Also `doveadm quota get -u u...@example.com`
return the correct quota if run on the two machines which have the mailbox and 
it's copy locale, but return 0% used if run on the other machine.

Is there a way to get quota-status to also use the proxy feature to request 
the quota information from the correct machine?

Or is the postfix policy daemon call to the quota-status socket documented 
somewhere (it must be, but where?) so we could implement it from within the 
Milter? (we use the sendmail Milter API from postfix to filter spam and 
viruses, do sender/recipient rewriting, forward bounce matching, rate 
limmiting, login/IP statistics to block botnets abusing phished addresses and 
legal intercept stuff anyway)

Kind regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__


[Dovecot] IMAPC feature description

2013-06-13 Thread Yonatan Broza

Hi,

I couldn't find any decent documentation about the IMAPC feature.

Could someone please explain the purpose of this feature?

In particular, what are the differences between IMAPC and reverse proxying?

Thanks.


[Dovecot] Turn off IMAPS?

2013-06-13 Thread Simon B
Hi

I've upgraded to 2.1.7 and finally decided to turn off imaps and pop3s
because these days everyone uses tls over 143 anyway.  But it's on and
I can't figure out why.

I only have non-ssl versions specified:
protocols = imap pop3

I've stopped and started and the ports are still open and netstat says
dovecot is listening on them..

mail:~# netstat -tulnp | grep dove
tcp0  0 0.0.0.0:993 0.0.0.0:*
LISTEN  29340/dovecot
tcp0  0 0.0.0.0:995 0.0.0.0:*
LISTEN  29340/dovecot
tcp0  0 0.0.0.0:110 0.0.0.0:*
LISTEN  29340/dovecot
tcp0  0 0.0.0.0:143 0.0.0.0:*
LISTEN  29340/dovecot
tcp6   0  0 :::993  :::*
LISTEN  29340/dovecot
tcp6   0  0 :::995  :::*
LISTEN  29340/dovecot
tcp6   0  0 :::110  :::*
LISTEN  29340/dovecot
tcp6   0  0 :::143  :::*
LISTEN  29340/dovecot

Any ideas?

Thanks.

Simon




Here's my doveconf - n

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.0 ext3
auth_mechanisms = plain login
auth_verbose = yes
disable_plaintext_auth = no
first_valid_uid = 109
last_valid_uid = 109
log_timestamp = %Y-%m-%d %H:%M:%S 
login_log_format_elements = user=%u method=%m rip=%r %c
mail_location = maildir:/var/spool/mail/virtual/%d/%n
mail_privileged_group = mailsystem
maildir_very_dirty_syncs = yes
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  quota = maildir
}
protocols = imap pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = mailsystem
mode = 0660
user = postfix
  }
  unix_listener auth-master {
group = mailsystem
mode = 0660
user = mailsystem
  }
  user = mailsystem
}
ssl_ca = /etc/ssl/keys/ca.crt
ssl_cert = /etc/ssl/keys/mail.net.crt
ssl_key = /etc/ssl/private/mail.net.key
userdb {
  driver = prefetch
}
userdb {
  args = uid=109 gid=113 home=/var/spool/mail/virtual/%d/%n allow_all_users=yes
  driver = static
}
protocol imap {
  imap_client_workarounds = delay-newmail
  mail_max_userip_connections = 20
  mail_plugins = quota imap_quota
}
protocol pop3 {
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_save_uidl = yes
  pop3_uidl_format = %v.%u
}
protocol lda {
  deliver_log_format = msgid=%m: %f: %$
  info_log_path =
  log_path =
  mail_plugins = quota
  postmaster_address = postmas...@example.net
}


Re: [Dovecot] CATENATE/literal8 issue

2013-06-13 Thread Michael M Slusarz

Quoting Timo Sirainen t...@iki.fi:


On Wed, 2013-05-22 at 09:38 -0600, Michael M Slusarz wrote:

Quoting Michael M Slusarz slus...@curecanti.org:

 Quoting Timo Sirainen t...@iki.fi:

 Anyway .. the BINARY APPEND converts only the MIME parts that you
 send with Content-Transfer-Encoding: binary. Are you sending such
 header to Dovecot?

I can verify this isn't working as you described above:

1 APPEND INBOX CATENATE (TEXT {49+}
Content-Type: multipart/alternative; boundary=A TEXT ~{1}
1 NO [UNKNOWN-CTE] Binary input allowed only when the first part is binary.


What do you do then if server advertises CATENATE but not BINARY?


Send as a regular literal.  If there truly are nulls in the output,  
there's not much we can do so we send as-is and hope for the best.



Anyway for the other possibilities Dovecot could:

a) Put all CATENATEd messages through the istream-binary-converter, but
just not do any actual C-T-E:binary conversion until the first ~{binary}
part is found.

b) Just treat ~{n} exactly the same as ~{n}, unless it's the first part
of CATENATE.

Maybe this should be aked about in IMAP mailing list .. (Didn't I
already ask something about CATENATE+BINARY combination?)


Yeah:  
http://mailman2.u.washington.edu/pipermail/imap-protocol/2012-June/001787.html  
  No responses :)


It is concerning because RFC 4466 indicates that literal8's are  
allowed for both APPEND and MULTIAPPEND, which is essentially an  
extended APPEND.  But RFC 4469 defines CATENATE TEXT as literal only:


RFC 4466:
   append-data = literal / literal8 / append-data-ext

RFC 4469:
   append-data =/ CATENATE SP ( cat-part *(SP cat-part) )
   cat-part = text-literal / url
   text-literal = TEXT SP literal

To me CATENATE =~ MULTIAPPEND - it is just another form of an extended  
APPEND.  Not sure why it shouldn't be allowed there.  But from a  
strict ABNF standpoint, you are correct that I shouldn't be sending  
literal8's.  I'll ask myself on the IMAP list why this design choice  
was made.


For the record... given the varying levels of BINARY support in  
different IMAP servers (UW IMAP is flat-out broken), I've gone ahead  
and bit the bullet and we now pre-scan outgoing append literals for  
null characters and only use literal8's when absolutely necessary.  I  
was probably being too clever for my own good in assuming that I can  
just send and assume the server will handle all issues.


With that being said... I was able to reliably reproduce a parsing  
issue in Dovecot 2.2.x when doing a MULTIAPPEND w/literal8's.  I need  
to track down if this is a single message causing the issue or some  
sort of cumulative bug that only appears once you've done something  
like 200-300 sequential appends.  I can verify that a switch from  
literal8 - literal fixes the issue.  I'll try to create a  
reproducible test case.


michael



Re: [Dovecot] CATENATE/literal8 issue

2013-06-13 Thread Michael M Slusarz

Quoting Michael M Slusarz slus...@curecanti.org:

It is concerning because RFC 4466 indicates that literal8's are  
allowed for both APPEND and MULTIAPPEND, which is essentially an  
extended APPEND.  But RFC 4469 defines CATENATE TEXT as literal only:


RFC 4466:
   append-data = literal / literal8 / append-data-ext

RFC 4469:
   append-data =/ CATENATE SP ( cat-part *(SP cat-part) )
   cat-part = text-literal / url
   text-literal = TEXT SP literal

To me CATENATE =~ MULTIAPPEND - it is just another form of an  
extended APPEND.  Not sure why it shouldn't be allowed there.


Answered my own question here - sure enough, it was an oversight:

http://osdir.com/ml/ietf.imapext/2006-03/msg00030.html

michael



Re: [Dovecot] Turn off IMAPS?

2013-06-13 Thread Ben Morrow
At  4PM +0200 on 13/06/13 you (Simon B) wrote:
 
 I've upgraded to 2.1.7 and finally decided to turn off imaps and pop3s
 because these days everyone uses tls over 143 anyway.  But it's on and
 I can't figure out why.
 
 I only have non-ssl versions specified:
 protocols = imap pop3

Dovecot listens on imaps/pop3s by default, so you need to disable them
explicitly like this:

service imap-login {
inet_listener imap {
# defaults
}
inet_listener imaps {
# disable the imaps service
port = 0
}
}

and the equivalent for pop3-login.

Ben



Re: [Dovecot] Turn off IMAPS?

2013-06-13 Thread InuSasha
Hi Simon,

Try to add this configuration.
The Port = 0 will disable the listener. 

Greats,
Sascha Kuehndel

service imap-login {
  inet_listener imap {
#port = 143
  }
  inet_listener imaps {
port = 0
#ssl = yes
  }
}

service pop3-login {
  inet_listener pop3 {
#port = 110
  }
  inet_listener pop3s {
port = 0
#ssl = yes
  }
}



signature.asc
Description: This is a digitally signed message part.


Re: [Dovecot] quota-status not working in distributed environment

2013-06-13 Thread Ben Morrow
At 12PM +0200 on 13/06/13 you (Benoit Panizzon) wrote:
 
 Or is the postfix policy daemon call to the quota-status socket documented 
 somewhere (it must be, but where?) so we could implement it from within the 
 Milter? (we use the sendmail Milter API from postfix to filter spam and 
 viruses, do sender/recipient rewriting, forward bounce matching, rate 
 limmiting, login/IP statistics to block botnets abusing phished addresses and 
 legal intercept stuff anyway)

The quota-status protocol is just the ordinary Postfix policy delegation
protocol, documented in Postfix's SMTPD_POLICY_README. I would have
thought that if you give 'service quota-status' an inet_listener you
could have the Postfix policy check the quota on several machines over
the network, though of course the policy protocol has absolutely no
security so you may not want to do that.

Ben



[Dovecot] MULTIAPPEND + literal8 issue

2013-06-13 Thread Michael M Slusarz
Background: importing a mbox file containing ~700 messages (20 MB).   
Our program splits MULTIAPPENDS into approx. 5MB chunks.  We don't use  
literal+ in order to immediately catch errors.


I can reproducibly produce the following error (2.2.2) when doing a  
MULTIAPPEND where every append is using literal8:


[...340 messages appended in 7 previous APPEND commands...]
C: 10 APPEND Test 16-Dec-2011 17:19:46 -0700 ~{3128}
[...~30 APPENDed messages...]
C:  18-Jan-2012 12:38:21 -0700 ~{2893}
S: + OK
[...2893 octets of data...]
C:  18-Jan-2012 22:09:41 -0700 ~{6492}
S: 10 BAD Error in IMAP command APPEND: Expected '{'
S: 492} BAD Error in IMAP command : Unknown command.

This error occurs about 340 messages in.  If I switch to using regular  
literals, this error does not occur.  I can verify that neither the  
12:38:21 message nor the 22:09:41 message alone is broken (I can put  
just these two in a file and import and it is successful).


I can provide the mbox file privately, if needed.

michael



Re: [Dovecot] Turn off IMAPS?

2013-06-13 Thread Simon B
Thanks everyone :)  You'd think I could have found that on Google!

Simon

On 13 June 2013 16:56, InuSasha i...@inusasha.de wrote:
 Hi Simon,

 Try to add this configuration.
 The Port = 0 will disable the listener.

 Greats,
 Sascha Kuehndel

 service imap-login {
   inet_listener imap {
 #port = 143
   }
   inet_listener imaps {
 port = 0
 #ssl = yes
   }
 }

 service pop3-login {
   inet_listener pop3 {
 #port = 110
   }
   inet_listener pop3s {
 port = 0
 #ssl = yes
   }
 }



Re: [Dovecot] crash/mem violation in auth_worker + 50G logs in 2.1.7

2013-06-13 Thread Mrten
On 13/6/2013 05:11 , Timo Sirainen wrote:

 Looks like there was a generic problem with how crash during
 initialization was handled. This should fix all of them:
 http://hg.dovecot.org/dovecot-2.2/rev/754d244b8249

OK, thanks for the fix!

M.


Re: [Dovecot] IMAPC feature description

2013-06-13 Thread Gedalya

On 06/13/2013 04:26 AM, Yonatan Broza wrote:

Hi,

I couldn't find any decent documentation about the IMAPC feature.

Could someone please explain the purpose of this feature?

In particular, what are the differences between IMAPC and reverse 
proxying?


Thanks.


imapc implements a storage engine for dovecot, so that you can say 
things like: mail_location = imapc:~/imapc
Your mailbox can be stored in maildir, mdbox, or imapc. This would 
typically be used for special purposes.


Regular proxying ultimately passes the connection on to the backend 
server and the client is talking to that server directly, given that 
server's implementation of the IMAP protocol. If you do proxying using 
imapc, the client is talking to dovecot, dovecot serves the mailbox out 
of this storage engine which in turn translates everything into 
commands issued against the backend IMAP server. This more complicated 
setup sometimes can solve problems when the client doesn't get along 
well with the backend server.


http://wiki2.dovecot.org/HowTo/ImapcProxy

Since imapc can make a remote mailbox appear like a local dovecot 
mail_location, it can be very useful for migrating mailboxes from 
another server to dovecot. Using the pop3_migration (and maildir as the 
destination format) you can even preserve the pop3 UIDL order, so you 
basically made a perfect clone and clients should continue to work 
without noticing any difference whatsoever, whether they are using IMAP, 
POP3 or both.


http://wiki2.dovecot.org/Migration/Dsync



[Dovecot] Auto-responder to handle unencrypted (and/or unsigned) email messages whose origin is not localhost

2013-06-13 Thread Ben Johnson
Hi, everyone,

I'm surprised how little exists on the Internet regarding this
particular subject. Given the recent headlines, that is about to change,
I'm sure.

I have a need to send an automated response to all senders who attempt
to send unencrypted and/or unsigned email to a specific mailbox on my
system. (Messages originating from localhost should be exempt.)

I would like for the auto-reply to include a customized message with the
appropriate public PGP key contained therein.

Has anyone accomplished this? If not, some basic theory as to how one
might go about achieving this would be greatly appreciated.

Perhaps this is a job for Dovecot's sieve_before directive. Would this
simply be a matter of checking the message body for the expected
patterns, e.g., starts with - BEGIN PGP MESSAGE -, etc., etc.
and sending an automated reply with the public key if the expected
strings are not present?

Any additional thoughts would be very helpful!

Thank you in advance,

-Ben


Re: [Dovecot] dovecot segfaults after upgrade

2013-06-13 Thread Timo Sirainen
On 13.6.2013, at 5.33, Timo Sirainen t...@iki.fi wrote:

 On Mon, 2013-06-10 at 12:30 +0200, Thomas Blomenkamp wrote:
 
 Using dovecot on debian oldstable (squeeze) with daily builded repository, 
 after an upgrade this morning, dovecot always shows the following error:
 
 2013 Jun 10 11:07:22 mailstore imap(tblomenk): Fatal: master: 
 service(imap): child 3016 killed with signal 11 (core dumps disabled)
 Jun 10 11:07:22 mailstore kernel: [ 1589.400741] imap[3016]: segfault at 
 7fffd9048ff8 ip 7f91417e2c3b sp 7fffd9049000 error 6 in 
 libdovecot.so.0.0.0[7f9141796000+bc000]
 
 Is this already fixed? If not, gdb backtraces are the best way to debug
 crashes: http://dovecot.org/bugreport.html

http://hg.dovecot.org/dovecot-2.2/rev/04ee59c96fc9 should fix it.



Re: [Dovecot] Auto-responder to handle unencrypted (and/or unsigned) email messages whose origin is not localhost

2013-06-13 Thread Ben Johnson


On 6/13/2013 3:19 PM, Ben Johnson wrote:
 Hi, everyone,
 
 I'm surprised how little exists on the Internet regarding this
 particular subject. Given the recent headlines, that is about to change,
 I'm sure.
 
 I have a need to send an automated response to all senders who attempt
 to send unencrypted and/or unsigned email to a specific mailbox on my
 system. (Messages originating from localhost should be exempt.)
 
 I would like for the auto-reply to include a customized message with the
 appropriate public PGP key contained therein.
 
 Has anyone accomplished this? If not, some basic theory as to how one
 might go about achieving this would be greatly appreciated.
 
 Perhaps this is a job for Dovecot's sieve_before directive. Would this
 simply be a matter of checking the message body for the expected
 patterns, e.g., starts with - BEGIN PGP MESSAGE -, etc., etc.
 and sending an automated reply with the public key if the expected
 strings are not present?
 
 Any additional thoughts would be very helpful!
 
 Thank you in advance,
 
 -Ben
 

I was able to fulfill the objective with a sieve script.

The only nuances are the inability to control the subject line of the
automated reply (it always reads, Automatically rejected mail), and
Sieve warnings that the reject action conflicts with the keep action.

The only real improvement would be to use the sieve_extprograms
plug-in to send the automated reply using sendmail or similar. Then, the
contents of the automated reply could be controlled entirely, and the
Sieve warnings regarding conflicting actions would disappear.

Happy to answer any questions regarding implementation details.

--Ben


Re: [Dovecot] dovecot segfaults after upgrade

2013-06-13 Thread Thomas Blomenkamp

On Thu, 13 Jun 2013, Timo Sirainen wrote:


On 13.6.2013, at 5.33, Timo Sirainen t...@iki.fi wrote:


On Mon, 2013-06-10 at 12:30 +0200, Thomas Blomenkamp wrote:


Using dovecot on debian oldstable (squeeze) with daily builded repository,
after an upgrade this morning, dovecot always shows the following error:

2013 Jun 10 11:07:22 mailstore imap(tblomenk): Fatal: master:
service(imap): child 3016 killed with signal 11 (core dumps disabled)
Jun 10 11:07:22 mailstore kernel: [ 1589.400741] imap[3016]: segfault at
7fffd9048ff8 ip 7f91417e2c3b sp 7fffd9049000 error 6 in
libdovecot.so.0.0.0[7f9141796000+bc000]


Is this already fixed? If not, gdb backtraces are the best way to debug
crashes: http://dovecot.org/bugreport.html


http://hg.dovecot.org/dovecot-2.2/rev/04ee59c96fc9 should fix it.




Thanks, all seems to work now.


[Dovecot] Multiple user sharing a single mailbox

2013-06-13 Thread Jonathon Price
I'm designing a system where some but not all groups of users want to share
a single mailbox, i.e the user will not have there own inbox. I think this
is possible by setting up a user database that returns the same mail
location and possible the same home directory. This sharing would only
occur in a single domain.


Example User Database

UserID | home | mail

a...@site1.example.com  | /mail/home/site1.example.com/all
| /mail/mailstorage/site1.example.com/all

us...@site1.example.com | /mail/home/site1.example.com/user1| /mail/mailstorage/
site1.example.com/all

us...@site1.example.com | /mail/home/site1.example.com/user2| /mail/mailstorage/
site1.example.com/all

us...@site2.example.com | /mail/home/site2.example.com/user1| /mail/mailstorage/
site2.example.com/user1

us...@site2.example.com | /mail/home/site2.example.com/user2| /mail/mailstorage/
site2.example.com/user2



In this example all of site1.example.com users share a single mailbox, and
site2.example.com users each have there own mailbox. Should the home
directory also be shared, I read the comment that they should never be
shared but wasn't sure if that still applied when the mailbox is the same
path. For groups that are sharing a mailbox there would likely be a
relatively low number of users concurrently logged in, say less than 10.


For clustering we are currently limited to NFS mail storage. I was planning
on using director setup so that the hashing/sharding is performed on the
domain only, so all users for a domain will end up on a single node. At
this stage clustering is mainly for high availability not performances.


Lastly I'm concerned about possible issues with locking on the mailbox
files and indexes. Will one of the mail formats reduces this risk, we can
use any format as all mail will be written by Dovecot. Would giving each
user there own index location help? and I assume this would mean that each
user would see there own flags like read status?


Does this setup sound ok, are there aspects that should change?


thanks,

Jon


Re: [Dovecot] Multiple user sharing a single mailbox

2013-06-13 Thread Timo Sirainen
On 14.6.2013, at 5.38, Jonathon Price j...@jprice.me wrote:

 I'm designing a system where some but not all groups of users want to share
 a single mailbox, i.e the user will not have there own inbox. I think this
 is possible by setting up a user database that returns the same mail
 location and possible the same home directory. This sharing would only
 occur in a single domain.

Should work, as long as there aren't username-specific things such as sql-dict 
quota where each user is updating their own quota. But maybe do this an easier 
way and have passdb lookup simply change the username to the shared user? You 
can do this by having the passdb return user field that contains the shared 
username.

 Lastly I'm concerned about possible issues with locking on the mailbox
 files and indexes. Will one of the mail formats reduces this risk, we can
 use any format as all mail will be written by Dovecot. Would giving each
 user there own index location help? and I assume this would mean that each
 user would see there own flags like read status?

The \Seen flag could be made per-user, preferrably with v2.2's INDEXPVT 
setting. Otherwise you'd have to use maildir and you'd have to manually create 
a dovecot-shared file to each such maildir (every time a new one is created).



Re: [Dovecot] Multiple user sharing a single mailbox

2013-06-13 Thread Frerich Raabe

On Jun 13, 2013, at 7:55 PM, Timo Sirainen t...@iki.fi wrote:
 The \Seen flag could be made per-user, preferrably with v2.2's INDEXPVT 
 setting. Otherwise you'd have to use maildir and you'd have to manually 
 create a dovecot-shared file to each such maildir (every time a new one is 
 created).

Is there some documentation on the semantics of INDEXPVT? I checked the Wiki 
page http://wiki2.dovecot.org/SharedMailboxes/Public and also performed a 
full-text search for INDEXPVT, but couldn't find anything.

-- 
Frerich Raabe - ra...@froglogic.com
www.froglogic.com - Multi-Platform GUI Testing