Re: Dovecot POP3 STARTTLS works on Thunderbird but not on Gmail

2014-11-20 Thread Aleš Grm
Ok, I tried on port 995, and on Gmail I get SSL error: unable to verify
the first certificate. Certificate is not self-signed (using StartCOM).
The log now shows:

Nov 16 14:37:52 mail dovecot: auth: Debug: auth client connected (pid=31923)
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x10, ret=1:
before/accept initialization [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: before/accept initialization [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 read client hello A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 write server hello A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 write certificate A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 write server done A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 flush data [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2002,
ret=-1: SSLv3 read client certificate A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2002,
ret=-1: SSLv3 read client certificate A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 read client key exchange A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 read finished A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 write session ticket A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 write change cipher spec A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 write finished A [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
ret=1: SSLv3 flush data [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x20, ret=1:
SSL negotiation finished successfully [209.85.213.23]
Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2002,
ret=1: SSL negotiation finished successfully [209.85.213.23]
Nov 16 14:37:53 mail dovecot: pop3-login: Warning: SSL alert: where=0x4008,
ret=256: warning close notify [209.85.213.23]
Nov 16 14:37:53 mail dovecot: pop3-login: Disconnected (no auth attempts in
1 secs): user=, rip=209.85.213.23, lip=192.168.100.94, TLS: Disconnected,
session=duAK+PkH5QDRVdUX
^C

Could the form of public part of certificate be wrong? I'm using only .CRT.

Kopitarna Sevnica d. d.

Prvomajska ulica 8
8290 SEVNICA
SLOVENIA
www.kopitarna.eu
Cell: +386 31 899 993
Land: +386 7 81 63 440

On 16 November 2014 14:19, Reindl Harald h.rei...@thelounge.net wrote:


 Am 16.11.2014 um 14:05 schrieb Aleš Grm:

 I have configured Dovecot to work perfectly on Thundrebird using SSL
 certificates with STARTTLS on port 110. When I try to add this account on
 Gmail I get the error:

 In Gmail my settings include port 110 and the use of SSL is checked.
 Dovecot configuration:

 Any idea why does it work with Thunderbird and not with Gmail?


 surely - gmail wants 995 instead 110 (means not STARTTLS) and don't accept
 self signed certificates BTW




Re: Storage IOPs Calculation for Qmail Server

2014-11-20 Thread Gedalya

On 11/18/2014 07:31 AM, SasiKumar.K wrote:

Dear DovecotORG,

 In my organization, we are about to implement Qmail Server.

*  The number of current users will be 800, in future it may increase upto
1200.

*  The number of concurrent users will be 300.

  


I am the engineer to deploy the Qmail in Linux server. I need to tell the
storage team on the IOPs requirement.

This is the dovecot mailing list, and your question has nothing to do 
with dovecot. I assume perhaps you're asking here just because there are 
people here who know email. The thing is that the amount of IOPS depends 
a lot on the implementation - you can save IO by using e.g. dovecot's 
mdbox etc.
What do you mean by qmail? Will you use just pop3? No imap? Concurrent 
meaning..? If pop3, connections are very short lived. How will you have 
300 out of 800 connected simultaneously?
It's impossible to actually give you any number, but here are some 
guidelines.
IOPS is primarily a number of writes. If you use tons of RAM you can 
make IO read operations a rare event (like once per minute, on your 
scale, is quite possible).
As for writes, they happen when a new email is delivered, and when it is 
flagged or deleted.
That's about it. It's not a direct function of how many users you have, 
but rather how many messages pass through your server per day.
My rough guess is that 6 3.5 drives might be sufficient for you if you 
process, say = 100,000 messages per day.


subscription file/folder for IMAP

2014-11-20 Thread Jorge Bastos
Hi,

 

For IMAP users, there's the subscription file in the user's home, and if I
try to subscribe more imap folders that are invisible, there's that one, but
as it is an file, nothing is supposed to happen.

Is there an way to, allow users to create the subscriptions folder without
any collision, or just deny or don't show this file as an possible folder
(which Is not) to subscribe.

 

What does people normally do?

 

Thanks in advanced,


Handle of subscription file/folder for IMAP

2014-11-20 Thread Jorge Bastos
Hi,

For IMAP users, there's the subscription file in the user's home, and if I
try to subscribe more imap folders that are invisible, there's that one, but
as it is a file, nothing is supposed to happen.
Is there an way to, allow users to create the subscriptions folder without
any collision, or just deny or don't show this file as an possible folder
(which Is not) to subscribe.

What does people normally do?

Thanks in advanced,


Re: Dovecot auth process repeatedly crashes on OS X Server 10.9

2014-11-20 Thread James Reynolds
I’ve isolated the crashes to clients running OS X 10.10 Yosemite and Mail.app.  
I’ve looked through the source code a little to get familiar with how auth 
works, but I’m wondering if there is a faster way to figure this out, maybe 
disabling encryption (tls and force plain text password) and running tcpdump 
and see how 10.10 is different than 10.9.

I’ve asked someone running dovecot 2.0.x (on Linux) if they have seen this 
problem with 10.10 clients and he didn’t.

The crash log states it is a EXC_BAD_ACCESS (SIGSEGV) and the 2 functions calls 
in the backtrace are vstrconcat (libdovecot) and strlen (libsystem_c.dylib).  
I’m wondering if maybe the username or strings sent by 10.10 are missing nulls 
at the end (which shouldn’t even be possible afiak) or off by 1 or something.  
Just a wild guess.

James

On Nov 6, 2014, at 5:26 PM, James Reynolds reyno...@biology.utah.edu wrote:

 My dovecot/auth process crashes several times a minute, sometimes at the same 
 second, sometimes randomly.  I’ve turned on auth_debug and been pouring over 
 everything trying to see if I can see what is going on but I can’t find 
 anything.  I’m running OS X Server 10.9 and dovecot 2.2.5.  I can’t say for 
 sure, but it looks to me like the crashed process doesn’t even save anything 
 to mail-debug.log before it crashes.  It takes about 2 seconds for it to come 
 up.  Once it crashed about 10 times in 2 seconds.
 
 Can anyone give me any ideas where I should look?
 
 Here are relevant portions from logs:
 
 mail-info.log
 
 Nov 06 17:19:10 pop3-login: Info: Aborted login (auth process communication 
 failure): user=, method=DIGEST-MD5, rip=155.101.106.229, lip=10.0.0.128, TLS
 
 mail-err.log
 
 Nov 06 17:19:10 pop3-login: Warning: Auth connection closed with 1 pending 
 requests (max 0 secs, pid=66114, EOF)
 Nov 06 17:19:10 auth: Fatal: master: service(auth): child 66100 killed with 
 signal 11 (core dumps disabled)
 
 It looks exactly like what is discussed here:
 
 https://discussions.apple.com/thread/6482632?start=0tstart=0
 
 I do have clients using Outlook.  I haven’t run wireshark or tried to verify 
 it is Outlook by testing different clients.
 
 postconf -n
 
 # 2.2.5: /Library/Server/Mail/Config/dovecot/dovecot.conf
 # OS: Darwin 13.3.0 x86_64  hfs
 auth_mechanisms = cram-md5 digest-md5 plain login
 auth_realms = biomail.biology.utah.edu
 auth_socket_path = /var/run/dovecot/auth-userdb
 auth_username_format = %n
 debug_log_path = /Library/Logs/Mail/mail-debug.log
 default_internal_user = _dovecot
 default_login_user = _dovenull
 first_valid_gid = 6
 first_valid_uid = 6
 imap_id_log = *
 imap_id_send = name * version *
 imap_urlauth_submit_user = submit
 info_log_path = /Library/Logs/Mail/mail-info.log
 log_path = /Library/Logs/Mail/mail-err.log
 login_log_format_elements = user=%u method=%m rip=%r lip=%l mpid=%e %c
 mail_access_groups = mail
 mail_attribute_dict = 
 file:/Library/Server/Mail/Data/attributes/attributes.dict
 mail_location = maildir:/Library/Server/Mail/Data/mail/%u
 mail_log_prefix = %s(pid %p user %u): 
 mail_plugins = quota zlib acl fts fts_sk
 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
 mdbox_rotate_size = 200 M
 namespace acl-mailboxes {
  list = children
  location = 
 maildir:/Library/Server/Mail/Data/mail/users/%%u:INDEX=/Library/Server/Mail/Data/mail/shared/%%u
  prefix = shared.%%u.
  separator = .
  subscriptions = no
  type = shared
 }
 namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
 }
 namespace list-archives {
  list = children
  location = 
 maildir:/Library/Server/Mail/Data/listserver/messages/archive/lists/%%u:INDEX=/Library/Server/Mail/Data/listserver/messages/archive/shared/%%u
  prefix = archives.%%u.
  separator = .
  subscriptions = no
  type = shared
 }
 passdb {
  driver = od
 }
 passdb {
  args = /Library/Server/Mail/Config/dovecot/submit.passdb
  driver = passwd-file
 }
 plugin {
  acl = vfile:/Library/Server/Mail/Config/dovecot/global-acls:cache_secs=300
  acl_shared_dict = file:/Library/Server/Mail/Data/shared/shared-mailboxes
  fts = sk
  quota = maildir:User quota
  quota_warning = storage=100%% quota-exceeded %u
  sieve = /Library/Server/Mail/Data/rules/%u/dovecot.sieve
  sieve_dir = /Library/Server/Mail/Data/rules/%u
  stats_refresh = 30 secs
  stats_track_cmds = yes
 }
 postmaster_address = postmas...@biology.utah.edu
 protocols = imap pop3 lmtp sieve
 quota_full_tempfail = yes
 service auth {
  idle_kill = 15 mins
  unix_listener auth-userdb {
user = _dovecot
  }
 }
 service dns_client {
  

how to recover mails - dovecot 2.2.13

2014-11-20 Thread Götz Reinicke - IT Koordinator
Hi,

I still have a messed up user account, with no mail client (appl mail,
thunderbird, sogo) mails show up as expected. Folders look empty, some
have something in it, but cant access the mails.

My idea is, to move the users mal folder, let him regenerate the
folderstructure from scratch and than reimport the old mails.

Question: We use maildir. Can I just copy the old mails from e.g.

user-backup/Maildir/curl/*

to

user/Maildir/curl/*

Or which steps are needed? rebuilding any index or something etc ?


Thanks very much for any suggestion!

Regards . Götz
-- 
Götz Reinicke
IT-Koordinator

Tel. +49 7141 969 82 420
E-Mail goetz.reini...@filmakademie.de

Filmakademie Baden-Württemberg GmbH
Akademiehof 10
71638 Ludwigsburg
www.filmakademie.de

Eintragung Amtsgericht Stuttgart HRB 205016

Vorsitzender des Aufsichtsrats: Jürgen Walter MdL
Staatssekretär im Ministerium für Wissenschaft,
Forschung und Kunst Baden-Württemberg

Geschäftsführer: Prof. Thomas Schadt



smime.p7s
Description: S/MIME Cryptographic Signature


redis dict auth and default_fields

2014-11-20 Thread brd
Hi all,
i'm trying to configure default_fields with redis dict (allow_nets,
proxy, ...) but it seems that the properties defined are not used even if they
appear on output of doveconf. It is a known behaviour? Does
default_fields works only for ldap db?

I have a director+NFS environment and with dict passdb i'have to put proxy=y
for every entry in pass/userdb; to limit the redis memory footprint it
should be cool if the proxy=y can be configured as a default_field. It
is a limit of using dict for pass/userdb cause using SQL you can manage
it as a SELECT fixed field, using LDAP you can manage with
default_fields but with dict you are forced to put all inside the db
entries.

doveconf output:

[...]
passdb {
  args = /etc/dovecot/dovecot-dict-auth.conf.ext
  default_fields = proxy=y
  driver = dict
}
[...]

Regards
-brd


Re: High I/O wait with Dovecot POP3

2014-11-20 Thread Frido Otten
Op 25-10-14 om 02:21 schreef Timo Sirainen:
 On 22 Oct 2014, at 06:15, Frido Otten fr...@dds.nl wrote:

 In the past we've had 4 loadbalanced servers configured with courier
 pop3 and dovecot handling respectively POP3 and IMAP connections. These
 4 servers have a shared NFS storage on a Netapp FAS3220 controller with
 SAS disks. This setup is handling 50 POP3 sessions per second without
 any problems.

 Now we're installing 6 new loadbalanced servers to do the same job on
 the same storage, but using Dovecot to handle the POP3 sessions instead
 of Courier. The IMAP sessions are already handled by those 6 new
 servers, but we're encountering high iowait issues when using POP3 on
 those servers.

 I've applied the hints from http://wiki2.dovecot.org/NFS but this had no
 improvement.
 See also http://wiki2.dovecot.org/POP3Server - especially 
 pop3_fast_size_lookups may be useful.
I've applied the hints on this page and also set pop3_fast_size_lookups
to yes. The same for pop3_no_flag_updates.
 mail_nfs_index = yes
 mail_nfs_storage = yes
 These slow things down a bit, ideally get rid of these and use Dovecot 
 directors instead.
Can these make such a big difference? I've commented these out. When
switching to the Dovecot as POP3 server the iowait immediately
skyrockets to 80-90% as well as the overall load of the machine.
 protocol pop3 {
  pop3_uidl_format = %v.%u
 }
 I don't think your Courier installation was using this UIDL format? If you 
 switched to Dovecot the UIDLs would likely differ and clients would 
 redownload mails. Try to preserve the UIDLs as described in 
 http://wiki2.dovecot.org/Migration/Courier - and even then I'd recommend 
 setting pop3_uidl_format to something else, for example %f

This was indeed an issue. I've changed this to %f and checked with our
current running courier and now the output of UIDL are the same on
Courier and Dovecot. This change unfortunately had no effect on the high
iowait.


indexes with ocfs2

2014-11-20 Thread Eduardo Ramos

Hi guys!

I'm having performance issues with my dovecot+ocfs2 environment, so I'm 
thinking about some changes.


Now, I have mail store and indexes stored in a iscsi-ocfs2 volume with 
that options:


mmap_disable = yes
dotlock_use_excl = yes
mail_fsync = always
mail_nfs_storage = yes
mail_nfs_index = yes
lock_method = dotlock

I want to change indexes to local volume ext4 and do this:

mmap_disable = no
mail_nfs_index = no

Could it cause some problem?

Thanks.


Test

2014-11-20 Thread Jorge Bastos
Test msg, nock nock dovecot list?


logwatch reporting

2014-11-20 Thread Robert Moskowitz
I just launched a new mailserver that is using dovecot.  My previous 
mailserver used courier-mail.  I am expecting better things with this 
new server, but I was use to some login information in logwatch that I 
am not seeing now.  For example I would get:



 
 [IMAPd] Logout stats:

 
User | Logouts | Downloaded |  Mbox Size
 --- | --- | -- | --
   us...@htt-consult.com  |  55 | 219571 |  0
   us...@htt-consult.com  | 285 | 221681 |  0
  us...@labs.htt-consult.com  |  32 |  15183 |  0
 ---
   372 | 456435 |  0
 
 
 
 **Unmatched Entries**

Disconnected, ip=[:::107.150.52.84], time=1, starttls=1: 2 Time(s)
 
 -- IMAP End -



- POP-3 Begin 

 
 [POP3] Logout stats (in MB):

 
User | Logouts | Downloaded |  Mbox Size
 --- | --- | -- | --
   us...@htt-consult.com  |  78 |   5.96 |  0
   us...@communaljob.com  | 215 |   9.24 |  0
   us...@htt-consult.com  |   1 |   7.47 |  0
   us...@htt-consult.com  |   1 |   2.34 |  0
   us...@htt-consult.com  | 301 |  31.08 |  0
  us...@labs.htt-consult.com  | 201 |   4.98 |  0
 ---
   797 |  61.06 |   0.00
 
 
 
 **Unmatched Entries**

Disconnected, ip=[:::107.150.52.84]: 2 Time(s)
Disconnected, ip=[:::12.159.43.147]: 50 Time(s)
Disconnected, ip=[:::172.245.45.20]: 61 Time(s)
LOGIN FAILED, user=Alfredo, ip=[:::172.245.45.20]: 1 Time(s)
LOGIN FAILED, user=Antonio, ip=[:::172.245.45.20]: 2 Time(s)
LOGIN FAILED, user=postmaster, ip=[:::172.245.45.20]: 7 Time(s)

LOGIN FAILED, user=webmaster, ip=[:::172.245.45.20]: 7 Time(s)
LOGIN FAILED, user=www, ip=[:::172.245.45.20]: 4 Time(s)
Maximum connection limit reached for :::172.245.45.20: 509 Time(s)
 
 -- POP-3 End -



Whereas dovecot is only reporting:

- Dovecot Begin 

 
 
 Dovecot disconnects:

Inactivity: 1 Time(s)
Logged out: 379 Time(s)
no auth attempts: 5 Time(s)
no reason: 1 Time(s)
tried to use disabled plaintext auth: 1 Time(s)
 
 **Unmatched Entries**

dovecot: dict: mysql: Connected to localhost (postfix): 351 Time(s)
 
 -- Dovecot End -



How can I get more detailed user activity reporting to logwatch?

And why is connection to mysql under Unmatched Entries?


Static build failure

2014-11-20 Thread Bernd Kuhls
Hi,

this patch fixes a symbol conflict in static build with MySQL enabled

Compile error log:
http://autobuild.buildroot.net/results/9b5/9b536926b3b2bf82c683b48e9697a220
f1b4bf33/build-end.log

Signed-off-by: Bernd Kuhls bernd.ku...@t-online.de

diff -uNr dovecot-2.2.15.org/src/doveadm/doveadm-log.c dovecot-
2.2.15/src/doveadm/doveadm-log.c
--- dovecot-2.2.15.org/src/doveadm/doveadm-log.c2014-06-13 
01:02:23.0 +0200
+++ dovecot-2.2.15/src/doveadm/doveadm-log.c2014-11-20 
19:46:49.0 +0100
@@ -293,7 +293,7 @@
}
}
 
-   if (str_to_time(args[1], t)  0) {
+   if (dove_str_to_time(args[1], t)  0) {
i_error(Invalid timestamp: %s, args[1]);
t = 0;
}
@@ -313,7 +313,7 @@
while ((c = getopt(argc, argv, s:))  0) {
switch (c) {
case 's':
-   if (str_to_time(optarg, min_timestamp)  0)
+   if (dove_str_to_time(optarg, min_timestamp)  0)
i_fatal(Invalid timestamp: %s, optarg);
break;
default:
diff -uNr dovecot-2.2.15.org/src/doveadm/doveadm-replicator.c dovecot-
2.2.15/src/doveadm/doveadm-replicator.c
--- dovecot-2.2.15.org/src/doveadm/doveadm-replicator.c 2014-06-13 
01:02:50.0 +0200
+++ dovecot-2.2.15/src/doveadm/doveadm-replicator.c 2014-11-20 
19:46:40.0 +0100
@@ -166,8 +166,8 @@
T_BEGIN {
args = t_strsplit_tab(line);
if (str_array_length(args) = 5 
-   str_to_time(args[2], last_fast) == 0 
-   str_to_time(args[3], last_full) == 0) {
+   dove_str_to_time(args[2], last_fast) == 0 
+   dove_str_to_time(args[3], last_full) == 0) {
doveadm_print(args[0]);
doveadm_print(args[1]);
doveadm_print(time_ago(last_fast));
diff -uNr dovecot-2.2.15.org/src/doveadm/dsync/dsync-ibc-stream.c dovecot-
2.2.15/src/doveadm/dsync/dsync-ibc-stream.c
--- dovecot-2.2.15.org/src/doveadm/dsync/dsync-ibc-stream.c 2014-09-29 
13:07:07.0 +0200
+++ dovecot-2.2.15/src/doveadm/dsync/dsync-ibc-stream.c 2014-11-20 
19:47:16.0 +0100
@@ -979,12 +979,12 @@
return DSYNC_IBC_RECV_RET_TRYAGAIN;
}
if (dsync_deserializer_decode_try(decoder, last_renamed_or_created, 
value) 
-   str_to_time(value, node-last_renamed_or_created)  0) {
+   dove_str_to_time(value, node-last_renamed_or_created)  0) {
dsync_ibc_input_error(ibc, decoder, Invalid 
last_renamed_or_created);
return DSYNC_IBC_RECV_RET_TRYAGAIN;
}
if (dsync_deserializer_decode_try(decoder, 
last_subscription_change, value) 
-   str_to_time(value, node-last_subscription_change)  0) {
+   dove_str_to_time(value, node-last_subscription_change)  0) {
dsync_ibc_input_error(ibc, decoder, Invalid 
last_subscription_change);
return DSYNC_IBC_RECV_RET_TRYAGAIN;
}
@@ -1064,7 +1064,7 @@
if (guid_128_from_string(tmp[i], del-guid)  0)
return -1;
if (tmp[i+1] == NULL ||
-   str_to_time(tmp[i+1], del-timestamp)  0)
+   dove_str_to_time(tmp[i+1], del-timestamp)  0)
return -1;
}
return 0;
@@ -1251,7 +1251,7 @@
field.decision |= MAIL_CACHE_DECISION_FORCED;
 
if (dsync_deserializer_decode_try(decoder, last_used, value) 
-   str_to_time(value, field.last_used)  0) {
+   dove_str_to_time(value, field.last_used)  0) {
dsync_ibc_input_error(ibc, decoder, Invalid last_used);
ret = -1;
}
@@ -1454,7 +1454,7 @@
if (dsync_deserializer_decode_try(decoder, deleted, value))
attr-deleted = TRUE;
if (dsync_deserializer_decode_try(decoder, last_change, value) 
-   str_to_time(value, attr-last_change)  0) {
+   dove_str_to_time(value, attr-last_change)  0) {
dsync_ibc_input_error(ibc, decoder, Invalid last_change);
return DSYNC_IBC_RECV_RET_TRYAGAIN;
}
@@ -1763,12 +1763,12 @@
return DSYNC_IBC_RECV_RET_TRYAGAIN;
}
if (dsync_deserializer_decode_try(decoder, received_date, value) 

-   str_to_time(value, mail-received_date)  0) {
+   dove_str_to_time(value, mail-received_date)  0) {
dsync_ibc_input_error(ibc, decoder, Invalid received_date);
return DSYNC_IBC_RECV_RET_TRYAGAIN;
}
if (dsync_deserializer_decode_try(decoder, saved_date, value) 
-   str_to_time(value, mail-saved_date)  0) {
+   dove_str_to_time(value, mail-saved_date)  0) {

Mailing list test

2014-11-20 Thread Timo Sirainen
Apparently this list has somehow broken.. Not really sure what the problem is, 
lets see what happens to this mail.


Re: Mailing list test

2014-11-20 Thread Timo Sirainen
On 21 Nov 2014, at 06:34, Timo Sirainen t...@iki.fi wrote:

 Apparently this list has somehow broken.. Not really sure what the problem 
 is, lets see what happens to this mail.

Easy enough :) Looks like mailman hadn't automatically started after server 
reboot for some reason.


Re: Static build failure

2014-11-20 Thread Timo Sirainen
On 21 Nov 2014, at 03:54, Bernd Kuhls bernd.ku...@t-online.de wrote:

 this patch fixes a symbol conflict in static build with MySQL enabled
 
 Compile error log:
 http://autobuild.buildroot.net/results/9b5/9b536926b3b2bf82c683b48e9697a220
 f1b4bf33/build-end.log

Similar to code already in sha1.h, an easier fix is to add to strnum.h

#define str_to_time str_to_time_libmysqlclient_craps_all_over

Although both of these should be added inside #ifdef BUILD_MYSQL I think..


UNIX perms appear ok (ACL/MAC wrong?)

2014-11-20 Thread [FnG] Lambik
Hi,

I am struggling with Postfix/SASL/Dovecot-IMAP setup with ~/Maildir/ setup.

Receiving the mail works fine, but viewing the mail(+listing) is failing.
The setup I use is simple unix users from etc/passwd, (pam thru SASL) as I
only host for a few people.
The ~/Maildir folder has the ownership of the user, not mail or vmail, as I
would have expected from the master.cf from Postfix,
the permissions are drwx.- - - .- - -  user  groupMaildir
the {USER} and {GROUP} are the user/group of the person logging in on IMAP

Can someone help me explain what is going wrong, or how I can increase
debugging ? (I did the auth debugging, that was all fine)
If you require more information please let me know.
Thank you in advance,

Lambik

Versions :
Dovecot   2.2.15
Postfix 2.11.0
saslauthd 2.1.26
linux : opensuse 13.1 factory

-[error.log]---
dovecot: imap-login: Login: user={USER}, method=PLAIN,
rip=123.123.123.123, lip=12.34.56.78, mpid=18385, TLS,
session=0OEra/8HNADUuyG9
dovecot: imap({USER}): Debug: Effective uid=1014, gid=1003,
home=/home/{user}
dovecot: imap({USER}): Debug: Namespace inbox: type=private,
prefix=~/Maildir/, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes
location=maildir:~/Maildir
dovecot: imap({USER}): Debug: maildir++: root=/home/{user}/Maildir, index=,
indexpvt=, control=, inbox=/home/{user}/Maildir, alt=
dovecot: imap({USER}): Debug: Namespace : type=private, prefix=, sep=,
inbox=no, hidden=yes, list=no, subscriptions=no location=fail::LAYOUT=none
dovecot: imap({USER}): Debug: none: root=, index=, indexpvt=, control=,
inbox=, alt=
dovecot: imap({USER}): Error: open(/home/{user}/Maildir/dovecot.index.log)
failed: Permission denied (euid=1014({USER}) egid=1003({GROUP}) UNIX perms
appear ok (ACL/MAC wrong?))
dovecot: imap({USER}): Error:
file_dotlock_create(/home/{user}/Maildir/dovecot-uidlist) failed:
Permission denied (euid=1014({USER}) egid=1003({GROUP}) UNIX perms appear
ok (ACL/MAC wrong?))
dovecot: imap({USER}): Error: open(/home/{user}/Maildir/dovecot-uidlist)
failed: Permission denied
dovecot: imap({USER}): Error:
file_dotlock_open(/home/{user}/Maildir/.Sent/dovecot.index.log) failed:
Permission denied (euid=1014({USER}) egid=1003({GROUP}),
access(/home/{user}/Maildir/.Sent/dovecot.index.log, 4) failed: No such
file or directory)
dovecot: imap({USER}): Error:
file_dotlock_create(/home/{user}/Maildir/.Sent/dovecot-uidlist) failed:
Permission denied (euid=1014({USER}) egid=1003({GROUP}),
access(/home/{user}/Maildir/.Sent/dovecot-uidlist, 4) failed: No such file
or directory)
dovecot: imap({USER}): Error:
file_dotlock_create(/home/{user}/Maildir/.Sent/dovecot-uidlist) failed:
Permission denied (euid=1014({USER}) egid=1003({GROUP}),
access(/home/{user}/Maildir/.Sent/dovecot-uidlist, 4) failed: No such file
or directory)
dovecot: imap({USER}): Error: opendir(/home/{user}/Maildir/.Sent/new)
failed: Permission denied (euid=1014({USER}) egid=1003({GROUP}) UNIX perms
appear ok (ACL/MAC wrong?))
dovecot: imap({USER}): Error:
file_dotlock_create(/home/{user}/Maildir/.Sent/dovecot-uidlist) failed:
Permission denied (euid=1014({USER}) egid=1003({GROUP}),
access(/home/{user}/Maildir/.Sent/dovecot-uidlist, 4) failed: No such file
or directory)
dovecot: imap({USER}): Error:
file_dotlock_open(/home/{user}/Maildir/.Sent/dovecot.index.log) failed:
Permission denied (euid=1014({USER}) egid=1003({GROUP}),
access(/home/{user}/Maildir/.Sent/dovecot.index.log, 4) failed: No such
file or directory)
dovecot: imap({USER}): Error:
file_dotlock_create(/home/{user}/Maildir/.Sent/dovecot-uidlist) failed:
Permission denied (euid=1014({USER}) egid=1003({GROUP}),
access(/home/{user}/Maildir/.Sent/dovecot-uidlist, 4) failed: No such file
or directory)
dovecot: imap({USER}): Error:
file_dotlock_create(/home/{user}/Maildir/.Sent/dovecot-uidlist) failed:
Permission denied (euid=1014({USER}) egid=1003({GROUP}),
access(/home/{user}/Maildir/.Sent/dovecot-uidlist, 4) failed: No such file
or directory)
dovecot: imap({USER}): Error: opendir(/home/{user}/Maildir/.Sent/new)
failed: Permission denied (euid=1014({USER}) egid=1003({GROUP}) UNIX perms
appear ok (ACL/MAC wrong?))
dovecot: imap({USER}): Error:
file_dotlock_create(/home/{user}/Maildir/.Sent/dovecot-uidlist) failed:
Permission denied (euid=1014({USER}) egid=1003({GROUP}),
access(/home/{user}/Maildir/.Sent/dovecot-uidlist, 4) failed: No such file
or directory)
---

--[master.cf
]--
smtp  inet  n   -   n   -   -   smtpd
smtps inet  n   -   n   -   -   smtpd
-o smtpd_tls_wrappermode=yes
pickupunix  n   -   n   60  1   pickup
cleanup   unix  n   -   n   -   0   cleanup
qmgr  unix  

Re: stop deletion of mails

2014-11-20 Thread Marc Stürmer


Zitat von Edwardo Garcia wdgar...@gmail.com:


Is possible with dovecot?

Legal department have told us we need to stop anyone from delete email
on corporate mail server, so nobody, even managers can not anymore
delete any mail?


You want to use something like e.g. Mailpiler for that task  
(http://www.mailpiler.org/en/index.html), Mailstore  
(http://www.mailstore.com/) or Benno (http://www.openbenno.org/).


This is the stuff your legal departmant is looking for.


Re: Mailing list test

2014-11-20 Thread Max Pyziur

On Fri, 21 Nov 2014, Timo Sirainen wrote:


Apparently this list has somehow broken.. Not really sure what the problem is, 
lets see what happens to this mail.


Any chance of putting [dovecot] back in the subject line?

Thanks.

Max Pyziur
p...@brama.com


Re: Mailing list test

2014-11-20 Thread Robert Moskowitz


On 11/20/2014 04:34 PM, Timo Sirainen wrote:

Apparently this list has somehow broken.. Not really sure what the problem is, 
lets see what happens to this mail.

thanks for fixing it.  I thought the problem was on my end with my new 
server and got yelled at on the postfix list on some of my assumptions!


New to actually running dovecot.  Old server was courier-mail.

Though I worked off and on developing this server for a year!


Re: Mailing list test

2014-11-20 Thread Reindl Harald


Am 20.11.2014 um 23:06 schrieb Max Pyziur:

On Fri, 21 Nov 2014, Timo Sirainen wrote:


Apparently this list has somehow broken.. Not really sure what the
problem is, lets see what happens to this mail.


Any chance of putting [dovecot] back in the subject line?


how did the words DKIM and DMARC not reach you?



signature.asc
Description: OpenPGP digital signature


spam folder and POP users

2014-11-20 Thread Robert Moskowitz
I am new to actually running dovecot.  I actually still use POP as I 
have for YEARS and thunderbird does not make it easy to convert to IMAP...



My server is moving all tagged spam into the IMAP spam folder.  Very 
nice for the IMAP users, but not for the POP users.  Of course the 
server don't know, and the mysql database for users does not have any 
flags for this.  Don't want my server to fill up with spam from POP 
users that don't know to check via IMAP.


I am using roundcubemail for the webmail IMAP client.  Is there any way 
for POP users to indicate that they do not want spam so nicely auto 
moved to the IMAP spam folder?


Re: spam folder and POP users

2014-11-20 Thread Reindl Harald


Am 20.11.2014 um 23:29 schrieb Robert Moskowitz:

I am new to actually running dovecot.  I actually still use POP as I
have for YEARS and thunderbird does not make it easy to convert to IMAP...

My server is moving all tagged spam into the IMAP spam folder.  Very
nice for the IMAP users, but not for the POP users.  Of course the
server don't know, and the mysql database for users does not have any
flags for this.  Don't want my server to fill up with spam from POP
users that don't know to check via IMAP.

I am using roundcubemail for the webmail IMAP client.  Is there any way
for POP users to indicate that they do not want spam so nicely auto
moved to the IMAP spam folder?


dovecot just don't know if it is a POP3 user
it is just a user

what about setup a better spam filter so you can deliver the 5-10 spam 
messages just to INBOX with [SPAM] added to the subject?


to give you some numbers: 1200 users, 150 flagged messages per day



signature.asc
Description: OpenPGP digital signature


Re: spam folder and POP users

2014-11-20 Thread Gedalya

On 11/20/2014 05:29 PM, Robert Moskowitz wrote:
I am new to actually running dovecot.  I actually still use POP as I 
have for YEARS and thunderbird does not make it easy to convert to 
IMAP...



My server is moving all tagged spam into the IMAP spam folder. Very 
nice for the IMAP users, but not for the POP users.  Of course the 
server don't know, and the mysql database for users does not have any 
flags for this.  Don't want my server to fill up with spam from POP 
users that don't know to check via IMAP.


I am using roundcubemail for the webmail IMAP client.  Is there any 
way for POP users to indicate that they do not want spam so nicely 
auto moved to the IMAP spam folder?


How do you even define a pop user - it's not an easy thing to 
determine. Someone who hasn't logged in via IMAP in x days? Perhaps 
implement a lastlogin_imap field?

You really should just have a flag in your database.
Otherwise, just purge from the spam folder messages older than X days 
(preferably after notifying the users, of course).
Another (rather annoying) feature some people have is to have a spam 
report delivered to Inbox daily, listing messages delivered to Spam in 
the past 24 hours, you can script that around doveadm fetch.


Re: spam folder and POP users

2014-11-20 Thread Robert Moskowitz


On 11/20/2014 05:35 PM, Reindl Harald wrote:


Am 20.11.2014 um 23:29 schrieb Robert Moskowitz:

I am new to actually running dovecot.  I actually still use POP as I
have for YEARS and thunderbird does not make it easy to convert to 
IMAP...


My server is moving all tagged spam into the IMAP spam folder. Very
nice for the IMAP users, but not for the POP users.  Of course the
server don't know, and the mysql database for users does not have any
flags for this.  Don't want my server to fill up with spam from POP
users that don't know to check via IMAP.

I am using roundcubemail for the webmail IMAP client.  Is there any way
for POP users to indicate that they do not want spam so nicely auto
moved to the IMAP spam folder?


dovecot just don't know if it is a POP3 user


That I know.  Though since it is using a mysql database of users, I 
COULD add a column designating this.  But it would be difficult to 
maintain.  Better perhaps for dovecot NOT to be so nice to move the 
messages and leave that to the client.



it is just a user

what about setup a better spam filter so you can deliver the 5-10 spam 
messages just to INBOX with [SPAM] added to the subject?


Well ***SPAM*** is added to the subject.  And it seems that dovecot is 
being really nice to act on that and move it.  Now I have to remember 
what I did to configure this and unconfigure this.  I did much of the 
work long ago, set it aside, built a new box,,,  So now I am learning 
what I did.




to give you some numbers: 1200 users, 150 flagged messages per day

I only have 12 users.  Small time, I know.  And some have 1000 flagged 
messages per day.


Found It - Re: spam folder and POP users

2014-11-20 Thread Robert Moskowitz


On 11/20/2014 05:29 PM, Robert Moskowitz wrote:
I am new to actually running dovecot.  I actually still use POP as I 
have for YEARS and thunderbird does not make it easy to convert to 
IMAP...



My server is moving all tagged spam into the IMAP spam folder. Very 
nice for the IMAP users, but not for the POP users.  Of course the 
server don't know, and the mysql database for users does not have any 
flags for this.  Don't want my server to fill up with spam from POP 
users that don't know to check via IMAP.


I am using roundcubemail for the webmail IMAP client.  Is there any 
way for POP users to indicate that they do not want spam so nicely 
auto moved to the IMAP spam folder?


Obviously I picked this up and did not think through the results. Seemed 
good at the time...


mkdir /home/sieve
cat EOF/home/sieve/globalfilter.sieve || exit 1
require fileinto;
  if exists X-Spam-Flag {
  if header :contains X-Spam-Flag NO {
  } else {
  fileinto Spam;
  stop;
  }
  }
  if header :contains subject [***SPAM***] {
fileinto Spam;
stop;
  }
EOF

chown -R vmail:mail /home/sieve



So one option is just to disable this.  Another is to work out how each 
user can do this if they want...


Re: spam folder and POP users

2014-11-20 Thread Robert Moskowitz


On 11/20/2014 05:37 PM, Gedalya wrote:

On 11/20/2014 05:29 PM, Robert Moskowitz wrote:
I am new to actually running dovecot.  I actually still use POP as I 
have for YEARS and thunderbird does not make it easy to convert to 
IMAP...



My server is moving all tagged spam into the IMAP spam folder. Very 
nice for the IMAP users, but not for the POP users.  Of course the 
server don't know, and the mysql database for users does not have any 
flags for this.  Don't want my server to fill up with spam from POP 
users that don't know to check via IMAP.


I am using roundcubemail for the webmail IMAP client.  Is there any 
way for POP users to indicate that they do not want spam so nicely 
auto moved to the IMAP spam folder?


How do you even define a pop user - it's not an easy thing to determine.


Some that connects to port 110 using a POP3 client.  Remember those?  
Back to the days of Eudora, perhaps?  Pete Resnick still attends IETF.


Of course one time they attach with POP3, another with IMAP so I did 
find out what I did and now I have to decide what to do about it. 
Problem with taking such a big move in one, and then seeing how it 
works.  Or not.


Someone who hasn't logged in via IMAP in x days? Perhaps implement a 
lastlogin_imap field?

You really should just have a flag in your database.
Otherwise, just purge from the spam folder messages older than X days 
(preferably after notifying the users, of course).


Something to think about.  Might be good for those that are not IMAP users.

Another (rather annoying) feature some people have is to have a spam 
report delivered to Inbox daily, listing messages delivered to Spam 
in the past 24 hours, you can script that around doveadm fetch.


but basically the above purge would result in a daily message:  I am 
going to purge old spam if you don't do it yourself.


Re: Found It - Re: spam folder and POP users

2014-11-20 Thread Gedalya


On 11/20/2014 05:51 PM, Robert Moskowitz wrote:


On 11/20/2014 05:29 PM, Robert Moskowitz wrote:
I am new to actually running dovecot.  I actually still use POP as I 
have for YEARS and thunderbird does not make it easy to convert to 
IMAP...



My server is moving all tagged spam into the IMAP spam folder. Very 
nice for the IMAP users, but not for the POP users.  Of course the 
server don't know, and the mysql database for users does not have any 
flags for this.  Don't want my server to fill up with spam from POP 
users that don't know to check via IMAP.


I am using roundcubemail for the webmail IMAP client.  Is there any 
way for POP users to indicate that they do not want spam so nicely 
auto moved to the IMAP spam folder?


Obviously I picked this up and did not think through the results. 
Seemed good at the time...


mkdir /home/sieve
cat EOF/home/sieve/globalfilter.sieve || exit 1
require fileinto;
  if exists X-Spam-Flag {
  if header :contains X-Spam-Flag NO {
  } else {
  fileinto Spam;
  stop;
  }
  }
  if header :contains subject [***SPAM***] {
fileinto Spam;
stop;
  }
EOF

chown -R vmail:mail /home/sieve



So one option is just to disable this.  Another is to work out how 
each user can do this if they want...


You're already using roundcube, so just enable managesieve and the 
roundcube managesieve plugin, and let every user configure for 
themselves how to react to the X-Spam-Flag header.
You can drop in a few sieve scripts as suggestions and they can enable 
the one they like, or none, if they prefer to use their local mail 
client for sorting this out.


IMAP child killed with signal 11

2014-11-20 Thread Simon Lawrence
Hello,

We’re running a cluster of dovecot servers for a large amount of users. It’s 
been working pretty well except we are seeing occasional fatal error messages.

Here is a sample error message that we are seeing:
Nov 20 19:51:29 ip-10-238-11-11 dovecot: imap(USER_HERE): Fatal: master: 
service(imap): child 796 killed with signal 11 (core dumped)

We are running dovecot 2.2.9 installed from apt-get on Ubuntu 14.04.

I’ve checked out the core dump and here is the stack trace:

Core was generated by `dovecot/imap [e22a36135b5f40'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7f83d63aa757 in mail_transaction_log_view_mark (view=0x7f83d804f8c0) 
at mail-transaction-log-view.c:794
794 mail-transaction-log-view.c: No such file or directory.
(gdb) bt
#0  0x7f83d63aa757 in mail_transaction_log_view_mark (view=0x7f83d804f8c0) 
at mail-transaction-log-view.c:794
#1  0x7f83d63a3796 in view_sync_have_expunges (view=0x7f83d804f7e0) at 
mail-index-view-sync.c:223
#2  mail_index_view_sync_begin (view=0x7f83d804f7e0, 
flags=flags@entry=MAIL_INDEX_VIEW_SYNC_FLAG_NOEXPUNGES) at 
mail-index-view-sync.c:583
#3  0x7f83d6382168 in index_mailbox_sync_init 
(box=box@entry=0x7f83d8049f80, 
flags=flags@entry=(MAILBOX_SYNC_FLAG_FAST | MAILBOX_SYNC_FLAG_NO_EXPUNGES), 
failed=optimized out) at index-sync.c:226
#4  0x7f83d632983b in maildir_storage_sync_init (box=0x7f83d8049f80, 
flags=(MAILBOX_SYNC_FLAG_FAST | MAILBOX_SYNC_FLAG_NO_EXPUNGES))
at maildir-sync.c:1120
#5  0x7f83d6356cf9 in mailbox_sync_init (box=box@entry=0x7f83d8049f80, 
flags=flags@entry=(MAILBOX_SYNC_FLAG_FAST | MAILBOX_SYNC_FLAG_NO_EXPUNGES)) 
at mail-storage.c:1668
#6  0x7f83d6835e5e in imap_sync_init (client=client@entry=0x7f83d8046b60, 
box=optimized out, imap_flags=(unknown: 0), 
flags=(MAILBOX_SYNC_FLAG_FAST | MAILBOX_SYNC_FLAG_NO_EXPUNGES)) at 
imap-sync.c:230
#7  0x7f83d6836af0 in cmd_sync_client (sync_cmd=0x7f83d8047760) at 
imap-sync.c:739
#8  cmd_sync_delayed_real (client=0x7f83d8046b60) at imap-sync.c:877
#9  cmd_sync_delayed (client=client@entry=0x7f83d8046b60) at imap-sync.c:885
#10 0x7f83d682db61 in client_handle_input 
(client=client@entry=0x7f83d8046b60) at imap-client.c:906
#11 0x7f83d682de35 in client_input (client=0x7f83d8046b60) at 
imap-client.c:933
#12 0x7f83d608c247 in io_loop_call_io (io=0x7f83d8047660) at ioloop.c:388
#13 0x7f83d608cfd7 in io_loop_handler_run 
(ioloop=ioloop@entry=0x7f83d8030760) at ioloop-epoll.c:220
#14 0x7f83d608bde8 in io_loop_run (ioloop=0x7f83d8030760) at ioloop.c:412
#15 0x7f83d603cc93 in master_service_run (service=0x7f83d80305f0, 
callback=optimized out) at master-service.c:566
#16 0x7f83d68222f4 in main (argc=2, argv=0x7f83d8030390) at main.c:400


Here are the settings we’re running (I’ve removed our domain and path 
information):

# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-24-generic x86_64 Ubuntu 14.04.1 LTS 
auth_mechanisms = plain login
base_dir = /var/run/dovecot/
default_client_limit = 1024
default_process_limit = 256
default_vsz_limit = 1 G
disable_plaintext_auth = no
mail_privileged_group = mail
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocols =  imap lmtp pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
}
service imap-login {
  inet_listener imap {
port = 143
  }
  process_min_avail = 4
  service_count = 0
  vsz_limit = 128 M
}
service imap-postlogin {
  executable = script-login /real/location/to/the/script.sh
  user = vmail
}
service imap {
  client_limit = 1
  executable = imap imap-postlogin
  process_limit = 65536
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service pop3-login {
  inet_listener pop3 {
port = 110
  }
  service_count = 0
}
ssl = no
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
verbose_proctitle = yes
protocol lmtp {
  hostname = real.domain.here
  postmaster_address = postmas...@real.domain.here
}


This seems like some sort of bug within dovecot since we’re seeing a seg fault, 
but any help would be appreciated. Thanks!

Re: Found It - Re: spam folder and POP users

2014-11-20 Thread Robert Moskowitz


On 11/20/2014 05:57 PM, Gedalya wrote:


On 11/20/2014 05:51 PM, Robert Moskowitz wrote:


On 11/20/2014 05:29 PM, Robert Moskowitz wrote:
I am new to actually running dovecot.  I actually still use POP as I 
have for YEARS and thunderbird does not make it easy to convert to 
IMAP...



My server is moving all tagged spam into the IMAP spam folder. Very 
nice for the IMAP users, but not for the POP users.  Of course the 
server don't know, and the mysql database for users does not have 
any flags for this.  Don't want my server to fill up with spam from 
POP users that don't know to check via IMAP.


I am using roundcubemail for the webmail IMAP client.  Is there any 
way for POP users to indicate that they do not want spam so nicely 
auto moved to the IMAP spam folder?


Obviously I picked this up and did not think through the results. 
Seemed good at the time...


mkdir /home/sieve
cat EOF/home/sieve/globalfilter.sieve || exit 1
require fileinto;
  if exists X-Spam-Flag {
  if header :contains X-Spam-Flag NO {
  } else {
  fileinto Spam;
  stop;
  }
  }
  if header :contains subject [***SPAM***] {
fileinto Spam;
stop;
  }
EOF

chown -R vmail:mail /home/sieve



So one option is just to disable this.  Another is to work out how 
each user can do this if they want...


You're already using roundcube, so just enable managesieve and the 
roundcube managesieve plugin, and let every user configure for 
themselves how to react to the X-Spam-Flag header.
You can drop in a few sieve scripts as suggestions and they can enable 
the one they like, or none, if they prefer to use their local mail 
client for sorting this out.



I was just figuring that out.  Kind of tossed everything into the sink 
and now I have to sort it out.


Let the IMAP users (most likely Roundcube) deal with it themselves and 
let the POP3 users continue to get their spam to eat.


Unable to see virtual users

2014-11-20 Thread Randall Gellens
I have a new Dovecot v2.2.9 installation and am having trouble 
getting virtual users recognized.


Also, the example configuration listed on the Wiki generates config errors.

Note that I haven't tried running dovecot yet, I wanted to verify 
that the config looked good first.


First, my configuration.  I'm trying to use /etc/dovecot/users as my 
combined userdb and passdb file, with all users having a UID/GID of 
vmail, and a home directory of /local/mnt/home/user


--

$ sudo doveconf -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-39-generic x86_64 Ubuntu 14.04.1 LTS ext4
auth_verbose = yes
log_timestamp = %Y-%m-%d %H:%M:%S 
mail_location = mdbox:/local/mnt/mail/%n
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 {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
}
passdb {
  args = username_format=%n /etc/dovecot/users
  driver = passwd-file
}
passdb {
  driver = pam
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
postmaster_address = ra...@qti.qualcomm.com
protocols =  imap sieve pop3
ssl_cert = /etc/dovecot/dovecot.pem
ssl_key = /etc/dovecot/private/dovecot.pem
userdb {
  args = username_format=%n /etc/dovecot/users
  default_fields = uid=vmail gid=vmail home=/local/mnt/home/%n
  driver = passwd-file
}
userdb {
  driver = passwd
}

--

Next, my /etc/dovecot/users file:

$ cat /etc/dovecot/users
fred:x
test:{SSHA}amehbJZYxKWuIbywINVNWxKcPrWi27a+
poptest2:x
poptest3:x

--

If I ask dovecot what it knows about user 'test' it says the user 
doesn't exist:


$ sudo doveadm user test
field   valueuserdb lookup: user test doesn't exist

--

If I ask about a user in /etc/passwd, it finds it:

$ sudo doveadm user nobody
field   value
uid 65534
gid 65534
home/nonexistent
mailmdbox:/local/mnt/mail/nobody
system_groups_user  nobody

--

As an aside, when I copied the sample config entries from 
http://wiki2.dovecot.org/UserDatabase it got config errors:


userdb {
  driver = passwd-file
  args = username_format=%n /etc/dovecot/users

  default_fields = uid=vmail gid=vmail
  override_fields =

  skip = never

  result_failure = continue
  result_internalfail = continue
  result_success = return-ok
}

The 'skip', 'result_failure', etc. entries all generated config 
errors as being unknown.  Since these were just explicitly setting 
config variables to their default values, I deleted them.  It does 
seem odd that the config sample from the Wiki generated errors though.




--
Randall Gellens
Opinions are personal;facts are suspect;I speak for myself only
-- Randomly selected tag: ---
The difference between stupidity and genius is that genius has its limits.
   --Albert Einstein


Re: spam folder and POP users

2014-11-20 Thread Joseph Tam

Robert Moskowitz writes:


My server is moving all tagged spam into the IMAP spam folder.  Very
nice for the IMAP users, but not for the POP users.  Of course the
server don't know, and the mysql database for users does not have any
flags for this.  Don't want my server to fill up with spam from POP
users that don't know to check via IMAP.


You can contort the virtual plugin to fuse your user's INBOX and
spam box together into a virtual INBOX:

http://wiki2.dovecot.org/Plugins/Virtual
(See section Virtual POP3 INBOX)

This turns the problem from a delivery problem into a reading (or
presentation) problem.

Seems sort of klunky though.  In my opinion, your energy is better
invested in converting your POP3 holdouts to IMAP.

Joseph Tam jtam.h...@gmail.com


Re: spam folder and POP users

2014-11-20 Thread Robert Moskowitz


On 11/20/2014 07:55 PM, Joseph Tam wrote:

Robert Moskowitz writes:


My server is moving all tagged spam into the IMAP spam folder.  Very
nice for the IMAP users, but not for the POP users.  Of course the
server don't know, and the mysql database for users does not have any
flags for this.  Don't want my server to fill up with spam from POP
users that don't know to check via IMAP.


You can contort the virtual plugin to fuse your user's INBOX and
spam box together into a virtual INBOX:

http://wiki2.dovecot.org/Plugins/Virtual
(See section Virtual POP3 INBOX)

This turns the problem from a delivery problem into a reading (or
presentation) problem.

Seems sort of klunky though.  In my opinion, your energy is better
invested in converting your POP3 holdouts to IMAP.


Agreed.  I am looking at what it takes to do this with Thunderbird, as I 
am the biggest holdout!  The recommended way is HARD.  I have 20 years 
and gigabytes of emails in local pop folders that I do not want to loose 
or have replicated on the server.  Somewhere is the magic goo for this.  
Once I figure it out for myself, it will be easy for the other users.


Re: Dovecot POP3 STARTTLS works on Thunderbird but not on Gmail

2014-11-20 Thread Sean Kamath
http://googleonlinesecurity.blogspot.com/2014/09/gradually-sunsetting-sha-1.html

??

Sean

On Nov 16, 2014, at 5:39 AM, Aleš Grm ales@kopitarna.eu wrote:

 Ok, I tried on port 995, and on Gmail I get SSL error: unable to verify
 the first certificate. Certificate is not self-signed (using StartCOM).
 The log now shows:
 
 Nov 16 14:37:52 mail dovecot: auth: Debug: auth client connected (pid=31923)
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x10, ret=1:
 before/accept initialization [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: before/accept initialization [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 read client hello A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 write server hello A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 write certificate A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 write server done A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 flush data [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2002,
 ret=-1: SSLv3 read client certificate A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2002,
 ret=-1: SSLv3 read client certificate A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 read client key exchange A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 read finished A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 write session ticket A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 write change cipher spec A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 write finished A [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2001,
 ret=1: SSLv3 flush data [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x20, ret=1:
 SSL negotiation finished successfully [209.85.213.23]
 Nov 16 14:37:52 mail dovecot: pop3-login: Warning: SSL: where=0x2002,
 ret=1: SSL negotiation finished successfully [209.85.213.23]
 Nov 16 14:37:53 mail dovecot: pop3-login: Warning: SSL alert: where=0x4008,
 ret=256: warning close notify [209.85.213.23]
 Nov 16 14:37:53 mail dovecot: pop3-login: Disconnected (no auth attempts in
 1 secs): user=, rip=209.85.213.23, lip=192.168.100.94, TLS: Disconnected,
 session=duAK+PkH5QDRVdUX
 ^C
 
 Could the form of public part of certificate be wrong? I'm using only .CRT.
 
 Kopitarna Sevnica d. d.
 
 Prvomajska ulica 8
 8290 SEVNICA
 SLOVENIA
 www.kopitarna.eu
 Cell: +386 31 899 993
 Land: +386 7 81 63 440
 
 On 16 November 2014 14:19, Reindl Harald h.rei...@thelounge.net wrote:
 
 
 Am 16.11.2014 um 14:05 schrieb Aleš Grm:
 
 I have configured Dovecot to work perfectly on Thundrebird using SSL
 certificates with STARTTLS on port 110. When I try to add this account on
 Gmail I get the error:
 
 In Gmail my settings include port 110 and the use of SSL is checked.
 Dovecot configuration:
 
 Any idea why does it work with Thunderbird and not with Gmail?
 
 
 surely - gmail wants 995 instead 110 (means not STARTTLS) and don't accept
 self signed certificates BTW
 
 
 


Re: how to recover mails - dovecot 2.2.13

2014-11-20 Thread Alessio Cecchi


Il 20/11/2014 09:33, Götz Reinicke - IT Koordinator ha scritto:

Question: We use maildir. Can I just copy the old mails from e.g.

user-backup/Maildir/curl/*

to

user/Maildir/curl/*

Or which steps are needed? rebuilding any index or something etc ?
Yes, you can move Maildir/cur/ and new/ to other account and delete all 
dovecot.* cache/log files in Maildir/. At the frst login dovecot rebuild 
its cache and show your emails.


Re: spam folder and POP users

2014-11-20 Thread Frank Elsner
On Thu, 20 Nov 2014 17:29:05 -0500 Robert Moskowitz wrote:

  [ ... ]

 I am using roundcubemail for the webmail IMAP client.  Is there any way 
 for POP users to indicate that they do not want spam so nicely auto 
 moved to the IMAP spam folder?

Mixing POP and IMAP is really bad due to many reasons.
Peopla always complain where is my mail when using a web interface
after they have POPped at home.

You should consider to switch off POP. POP is for people living in caves.


Greeting, Frank