Users cannot access to their imap-folders

2017-04-10 Thread Anton Shilov via Info-cyrus

Users cannot access to their imap-folders.
Sometimes (once or twice a week) users complains that they cannot connect to 
their mailboxes and read emails. At the same time I see such records in maillog:
"Apr 10 15:01:01 mailserv postfix/lmtp[22843]: D64651001D37: to=< 
u...@mailserv.example.com >, orig_to=< u...@example.com >, 
relay=mailserv.example.com[/var/lib/imap/socket/lmtp], delay=300, 
delays=0.13/0/0/300, dsn=4.4.2, status=deferred (conversation with 
mailserv.example.com[/var/lib/imap/socket/lmtp] timed out while sending MAIL 
FROM)».
It means mail queue increases
Also I find out lots of "PID-files" in /dev/shm/cyrus-imapd/proc which don't 
contain info of linked imap-folder. For example: 
"pc-user.example.com [192.168.0.11] user"
It's unhealthy situation and I don't understannd what reason is. In order to 
help users I just kill their IMAP-process and make reconstruct mailbox. Please 
help me with investigation of the problems.
My setup is:

Static hostname: mailserv
Icon name: computer-vm
Chassis: vm
Machine ID: cbb779ad0b103a10ec75c10c452e0f71
Boot ID: c31a27599dc84971902e6c70dca26c18
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-514.6.1.el7.x86_64
Architecture: x86-64

name : Cyrus IMAPD
version : v2.4.17-Fedora-RPM-2.4.17-8.el7_1 d1df8aff 2012-12-01
vendor : Project Cyrus
support-url:  http://www.cyrusimap.org
os : Linux
os-version : 3.10.0-514.6.1.el7.x86_64
environment: Built w/Cyrus SASL 2.1.26
Running w/Cyrus SASL 2.1.26
Built w/Berkeley DB 5.3.21: (May 11, 2012)
Running w/Berkeley DB 5.3.21: (May 11, 2012)
Built w/OpenSSL 1.0.1e-fips 11 Feb 2013
Running w/OpenSSL 1.0.1e-fips 11 Feb 2013
Built w/zlib 1.2.7
Running w/zlib 1.2.7
CMU Sieve 2.4
TCP Wrappers
NET-SNMP
mmap = shared
lock = fcntl
nonblock = fcntl
idle = idled
Server Wide:
freespace: 1820105352

imapd.conf

debug: no
commandmintimer: 2
configdirectory: /var/lib/imap
partition-default: /var/spool/mail
proc_path: /dev/shm/cyrus-imapd/proc
mboxname_lockpath: /dev/shm/cyrus-imapd/mboxname_lock
duplicate_db_path: /dev/shm/cyrus-imapd/duplicate_db
statuscache_db_path: /dev/shm/cyrus-imapd/statuscache_db
allowplaintext: yes
allowallsubscribe: yes
allowusermoves: yes
imapidlepoll: 10
idlemethod: idled
imapidresponse: yes
admins: cyrus
lmtp_admins: cyrus
singleinstancestore: yes
duplicatesuppression: yes
reject8bit: no
pass8bit: yes
munge8bit: no
lmtp_downcase_rcpt: no
sieveusehomedir: false
sievedir: /var/lib/imap/sieve
duplicate_db: skiplist
mboxlist_db: skiplist
postmaster: postmaster
postuser: shared
lmtp_over_quota_perm_failure: yes
lmtp_strict_quota: yes
quotawarn: 98
sendmail: /usr/sbin/sendmail
hashimapspool: 0
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN LOGIN
tls_cert_file: /var/lib/imap/SSL.crt
tls_key_file: /var/lib/imap/SSL.key
tls_ca_file: /var/lib/imap/CA_SSL.crt
tls_ca_path: /var/lib/imap
tcp_keepalive: yes
tcp_keepalive_cnt: 3
tcp_keepalive_intvl: 10
tcp_keepalive_idle: 180
temp_path: /tmp
telemetry_bysessionid: yes
timeout: 40
imapidletimeout: 0
expunge_mode: delayed
expunge_days: 30
deletedprefix: DELETED
delete_mode: immediate
flushseenstate: 1
---
cyrus.conf
---
START {
recover<->cmd="ctl_cyrusdb -r"
idled><-->cmd="idled"
}
SERVICES {
imap cmd="imapd" listen="imap" proto=tcp4 prefork=5
imaps cmd="imapd -s" listen="imaps" proto=tcp4 prefork=10
pop3 cmd="pop3d" listen="pop3" proto=tcp4 prefork=3
pop3s cmd="pop3d -s" listen="pop3s" proto=tcp4 prefork=3
sieve cmd="timsieved" listen="sieve" proto=tcp4 prefork=0
lmtpunix<>cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
..
}
EVENTS {
checkpoint<-->cmd="ctl_cyrusdb -c" period=30
delprune<>cmd="cyr_expire -E 3" at=0400
tlsprune<>cmd="tls_prune" at=0400
squatter cmd="squatter -i" at=0600
}

Best regards, Anton
2017-Apr-11


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Users cannot access to their imap-folders

2017-04-24 Thread Anton Shilov via Info-cyrus

I managed to find who faced to the same problem  
https://github.com/cyrusimap/cyrus-imapd/issues/1599 . But the bug still have 
open status


>Вторник, 11 апреля 2017, 12:18 +07:00 от Anton Shilov via Info-cyrus < 
>info-cyrus@lists.andrew.cmu.edu >:
>
>Users cannot access to their imap-folders.
>Sometimes (once or twice a week) users complains that they cannot connect to 
>their mailboxes and read emails. At the same time I see such records in 
>maillog:
>"Apr 10 15:01:01 mailserv postfix/lmtp[22843]: D64651001D37: to=< 
>u...@mailserv.example.com >, orig_to=< u...@example.com >, 
>relay=mailserv.example.com[/var/lib/imap/socket/lmtp], delay=300, 
>delays=0.13/0/0/300, dsn=4.4.2, status=deferred (conversation with 
>mailserv.example.com[/var/lib/imap/socket/lmtp] timed out while sending MAIL 
>FROM)».
>It means mail queue increases
>Also I find out lots of "PID-files" in /dev/shm/cyrus-imapd/proc which don't 
>contain info of linked imap-folder. For example: 
>"pc-user.example.com [192.168.0.11] user"
>It's unhealthy situation and I don't understannd what reason is. In order to 
>help users I just kill their IMAP-process and make reconstruct mailbox. Please 
>help me with investigation of the problems.
>My setup is:
>
>Static hostname: mailserv
>Icon name: computer-vm
>Chassis: vm
>Machine ID: cbb779ad0b103a10ec75c10c452e0f71
>Boot ID: c31a27599dc84971902e6c70dca26c18
>Virtualization: kvm
>Operating System: CentOS Linux 7 (Core)
>CPE OS Name: cpe:/o:centos:centos:7
>Kernel: Linux 3.10.0-514.6.1.el7.x86_64
>Architecture: x86-64
>
>name : Cyrus IMAPD
>version : v2.4.17-Fedora-RPM-2.4.17-8.el7_1 d1df8aff 2012-12-01
>vendor : Project Cyrus
>support-url:  http://www.cyrusimap.org
>os : Linux
>os-version : 3.10.0-514.6.1.el7.x86_64
>environment: Built w/Cyrus SASL 2.1.26
>Running w/Cyrus SASL 2.1.26
>Built w/Berkeley DB 5.3.21: (May 11, 2012)
>Running w/Berkeley DB 5.3.21: (May 11, 2012)
>Built w/OpenSSL 1.0.1e-fips 11 Feb 2013
>Running w/OpenSSL 1.0.1e-fips 11 Feb 2013
>Built w/zlib 1.2.7
>Running w/zlib 1.2.7
>CMU Sieve 2.4
>TCP Wrappers
>NET-SNMP
>mmap = shared
>lock = fcntl
>nonblock = fcntl
>idle = idled
>Server Wide:
>freespace: 1820105352
>
>imapd.conf
>
>debug: no
>commandmintimer: 2
>configdirectory: /var/lib/imap
>partition-default: /var/spool/mail
>proc_path: /dev/shm/cyrus-imapd/proc
>mboxname_lockpath: /dev/shm/cyrus-imapd/mboxname_lock
>duplicate_db_path: /dev/shm/cyrus-imapd/duplicate_db
>statuscache_db_path: /dev/shm/cyrus-imapd/statuscache_db
>allowplaintext: yes
>allowallsubscribe: yes
>allowusermoves: yes
>imapidlepoll: 10
>idlemethod: idled
>imapidresponse: yes
>admins: cyrus
>lmtp_admins: cyrus
>singleinstancestore: yes
>duplicatesuppression: yes
>reject8bit: no
>pass8bit: yes
>munge8bit: no
>lmtp_downcase_rcpt: no
>sieveusehomedir: false
>sievedir: /var/lib/imap/sieve
>duplicate_db: skiplist
>mboxlist_db: skiplist
>postmaster: postmaster
>postuser: shared
>lmtp_over_quota_perm_failure: yes
>lmtp_strict_quota: yes
>quotawarn: 98
>sendmail: /usr/sbin/sendmail
>hashimapspool: 0
>sasl_pwcheck_method: saslauthd
>sasl_mech_list: PLAIN LOGIN
>tls_cert_file: /var/lib/imap/SSL.crt
>tls_key_file: /var/lib/imap/SSL.key
>tls_ca_file: /var/lib/imap/CA_SSL.crt
>tls_ca_path: /var/lib/imap
>tcp_keepalive: yes
>tcp_keepalive_cnt: 3
>tcp_keepalive_intvl: 10
>tcp_keepalive_idle: 180
>temp_path: /tmp
>telemetry_bysessionid: yes
>timeout: 40
>imapidletimeout: 0
>expunge_mode: delayed
>expunge_days: 30
>deletedprefix: DELETED
>delete_mode: immediate
>flushseenstate: 1
>---
>cyrus.conf
>---
>START {
>recover<->cmd="ctl_cyrusdb -r"
>idled><-->cmd="idled"
>}
>SERVICES {
>imap cmd="imapd" listen="imap" proto=tcp4 prefork=5
>imaps cmd="imapd -s" listen="imaps" proto=tcp4 prefork=10
>pop3 cmd="pop3d" listen="pop3" proto=tcp4 prefork=3
>pop3s cmd="pop3d -s" listen="pop3s" proto=tcp4 prefork=3
>sieve cmd="timsieved" listen="sieve" proto=tcp4 prefork=0
>lmtpunix<>cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
>..
>}
>EVENTS {
>checkpoint<-->cmd="ctl_cyrusdb -c" period=30
>delprune<>cmd="cyr_expire -E 3" at=0400
>tlsprune<>cmd="tls_prune" at=0400
>squatter cmd="squatter -i" at=0600
>}
>
>Best regards, Anton
>2017-Apr-11
>
>
>Cyrus Home Page:  http://www.cyrusimap.org/
>List Archives/Info:  http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>To Unsubscribe:
>https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Cyrus imapd and automaticaly purge 3 months old emails only for some user

2017-05-11 Thread Anton Shilov via Info-cyrus

Hi Josef
Yes it's possible. You have to use "ipurge -f -d 90 " and any kind of schedooler system
Example: crontab
0 2 * * * /usr/lib/cyrus-imapd/ipurge -f -d 90 user.test1
Every day at 2am remove messages older then 90 days for user test1



>
>
>Hi there,
>   is there able to set automatically delete old emails only for some 
>users ? Is an user able to set it or only administrator ? Is there some 
>Imap webclient that can set it ?
>   Thanks and best regards
>   J.Karliak
>
>
>Cyrus Home Page:  http://www.cyrusimap.org/
>List Archives/Info:  http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>To Unsubscribe:
>https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Cyrus 2.5.10 and CentOS 7.3

2017-05-17 Thread Anton Shilov via Info-cyrus
Hi lists

After update 2.4.17 to 2.5.10 at CentOS 7.3 I've started see  messages in 
maillog:

...
May 15 10:04:50 server imaps[22927]: mailbox: longlock shared.folder for 1408.2 
seconds
May 15 12:52:27server imaps[30558]: mailbox: longlock shared.folder for 1925.0 
seconds
...
May 17 13:33:15 server imaps[14670]: IOERROR: bogus filename 
"/dev/shm/cyrus-imapd/proc//14028.new" in proc_foreach
May 17 13:38:26 server imaps[13973]: IOERROR: bogus filename 
"/dev/shm/cyrus-imapd/proc//7338.new" in proc_foreach
...

I think it isn't  good especially when happened "longlock mailbox" because 
users cannot get access to their mboxes. Please help me with investigation the 
problem. What kind of tests I have to do to repeat effects? What  longlock 
means?

==cyrys.conf==
START {
   recover   cmd="ctl_cyrusdb -r"
   idled cmd="idled"
}
SERVICES {
  imap  cmd="imapd -U 10" listen="imap" proto=tcp4 prefork=5
  imaps cmd="imapd -s -U 10" listen="imaps" proto=tcp4 prefork=10
  pop3  cmd="pop3d" listen="pop3" proto=tcp4 prefork=3
  pop3s cmd="pop3d -s" listen="pop3s" proto=tcp4 prefork=3
  sieve cmd="timsieved" listen="sieve" proto=tcp4 prefork=0
  lmtpunix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
}
EVENTS {
   checkpointcmd="ctl_cyrusdb -c" period=30
   delprune  cmd="cyr_expire -E 3" at=0400
   tlsprune  cmd="tls_prune" at=0400
   deleteprune cmd="cyr_expire -E 4 -D 30" at=0430
  expungeprune cmd="cyr_expire -E 4 -X 30" at=0445
  squatter  cmd="squatter -isv" at=0600
}

==imapd.conf==
admins: cyrus
allowallsubscribe: yes
allowplaintext: yes
allowusermoves: yes
auditlog: yes
commandmintimer: 2
configdirectory: /var/lib/imap
duplicate_db_path: /dev/shm/cyrus-imapd/duplicate_db
lmtp_downcase_rcpt: no
lmtp_over_quota_perm_failure: yes
lmtp_strict_quota: yes
maxlogins_per_host: 60
mboxname_lockpath: /dev/shm/cyrus-imapd/mboxname_lock
postuser: shared
quotawarn: 98
sendmail: /usr/sbin/sendmail
serverinfo: min
sievedir: /var/lib/imap/sieve
statuscache_db_path: /dev/shm/cyrus-imapd/statuscache_db
tls_ciphers: ALL
tls_client_certs: off
tls_server_ca_file: CA.crt
tls_server_cert: server.crt
tls_server_key: server.key
tls_versions:  ssl3 tls1_0 tls1_1 tls1_2
sasl_mech_list: PLAIN LOGIN
sasl_pwcheck_method: saslauthd
partition-default: /data/mail

other options - default

Add info:
CentOS 7.3 is vm at KVM 
30xCPU
50GiB RAM
3TiB Storage (file system -XFS)

Numder of users - 200



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Cyrus 2.15.10. Shared folders.Bug or feature?

2017-05-18 Thread Anton Shilov via Info-cyrus
Hi Cyrus-List!

Bugs or features?
case_1 (shared folder and subscribe):
Lots of users have subscribe to the same shared folder. If I delete it via 
cyradm (dm shared.folder) the users find out that they cannot unsubscribe from 
it because foldes starts to be inactive onto mail client, for example onto 
Thunderburd that folder has grey color in subsrcibe lists. Are there any 
algorithms to delete shared folders and automatically unsubscribe users from it?
case_2 (shared folders and IMAP user-defined permatent flags):
My company uses shared folders with user-defined flags in order to route 
clients' requests. In this model users who has acls lrswi can full control 
imap-flags and see it onto they mail clients as well. But users who has 
read-only (lrs) access cannot such ability. I don't want give them 
lrswi-rights. I tried give them lrsi-rights, but result was negative. If I'm 
right it issue refer to sending permanent imap-flag "\*". (OK [PERMANENTFLAGS 
(\Answered \Flagged \Draft \Deleted \Seen \*)] Ok)
How to solve such problem in cyrus-imap? -- 
Best regards,
Anton Shilov
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Cyrus 2.5.10 IMAP search

2017-06-01 Thread Anton Shilov via Info-cyrus

Hi all!
I've upgraded CyrusIMAP from 2.4.17 to 2.5.10 and after that has been broken 
IMAP search in email body russian language. Search for english works fine. --
Best regards,
Anton Shilov
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Fedora26. Cyrus- 3.0.3. cyr_virusscan None Configured.

2017-08-25 Thread Anton Shilov via Info-cyrus
Hi.

I've installed Cyrus-imapd 3.0.3 into Fedora26 from standart packet manager 
"dnf install cyrus-imapd". This  rpm includes tool "cyr_virusscan". If I use it 
I get result such as:
=
# ./cyr_virusscan
Using  virus scanner
2 mailboxes scanned, 0 infected messages found =

I think it is missconfig because ClamAV isn't part of cyrus-imap packet. May be 
somebody knows true way make them work together property? I don't manage to 
search how to configure it. Please help.


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re[2]: Fedora26. Cyrus- 3.0.3. cyr_virusscan None Configured.

2017-08-30 Thread Anton Shilov via Info-cyrus
Jason thanks a lot for specific knowledge. I'll try rebuid  AVP with latest 
openssl libs


>Суббота, 26 августа 2017, 11:31 +07:00 от Jason L Tibbitts III 
>:
>
>>>>>> "AS" == Anton Shilov via Info-cyrus < info-cyrus@lists.andrew.cmu.edu > 
>>>>>> writes:
>
>AS> I think it is missconfig because ClamAV isn't part of cyrus-imap
>AS> packet.
>
>The Fedora package is not configured to use clmav.  This is because
>clamav in Fedora still uses the old openssl libraries while cyrus uses
>the new libraries.  Using them together results in problematic behavior,
>though the nature of this depends on the architecture and probably
>other factors, some of which might be random.  In Fedora, I saw various
>test suite failures.
>
>You can of course rebuild the Fedora package from source if you wish.
>Just edit the spec to add back in BuildRequires: clamav-devel and the
>rest is automatic.  The reasons for the removal are also documented in
>the spec file, as well in the cyrus documentation itself.
>
>Note that the Fedora package is also not configured to use mysql for the
>same reason, though I think I will be able to enable it in Fedora 27.
>
> - J<


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Cyrus-imap 3.0.3 + clamAV

2017-08-30 Thread Anton Shilov via Info-cyrus

Greetings Cyrus Team

Cyrus-IMAP 3.x.y offers anti-virus protaction with ClamAV that invokes via 
"cyr_virusscan". Man page doesn't have information for granulated configure 
clamav side. There are such words in the man page: "Scan mailbox(es) or 
messages for viruses using configured virus scanner or provided search 
criteria." Does string "...using configured virus scanner..." mean clavmav 
scanner configuing with its config file?
Please let me know how to use tool "cyr_virusscan" correct. I'm interesting on 
controlling parameter "-r"

Best regards,
Anton
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: sieve ports: 2000 and 4190

2017-09-01 Thread Anton Shilov via Info-cyrus
Hi Sergey,

I think - yes. You can use something like this:


cyrus.conf 

SERVICES {
...
sieve2000 cmd="timsieved" listen="2000" proto=tcp4 prefork=0
sieve4190 cmd="timsieved" listen="4190" proto=tcp4 prefork=0
...

}
===

or use tcp-balanser soft which listening to client side two ports 2000 and 4190 
and than pass connect to timsieved standatr port 4190 in cyrus enviroment.



>Пятница,  1 сентября 2017, 13:47 +07:00 от Sergey :
>
>Hello.
>
>I seen what RFC 5804 recommend to use port 4190.
>Is it possible to run timsieved on 2000 and 4190 both ?
>
>-- 
>Regards, Sergey
>
>Cyrus Home Page:  http://www.cyrusimap.org/
>List Archives/Info:  http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>To Unsubscribe:
>https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus




Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Cyrus 2.5.10 and CentOS 7.3. Reconstruct userflags

2018-06-26 Thread Anton Shilov via Info-cyrus

Hi list

Accidentally deleted cyru.index in the shared mailbox. I've restored it and put 
into the same place. After that did  "reconstruct mailbox", but userflags not 
to be appeared.

During reconstruct process I sow lots of such messages:
uid 1000222453 mismatch: userflags

Is there a way to resonstruct userflags in my case?
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus