Re: OutLook support

2020-09-05 Thread Andrea Venturoli

On 2020-09-05 03:11, Deborah Pickett wrote:

On 2020-09-04 18.30, Andrea Venturoli wrote:

What's the status of interoperability today?
Will OL 2013 work reliably with CyrusIMAP 3.0? 3.2?
What about newer versions of OL? 


Hi Andrea,


Hello.



I can offer anecdata of interoperability between Cyrus 3.0.x and Outlook 
2016 from ten months of experience.


Thank you very much for sharing.



Like Outlook in general, it works fine, until it doesn't. With ~40 users 
with mailboxes up to 15 GB in size, I've had to help users start with 
fresh Outlook profiles about half a dozen times when their Outlook data 
file got corrupted.


Nothing new here: when I said pre-2013 version worked, what I meant is a 
~50 users installation required 2-3 reconfigurations per month.

I can live with that.
Of course using ThunderBird would mean max. 2-3 per *year* or even less, 
but it's up to the customer to choose.





Some specific observations:

Like any IMAP account in Outlook, you lose the ability to tag messages 
with colour.  All you can do is flag or unflag a message.


Fine, I guess.



Outlook does not handle the \Deleted flag well, and it has a habit of 
showing messages which are \Deleted as if they are still present 
(especially in Drafts). I recommend configuring all clients sharing an 
account with Outlook to purge folders early and often.


True, I remember that.
Showing deleted messages with an overstroke and forcing the user to 
"delete twice" was puzzling most of my users.




Outlook respects special-use folders about as well as other IMAP 
clients, which is to say, not super-well.  If you try to change which 
folder is the Trash folder using cyradm, Outlook may not notice the 
change.


Fine as long as I can set this up for a new account.
Then I can always delete/recreate.



64-bit Outlook is needed if both (a) your data file is > 2 GB, and (b) 
you want search indexing to work.  With 32-bit Outlook, search will 
silently miss messages.


:-O
Thanks for pointing this out!



Outlook is inefficient at IMAP synchronization.  If you have large 
mailboxes, it can spend a lot of its time synchronizing subscribed 
folders.  There are ways of winnowing the list of folders that Outlook 
tries to sync during Send And Receive, and this helps a bit.


Now I remember this too...




Outlook by default wants to send read receipts.


What I found really annoying is "non-read" receipts.
In case a user loses view of a shared folders, OL will send a "non-read" 
receipt for any unread message, potentially queueing thousands of 
messages in a few seconds!
This could be turned off in older versions; on post-2010 the option is 
either not there or hidden.

>:-<



To sync Outlook with Cyrus contacts, calendars and tasks, the free 
Outlook CalDav Synchronizer add-in works well (but sync rules are 
tedious to set up, and I haven't found a way to deploy preconfigured 
sync rules to users).  Outlook tries to disable the add-in because it 
slows down startup, but you can prevent this with a registry setting.


Thanks again.
I don't think I'll need this soon, but it's useful to know.



Rarely, Outlook will decide that a folder is local-only, and any 
messages moved into that folder will stop syncing with Cyrus.  The only 
fix I have found is to create a new Outlook profile (and then hunt for 
lost messages to drag back under synchronized folders).


Yes, I remember this too :-<
Does it at least shows the folder is local?
Then I could train the users to stop using it and call me.



These corruptions seem to occur more often in "Other Users" and "Shared 
Folders", but this might just be because said folders are huge (> 4 GB) 
in my company.


I hope I don't need to use this, at least for now.



Of course, it's unlikely that any of these irritations will ever get 
fixed by Microsoft.


That's sure.



In the long term, I am considering migrating my 
users from Outlook to Thunderbird or webmail.


All the users of my servers are using TB (along with mobile devices and 
occasionally RoundCube).
Now I'm evaulating installing a new instance at a customer who is 
already using OutLook (so to overcome the limitations of their ISP, 
which only offers POP3).

I'll suggest they move to ThunderBird but:
a) habits are hard to lose;
b) some use a management software who might require OL :-(



 bye & Thanks
av.

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

OutLook support

2020-09-04 Thread Andrea Venturoli

Hello.

A long time ago I had a customer who used OutLook with a Cyrus-IMAP 
server (I think it was 2.2 at the time).
Up to OL 2010 everything was (almost) fine, but upgrading to OL 2013 was 
a disaster, e.g. local-only folders, ability to move messages to folders 
which didn't exist on the server (thus losing it!), renaming folders 
seemed to work, but on the server nothing happened, etc...


What's the status of interoperability today?
Will OL 2013 work reliably with CyrusIMAP 3.0? 3.2?
What about newer versions of OL?

 bye & Thanks
av.

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: Sendmail+Cyrus IMAP "Data format error" and bounces

2020-03-27 Thread Andrea Venturoli

On 2020-03-17 20:13, Andrea Venturoli wrote:

On 2020-03-17 15:52, Andrea Venturoli wrote:

Also, 
https://www.cyrusimap.org/imap/reference/manpages/configs/imapd.conf.html#std:cyrusman-imapd.conf(5), 
says "reject8bit: 0" is the default.


 From this I understand my setup should NOT reject 8bit headers (but 
change non-ASCII characters to X).


I'm now setting this explicitly and I'll see what happens.


In fact, nothing changed.


So, I made some tests.

I prepared a text file with the following content (notice the non-ASCII 
character at the end of the Subject) and saved it as mail.txt:

Subject: Provaà
.


"file mail.txt" says "mail.txt: UTF-8 Unicode text".

Then I pushed this to my mailserver with curl:

curl --url 'smtp://myserver:25' --mail-from 'm...@netfence.it' --mail-rcpt 
'm...@netfence.it' --upload-file mail.txt




With "reject8bit: yes", sendmail refuses the message with "Message 
contains non-ASCII characters in headers". (Still don't know why it 
doesn't refuse it upfront, but bounces it!).


With "reject8bit: no", I get the message and the subject is translated 
to "ProvaXX", as I would expect, since rfc2047_utf8 is, by default, off.


Strangely, if I enable rfc2047_utf8, I still get "ProvaXX" as a subject.



In any case, it seems that, at least for the subject, UTF-8 characters 
are handled (almost) as expected.


*HOWEVER* curl does not use UTF8SMTPS, which is instead activated when I 
get mails that are bounced.


Any idea for a similar tool which can use UTF8SMTPS, so I can repeat 
that tests?



 bye & Thanks
av.

P.S.
I also tried tcpdump to get full data on a troublesome mail, but, 
unfortunately TLS was enabled and I was not able to get clear data.


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: Sendmail+Cyrus IMAP "Data format error" and bounces

2020-03-18 Thread Andrea Venturoli

On 2020-03-17 23:38, Deborah Pickett wrote:

On 2020-03-17 23:49, Andrea Venturoli wrote:
_ sendmail is SMTPUTF8-aware (this is confirmed by EHLO); however 
Cyrus isn't?


Could be.  This option in imapd.conf might be relevant:

rfc2047_utf8: 0

If enabled, imapd will parse any non-encoded character sequence in MIME 
header values as UTF8. This is useful for installations that either 
advertise the UTF8SMTP (RFC 5335) extension or receive mails with 
improperly escaped UTF-8 byte sequences. It is recommended that this 
option is left disabled unless there is good reason to do otherwise.


I'd be curious what damage this can do.
In any case, activating it did not solve: I'm still getting "Data format 
error" and bounce.



Still trying the other things.

 bye & Thanks
av.

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: Sendmail+Cyrus IMAP "Data format error" and bounces

2020-03-17 Thread Andrea Venturoli

On 2020-03-17 15:52, Andrea Venturoli wrote:

Also, 
https://www.cyrusimap.org/imap/reference/manpages/configs/imapd.conf.html#std:cyrusman-imapd.conf(5), 
says "reject8bit: 0" is the default.


 From this I understand my setup should NOT reject 8bit headers (but 
change non-ASCII characters to X).


I'm now setting this explicitly and I'll see what happens.


In fact, nothing changed.

 bye
av.

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: Sendmail+Cyrus IMAP "Data format error" and bounces

2020-03-17 Thread Andrea Venturoli

On 2020-03-17 13:31, Sergey wrote:

On Tuesday 17 March 2020, Andrea Venturoli wrote:


 From time to time, I receive some message that are refused
and bounce. Do to possible blacklisting, I *really* want to
avoid bounces.
  
I use Sendmail+Cyrus a very long time and I not remember this

problem exactly. Cyrus is not receive messages in two cases:
1) message contains 8-bit symbols (not encoded to base64 or
QP) in header;
2) message contains NUL character.

The first is subject of reject8bit option in imapd.conf. About second look
to https://groups.google.com/forum/#!topic/comp.mail.sendmail/xW7S5vXDNtY

May be the first one causes the "Data format error" message.


Thanks for pointing this out!

I've been fighting the "NUL characters" problem on the sendmail side for 
a long time: it seems I won about some 10 months ago, since I don't see 
any more of these errors in the logs after May.


I'm still seeing bounces, but, as you say, the reason is not the same!



So, focusing on 1), I my imapd.conf I have:

# If enabled, lmtpd rejects messages with 8-bit characters in the 




# headers.  Otherwise, 8-bit characters are changed to `X'.  (A proper 




# soultion to non-ASCII characters in headers is offered by RFC 2047 




# and its predecessors.) 




# 




#reject8bit: no

Also, 
https://www.cyrusimap.org/imap/reference/manpages/configs/imapd.conf.html#std:cyrusman-imapd.conf(5), 
says "reject8bit: 0" is the default.


From this I understand my setup should NOT reject 8bit headers (but 
change non-ASCII characters to X).


I'm now setting this explicitly and I'll see what happens.



 bye & Thanks
av.

P.S.
Assuming I now receive such messages, what about settings munge8bit: 1?
Any drawback or risk?

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: Sendmail+Cyrus IMAP "Data format error" and bounces

2020-03-17 Thread Andrea Venturoli

On 2020-03-17 11:58, Deborah Pickett wrote:

Hi Andrea,


Hello and thanks a lot for your interest.
Finally I get some useful information on this!





The status 5.6.7 seems to be related to encodings.  It's defined in RFC 
6531, SMTP Extension for Internationalized Email:


When the SMTPUTF8-aware SMTP
server supports enhanced mail system status codes [RFC3463], reply-
code "X.6.7" [RFC5248] (see Section 4) is used, meaning "Non-ASCII
addresses not permitted for that sender/recipient".
[source: https://tools.ietf.org/html/rfc6531#section-3.5]


Please allow me to explain what I understand, then:

_ sendmail is SMTPUTF8-aware (this is confirmed by EHLO); however Cyrus 
isn't?


_ 5.6.7 means either the sender or the recipient is not ASCII:
  however I can see for sure that, at least in certain cases, the 
recipient is in fact ASCII (all my addresses are);
  possibly the sender isn't: altough in the logs I see an ASCII 
address, it might not be and it gets *represented* in ASCII? I'd find 
this strange, though;


_ or, possibly, other headers are non ASCII: that's what I thought prior 
to your mail and it still seems more probable to me, but then I should 
see 5.6.9 (or 5.6.8?), not 5.6.7.


Correct?



In any case, I'm fine if these messages are plainly rejected; I'm not 
fine if they are accepted and then bounced.
I guess this means the problem lies between sendmail and Cyrus, with the 
former accepting it and, only afterwards, the latter refusing it.

Any way to configure one of the two to avoid this?




Do all of the failures have proto=UTF8SMTP(S) in them, or just this 
example?


Yes, they do.




I agree with them that your anonymization of the log with xxx may have 
masked important information.


Unfortunately I have to. If both ends were mine, I'd have no problem, 
but I cant' violate the privacy of others.



There may be temporary DNS failures going on but it's impossible to tell.


I don't question this statement; however, this is irrelevant.
AFAICT, the eventual DNS failure might cause the bounce to fail; however 
that's not my concern: I want to avoid the bounce in the first place.

Or is something slipping me through?

I can provide (alas anonymized) samples of logs where the bounce does 
not fail, if needed.



 bye & Thanks
av.

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

Sendmail+Cyrus IMAP "Data format error" and bounces

2020-03-17 Thread Andrea Venturoli

Hello.

I'm running sendmail 8.15.2, delivering to Cytus IMAP 3.0.13.



From time to time, I receive some message that are refused and bounce.
Do to possible blacklisting, I *really* want to avoid bounces.



Here's a sample log:
sm-mta[97841]: 00DI1r4x097841: from=, size=37059,
class=0, nrcpts=1,
msgid=,
proto=UTF8SMTPS, daemon=MTA, relay=xxx..net [37.148.183.222]
sm-mta[97960]: AUTH=client, relay=localhost, mech=, bits=0
sm-mta[97960]: 00DI1r4x097841: to=xx, delay=00:00:11,
xdelay=00:00:00, mailer=cyrusv2, pri=67551, relay=localhost, dsn=5.6.7,
stat=Data format error
sm-mta[97960]: 00DI1r4x097841: 00DI264w097960: DSN: Data format error
sm-mta[97960]: 00DI264w097960: to=,
delay=00:00:04, xdelay=00:00:04, mailer=esmtp, pri=3,
relay=mx1.slgnt.eu., dsn=5.1.2, stat=Host unknown (Name server:
xxx.x.xx.: no data known)



Most of these messages are spam/malware, but the above was a legitimate
message from a service provider I use.
I usually become aware of this, due to the second bounce (legitimate
mail usually comes from a "noreply" address, while spam/malware of
course from spoofed/inexistent addresses).



There's nothing more in the sendmail logs and Cyrus logs nothing about this.
I've searched the web, but found no explanation.
I've asked the sendmail side and they suggested I ask on the Cyrus-side.



Does anyone have any idea what might be the reason behind this "Data 
format error"?

Any hint on how to avoid it?


  bye & Thanks
av.

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


Migrating calendars to Cyrus

2020-02-21 Thread Andrea Venturoli

Hello.

I've been using CyrusIMAP for a long time, since before it supported 
CalDAV/CardDAV.
At a site, I had installed DAVical, but I'd like to get rid of it, now 
that Cyrus can do what it does.


I've migrated most calendars and I'm left with only one user, who, 
unfortunately, has more than 2k items in his calendar.

Doing it via a client is a pain.

Is there something like imapsync I can use?

 bye & Thanks
av.

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


Troubles with CardBook

2019-05-07 Thread Andrea Venturoli

Hello.

I'm maintaining several setups of Cyrus IMAPD 2.5.12 on FreeBSD 11.2/amd64.
I'm also using Thunderbird+CardBook on some of them without too many 
troubles.




Today, however I tried this on one server where I hadn't used CardDAV 
before (but had used CalDav succesfully) and run into some troubles.


First, "Default" addressbook for user myu...@mydomain.it was not 
automatically created when I configured CardBook; after creating it 
manually through cyradmin, CardBook would connect fine.


Later, I moved some hundred contacts into CardBook and let it 
synchronize: I watched it progress and noticed any contact who was 
transferred to the server disappeared from CardBook.

No use synchronizing again, those contacts would not reappear.
So I tried configuring the same addressbook on another machine: it would 
connect fine, but show no contact.

If I add further contacts, they are just "eaten" when I synchronize.
The contacts are however present on the server if I go and look at the 
filesystem level!




Now, this servers differs from the others where I succesfully used 
carddav for two reasons: it uses "virtdomains: userid" and 
"unixhierarchysep: yes".

(I also have "altnamespace: yes", but that's not unique).


I believe "unixhierarchysep: yes" is the culprit here, because this is 
what happened:
_ I pointed CardBook at 
https://mail.mydomain.it/dav/addressbooks/user/myu...@mydomain.it/Default/

_ at the file system level I saw the following appear:
 /var/spool/imap/domain/mydomain.it/user/myuser/#addressbooks
 /var/spool/imap/domain/mydomain.it/user/myuser/#addressbooks^Default
_ still CardBook would say no such addressbook was available;
_ I lunched cyradm and issued "cm user 
user/myuser/#addressbooks/defa...@mydomain.it";
_ /var/spool/imap/domain/mydomain.it/user/myuser/#addressbooks/Default 
appeared and CardBook was happy and created the addressbook.


After I added those hundred contacts, I correctly see them in 
/var/spool/imap/domain/mydomain.it/user/myuser/#addressbooks/Default, 
but still CardBook does not find them.





Is this a known bug?
Any hint on how to solve or at least get some more debugging info?

 bye & Thanks
av.

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 script not working

2019-03-01 Thread Andrea Venturoli

On 3/1/19 3:18 PM, Willem Offermans wrote:

Dear Andrea and Cyrus friends,

That is exactly the point: it was not ``stupid`` in any way.
It was ignorance, which we can only avoid by improving the
documentation.


I blame myself for this; I'll be glad if the documentation was improved, 
obviously.





By the way, the debug/logging question is still not answered.
Debugging/logging might also enlighten the user/administrator.


That's right.
Better logs would be a very big improvement: what I was looking for was 
an option to write sieve activity (like "executing script ...", "message 
moved to folder ...", etc...).
That would have confirmed the script was NOT even executed (and avoided 
several attempts at modifying it).




 bye & Thanks
av.

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 script not working

2019-03-01 Thread Andrea Venturoli

On 3/1/19 12:31 PM, Michael Menge wrote:


is the script activated?


Uh, no!



a user can have multiple scripts stored on the 
server
but only one can be activated at the same time. On the filesystem there 
should

be a "defaultbc"  which is a soft link to the active bc file.


There was no such link.

I have now "activated" this script and hope I can confirm it working the 
next time this account receives spam.




I guess this was it and I'm glad it was somethin so "stupid" on my part.

Thanks.



 bye
av.

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 script not working

2019-03-01 Thread Andrea Venturoli

On 3/1/19 12:04 PM, Willem Offermans wrote:

> (big snip on the rest)

$ man timsieved
TIMSIEVED(8) 
  TIMSIEVED(8)


Just to make sure I've clarified this: the script *is* there.


ls /var/imap/sieve/u/user1
user1.sieve.bc  user1.sieve.script


The content of user1.sieve.script is the script I installed via 
sieveshell; user1.sieve.bc is a bytecode file where some strings (i.e. 
regex and folder names) match the original script, so I think it's right.


As I said, the same goes for user2 and user3, but for those users the 
script also works.


 bye & Thanks
av.

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 script not working

2019-03-01 Thread Andrea Venturoli

On 3/1/19 11:01 AM, Merlin Hartley wrote:

Is this a shared mailbox?


No.




Have you actually compiled the script or just
put the plain text there? Did you install the file by hand or use 
something like timsieved?


I install the scripts via sieveshell.




You haven’t really given us much to go on…


Unfortunately, I really don't know which information I should post.
My original question was if I could enable some logs to see what was 
going on.
If there is other info that can be useful to solve this problem, I'm 
willing to report it.




 bye & Thanks
av.

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 script not working

2019-03-01 Thread Andrea Venturoli

On 2/6/19 6:43 PM, Bron Gondwana wrote:

Yeah, it's just called test.c in the sieve directory. Here's our 
buildscript code:

...


I'm giving up on this: I cannot get to build this test binary; besides, 
I'm *sure* the script is correct, since it works for other 2 mailboxes.


Thanks for your help anyway.

 bye
av.

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 script not working

2019-02-04 Thread Andrea Venturoli

On 2/2/19 8:25 PM, Bron Gondwana wrote:

What is being written to syslog by your lmtpd?


Absolutely nothing (apart from transient errors on the rare occasions 
when I reboot the server and sendmail comes up before imapd).


Is this log to be enabled somehow?




There's also a sieve-test binary that you can build in the Cyrus source 
code. I don't think it's built by default on most platforms though, we 
build it specially at FM. It takes a script and a raw email and spits 
out a list of actions.


I don't have this (FreeBSD 11.2).
AFAICT the port doesn't disable this (in configure) or leave it behind 
when installing.
I tried searching for this binary between "make" and "make install" 
phases (*), but I didn't find it (or any source named anything like it).

What's the procedure to compile it?

(*)

# cd work/cyrus-imapd-2.5.12/
# find .|grep -i "sieve-test"
# find . -type f -exec grep -i "sieve-test" "{}" ";"






 bye & Thanks
av.

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 script not working

2019-02-01 Thread Andrea Venturoli

On 1/20/19 3:21 PM, Andrea Venturoli wrote:

On 1/20/19 12:13 AM, Nic Bernstein wrote:

Andrea,
It would help to know which version of Cyrus you're having difficulty 
with, and what setting you're using for 'unixhierarchysep'?


Sorry, I obviously should have said it from the start: I'm using version 
2.5.12 on FreeBSD 11.2/amd64.
I'm not using 'unixhierarchysep', so the "default" separator shoud be a 
dot.

I'm also not using "altnamespace".


So, is there no way of debugging a sieve script or log its execution?

 Thanks
av.

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 script not working

2019-01-20 Thread Andrea Venturoli

On 1/20/19 12:13 AM, Nic Bernstein wrote:

Andrea,
It would help to know which version of Cyrus you're having difficulty 
with, and what setting you're using for 'unixhierarchysep'?


Sorry, I obviously should have said it from the start: I'm using version 
2.5.12 on FreeBSD 11.2/amd64.

I'm not using 'unixhierarchysep', so the "default" separator shoud be a dot.
I'm also not using "altnamespace".

 bye & Thanks
av.

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


Sieve script not working

2019-01-19 Thread Andrea Venturoli

Hello.

I'm using sieve scripts (among other things) to move messages that 
MIMEDefang marked as spam into a dedicated folder.


My scripts look like this:


require ["fileinto"];
require ["regex"];

if anyof (header :regex "X-Spam-Score" "^[1-9][0-9]\.",
  header :contains "X-Attachment-Dropped" "")
  {fileinto "INBOX.Spam.Received";}


Thus a message with the following header should go directly into the 
"Spam/Received" folder:

X-Spam-Score: 26.012 (**) 
BITCOIN_SPAM_07,DCC_CHECK,DOS_OE_TO_MX,FSL_BULK_SIG,HDR_ORDER_FTSDMCXX_DIRECT,HDR_ORDER_FTSDMCXX_NORDNS,HELO_DYNAMIC_HCC,HELO_DYNAMIC_IPADDR2,HTML_MESSAGE,MIMEOLE_DIRECT_TO_MX,NO_FM_NAME_IP_HOSTN,RATWARE_NO_RDNS,RDNS_NONE,TO_EQ_FM_DIRECT_MX,ZMIde_OutlookExpress




I'm doing this for three mailboxes: it works on two of them, not on the 
third one.
I checked the script is there and the folder exists; now I'm out of 
ideas on what to try.


Is there some way to get a sieve log or to debug it?

 bye & Thanks
av.

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


DB positions

2016-06-29 Thread Andrea Venturoli via Info-cyrus

Hello.

Just a quick question: I have FreeBSD box wich cyrus-imap 2.5.8 
installed and I'm seing some strange messages in the logs, i.e.



Jun 29 10:46:09 xx imaps[51333]: DBERROR db6: /var/imap/db/__db.001: No 
such file or directory
Jun 29 10:46:09 xx imaps[51333]: DBERROR: dbenv->open '/var/imap/db' 
failed: No such file or directory
Jun 29 10:46:09 xx imaps[51333]: DBERROR: init() on berkeley
Jun 29 10:46:09 xx imaps[51333]: DBERROR: reading /var/imap/db/skipstamp, 
assuming the worst: No such file or directory




Now, in fact, I don't have /var/imap/db!


# ls -l /var/imap/
total 416
-rw---  1 cyrus  mail 336 Nov  6  2015 annotations.db
drwx--  2 cyrus  mail 512 Jun 29 10:30 db.backup1
drwx--  2 cyrus  mail 512 Jun 29 10:00 db.backup2
-rw---  1 cyrus  mail  108840 Jun 29 10:47 deliver.db
drwxr-xr-x  5 cyrus  mail 512 Nov 20  2015 domain
drwxr-xr-x  5 cyrus  mail 512 Dec 16  2015 lock
drwxr-xr-x  3 cyrus  mail 512 Jun  7 17:41 log
-rw---  1 cyrus  mail  248208 Jun 28 04:00 mailboxes.db
drwxr-xr-x  2 cyrus  mail2048 Jun 29 10:47 proc
drwxr-xr-x  2 cyrus  mail1024 Jun  7 17:44 proc.old
drwx--  3 cyrus  mail 512 Jun  6 13:24 sieve
drwxr-x---  2 cyrus  mail4608 Jun 29 10:47 socket
-rw---  1 cyrus  mail 336 Nov  9  2015 statuscache.db
-rw---  1 cyrus  mail   10600 Jun 29 08:28 tls_sessions.db
drwxr-xr-x  4 cyrus  mail 512 Nov  6  2015 user


But, as you can see I have db.backup1 and db.backup2, which seems to be 
correctly updated with their own copy of mailboxes.db and annotations.db.



What are the consequences of the above?
Should I try and fix this, given the server seems to works perfectly? 
How do I do it?



 bye & Thanks
av.

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: Sendmail + Virtual Domains + aliases

2016-02-25 Thread Andrea Venturoli via Info-cyrus

On 02/24/16 19:16, Alexander Dalloz via Info-cyrus wrote:

Am 24.02.2016 um 18:15 schrieb Andrea Venturoli via Info-cyrus:

On 02/24/16 15:24, Sebastian Hagedorn wrote:

Use virtusertable instead of aliases, e.g.

postmas...@oneofmydomains.comroot


Don't use unqualified LHS addresses.


LHS=Left Hand Side? Then I didn't.
Changing root to "someth...@somedomain.com" doesn't work either.






And make sure to direct a catch-all to the error mailer in virtusertable.


Why?
Can you provide an example?






You complete sendmail.mc and log content would be useful.


Here's the MC (stripped of config and blank lines):


divert(-1)
divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.34.2.3.4.1 2009/04/15 
03:14:26 kensmith Exp $')
OSTYPE(freebsd6)
DOMAIN(generic)
FEATURE(access_db, `hash -o -T /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
define(`confCW_FILE', `-o /etc/mail/local-host-names')
define(`CYRUSV2_MAILER_FLAGS',`A5@')
define(`confLOCAL_MAILER', `cyrusv2')
_DEFIFNOT(`_DEF_CYRUSV2_MAILER_FLAGS', `lsDFMnqXz')
_DEFIFNOT(`CYRUSV2_MAILER_FLAGS', `A@/:|m')
ifdef(`CYRUSV2_MAILER_ARGS',, `define(`CYRUSV2_MAILER_ARGS', `FILE 
/var/imap/socket/lmtp')')
define(`_CYRUSV2_QGRP', `ifelse(defn(`CYRUSV2_MAILER_QGRP'),`',`', ` 
Q=CYRUSV2_MAILER_QGRP,')')dnl
POPDIVERT
VERSIONID(`$Id: cyrusv2.m4,v 1.2 2013-11-22 20:51:14 ca Exp $')
Mcyrusv2,   P=[IPC], F=_MODMF_(CONCAT(_DEF_CYRUSV2_MAILER_FLAGS, 
CYRUSV2_MAILER_FLAGS), `CYRUSV2'),
S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n,
_OPTINS(`CYRUSV2_MAILER_MAXMSGS', `m=', `, 
')_OPTINS(`CYRUSV2_MAILER_MAXRCPTS', `r=', `, 
')_OPTINS(`CYRUSV2_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_CYRUSV2_QGRP
A=CYRUSV2_MAILER_ARGS
define(`confBIND_OPTS', `WorkAroundBroken')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
MAILER(local)
MAILER(smtp)
define(`CERT_DIR', `/usr/local/netfence/etc/openssl')
define(`CACERT_DIR', `CERT_DIR')
define(`confCACERT_PATH', `CACERT_DIR')
define(`confCACERT', `CACERT_DIR/trustico.pem')
define(`confSERVER_CERT', `CERT_DIR/smtp.mydomain.it.pem')
define(`confSERVER_KEY', `CERT_DIR/smtp.mydomain.it_key.pem')
define(`confDOUBLE_BOUNCE_ADDRESS',`')
TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')
define(`confAUTH_MECHANISMS',`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')
define(`confAUTH_OPTIONS',`y')
CLIENT_OPTIONS(`Family=inet,M=S')
DAEMON_OPTIONS(`Port=smtp, Name=MTA')
DAEMON_OPTIONS(`Port=smtps, Name=SSA, M=Eas')
INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav/clmilter.sock, F=, 
T=S:4m;R:4m')dnl
define(`confINPUT_MAIL_FILTERS', `clmilter')
LOCAL_CONFIG
O 
CipherList=ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
O DHParameters=/etc/mail/dhparams.pem


And the extract of the log:


Feb 25 10:47:21 wilbur sm-mta[62536]: u1P9lKPJ062536: from=<m...@netfence.it>, 
size=816, class=0, nrcpts=1, msgid=<56cecd91.3010...@netfence.it>, proto=ESMTP, 
daemon=MTA, relay=smtp206.
alice.it [82.57.200.102]
Feb 25 10:48:03 wilbur sm-mta[62573]: u1P9lKPJ062536: 
to=<postmas...@oneofmydomains.com>, delay=00:00:42, xdelay=00:00:00, 
mailer=cyrusv2, pri=30816, relay=localhost, dsn=5.1.1, stat=User unknown





 bye & Thanks
av.

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: Sendmail + Virtual Domains + aliases

2016-02-24 Thread Andrea Venturoli via Info-cyrus

On 02/24/16 15:24, Sebastian Hagedorn wrote:

Use virtusertable instead of aliases, e.g.

postmas...@oneofmydomains.comroot



Thanks, but it doesn't seem to work either.

I put that line in virtusertable and issued "make".
I even restarted sendmail, even if IIRC it's not needed.
I confirm I have the following in my .mc file:
> FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')

I still get "User unknown".

There's a comment in virtusertable.sample which says: "Remember to add 
the source hostname to /etc/mail/local-host-names".

Maybe that's really needed for virtusertable to work?

If I add that, then cyrusv2 from mailertable will not be used for 
oneofmydomains.com.



 bye & Thanks
av.

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


Sendmail + Virtual Domains + aliases

2016-02-24 Thread Andrea Venturoli via Info-cyrus

Hello.

I've setup a server running Cyrus IMAP 2.5.7 with virtual domains and 
sendmail as MTA.

I'm having trouble with aliases.

E.g. I put the following in /etc/aliases:

root:   m...@someotherdomain.it
postmas...@oneofmydomains.com:  root

However, writing to postmas...@oneofmydomains.com fails since that 
mailbox doesn't really exist.



I don't have oneofmydomains.com in local-host-names, since I use 
mailertable for delivery with:

oneofmydomains.com  cyrusv2:/var/imap/socket/lmtp


What is the reccomended way to accomplish what I'm trying to do?


 bye & Thanks
av.

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: Trouble with Outlook 2013, especially with the upgrade from 12/8

2015-12-11 Thread Andrea Venturoli via Info-cyrus

On 12/11/15 14:18, Sebastian Hagedorn via Info-cyrus wrote:

Hi,

we've always had more problems with users of Outlook than other clients,
but in recent days they have become much graver. A number of users have
lost mail in a way that we couldn't recover, even though we are using
expunge_mode: delayed. There seems to be some correlation to this
upgrade from Microsoft:



However, details are vague. There seem to be two types of problems:


As others pointed out, OL and IMAP never put up with each other well and 
2013 is a lot worse than earlier versions, to the point it's not usable.


Troubles I've encountered include:
_ inability to choose folders for Sent mail, Drafts, etc...;
_ as a cool addition to the above, if you add an account which already 
has a Sent mail folder which is not called exactly "Sent", the new 
"Sent" folder will be "This computer only";
_ on some installations, long delays (tens of minutes) before mail 
starts arriving after the program is launched;
_ hours of no mail arriving (not even pushing the fetch button or 
restarting the program); of course new mail is on the server and it will 
suddenly start downloading again for no reason;
_ creating folders usually work (provided their name is legal), but 
sometimes they won't show up until a restart;
_ folders with a legal name often fail to be created: either no error 
message is produced or the folder is created only locally (without any 
further sync);
_ creating folders with unallowed characters fails on the server, but 
not on the client and won't be synchronized thereafter; if you are 
lucky, "This computer only" is appended to the name, so you know, but 
don't count on this too much;
_ moving messages into a folder works most of the time, but you might 
see the folder full, then suddenly empty, then possibly filling up again 
after a restart;
_ legal renaming of folders might work or not; again no error, but it 
might succeed locally (and stop uploading messages);
_ ability to rename "Other Users" or "Other Users.mailbox": of course 
this will fail on the server, but no indication of that is given; 
instead any subfolder will stop uploading new messages to the server 
(hope I don't need to describe the risks of this!);
_ frequent corruption of .pst/.ost files or whatever else, so you need 
to recreate the profile (but this was also true in 2007 and 2010);
_ mail disappearing for no reason (*) and if you are lucky it had been 
pushed to the server, so you have backups.


(*) I might think user1 accidentally hit the Delete button, I might 
think user2 somehow delete its mail by mistake, but when user3, 4, 5, 
etc... call and tell me the same thing...





I agree with Andre': such an aggravation over previous versions can only 
be intentional (to help selling Exchange).

In any case bottom line is: either drop OutLook or Cyrus.

 bye
av.

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


CalDAV and virtual domains

2015-11-11 Thread Andrea Venturoli via Info-cyrus

Hello.

What's the status of CardDAV/CalDav and virtual domains?
I read some messages about this being broken, but they are quite old: 
did this ever get fixed?

Is this component stable?


If I try:


http:///dav/calendars/user/@./Default/


I get:

Not Found

Mailbox does not exist
Cyrus/2.5.6 Cyrus-SASL/2.1.26 OpenSSL/7 Zlib/1.2.8 LibXML2.9.2 SQLite/3.9.1 
Libical/1.0 Jansson/2.7 Server at 127.0.1.1 Port 80




 bye & Thanks
av.

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


Sendmail and Virtual Domains

2015-07-21 Thread Andrea Venturoli
Hello.

I've been using Cyrus IMAP for years, but I'n now struggling with 
virtual domains for the first time.
This is a new server, so there are no compatibility issues and I don't 
need a default domain.
I've got most of it working, but I still have two questions...



First, how to configure sendmail?
Forgive me for my limited understanding, but the docs only briefly state:
 You'll have to use the Cyrus mailer in LMTP mode, and you'll have to change 
 the mailer flags so that it provides the full domain while communicating via 
 LMTP. Specifically these changes:

 S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP

I tried with define(`CYRUSV2_MAILER_FLAGS',`S=EnvFromSMTP/HdrFromSMTP, 
R=EnvToSMTP'), but this does not work.
Does this mean I need to modify cyrusv2.m4 (which I'd need to redo after 
every upgrade)?
Right now I copied its content into my sendmail config file and modified 
it, but I don't feel this is a good solution...
Any other way?



Second question: access to Other Users does not seem to work properly.
I'm used to give any user access to any other user mailbox through 
cyradm's sam command, but in this case it seems this is not enough.

I have:
 lam user@mydomain.it
 x...@mydomain.it lrswipkxtecdan
 myuser lrted

However, logging in as myuser does not show x...@mydomain.it:
 # telnet localhost imap
 Trying ::1...
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
 * OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE STARTTLS AUTH=SCRAM-SHA-1 
 AUTH=DIGEST-MD5 AUTH=CRAM-MD5 AUTH=NTLM AUTH=LOGIN AUTH=PLAIN SASL-IR] 
 wilbur.aviozzano-guglielmozamboni.it Cyrus IMAP 2.5.4 server ready
 . login myuser XXX
 . OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA 
 MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN 
 MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY 
 SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE 
 ANNOTATE-EXPERIMENT-1 METADATA LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN 
 QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH 
 URLAUTH=BINARY LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE 
 X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] User logged in 
 SESSIONID=wilbur.aviozzano-guglielmozamboni.it-14807-1437466138-1-2176882649663833723
 . LIST Other Users *
 . OK Completed (0.000 secs)

Why? How do I solve?



  bye  Thanks
av.

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: deleting emails directly

2015-03-04 Thread Andrea Venturoli
On 03/04/15 11:04, hw wrote:

 I'm running a virus scan over the spool directory and wonder how to get
 those messages removed within which a virus has been found.  The easiest
 way would be to let the virus scanner do this, and the virus scanner
 doesn't use IMAP.

I've used ISBG in the past (https://github.com/isbg/isbg), but that 
checks for spam, not for viruses.
Might be of some inspiration though...

  bye
av.

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: Empty folders

2014-12-31 Thread Andrea Venturoli
On 12/30/14 13:33, Niels Dettenbach (Syndicat.com) wrote:

 Am 30.12.2014 um 11:24 schrieb Andrea Venturoli m...@netfence.it:

 _ dm user.A.B.D (this won't delete anything);
 This is only for „deleting“ possibly existing but corrupt(ed) database 
 entries.
 _ stop imapd;
 _ reconstruct -r -f user.A (this will discover the folders I just only 
 formally deleted);
 _ start imapd;
 _ restore permissions for user.A*.
 hmm, OK,
 restarting should not be required afaik (but might be i’m wrong here) - but 
 if it help’s you, OK.

Everything seems solved now; thanks for your time and help.





 Relevant Modules are i.e.:

 Cyrus::IMAP::Admin
 http://search.cpan.org/~eestabroo/IMAP-Admin-1.6.7/Admin.pm
 http://www.manpagez.com/man/3/Cyrus::IMAP::Admin/

 manpages and perldoc are typical doc and example resources too for any 
 (installed) perl modules. There are many (very helpful) examples around which 
 should be relatively easy to adopt for your needs, even if you are a perl 
 „newcomer“.

 cyradm is the „alter ego of“ Cyrus::IMAP::Shell which is „just“ a „wrapper“ 
 around that module:
 https://cyrusimap.org/docs/cyrus-imapd/2.2.13p1/man/cyradm.1.php

 so it offers/does anything in the same way cyradm does, but object oriented 
 and/or perled.

 some further examples:
 http://lists.andrew.cmu.edu/pipermail/info-cyrus/2011-April/034798.html
 http://doc.gabosh.net/howto_IMAP_POP3_Server.html

Thanks again; I'll look into them.




 The major parts are the mailbox list db (which is typically „outside“
  the IMAP spool / filesystem) and the indices withIN the mailboxes and
  both could be handled by proper tools even „around“ cyradm shell.

I know.
I'm familiar with the case where a mailbox/folder exists in the mailbox 
list db, but not in the file system (or the other way around).

What puzzled me is a dual personality behaviour WRT to the mailbox 
list db.
As previously stated:
a) ctl_mboxlist -v showed 'user.A.B.D' has a directory 
'/data/imap/user/A/B/D' but no DB entry;
b) yet reconstruct -r f user.A would not discover this folder as new 
(until I did dm it);
c) cm user.A.B.D resulted in createmailbox: Mailbox already exists.

b) and c) seem to agree, but isn't a) in plain contrast?




  bye
av.

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: Empty folders

2014-12-30 Thread Andrea Venturoli
On 12/30/14 07:10, Niels Dettenbach (Syndicat IT  Internet) wrote:
 Am 29. Dezember 2014 23:02:10 MEZ, schrieb Andrea Venturoli 
 m...@netfence.it:
 cyradm dm does not delete this folder (and its files) from the
 filesystem.
 This is OK as long as you clearify for  you  that  there  is no folder before 
  you recreate the cyrus  folder  from/over  cyrus  again - means: delete it 
 by hand (rm) if still there.

 _ restore the old cyrus.* files.
 This should be done by reconstruct  -r -f  over  the (correct) folders - if 
 not, you still have  any problem in your setup or procedure as this command  
 must work for general/further proper cyrus functionality.

Thanks again.

In fact I found a faster procedure:
_ dm user.A.B.D (this won't delete anything);
_ stop imapd;
_ reconstruct -r -f user.A (this will discover the folders I just only 
formally deleted);
_ start imapd;
_ restore permissions for user.A*.



 Only thing, I'll have to script this, since I've got a lot of
 problematic folders...
 arrgh, sound's timeconsuming -  so good luck...  Personally i prefer perl 
 with the  official  cyrus  imap/admin perl modules  for any cyrus scripting.

Could you share a pointer?
I'm not proficient with perl, but I'd gladly look into them anyway.



 If  don't know the reason behind the problem it may make sense to generate 
 database dumps of the mboxlist
  by cron from time to time and check if  there further such bad 
folders  get generated by a script or similiar.

I don't know where the problem originated from, so I'll check a number 
of times in the next few days/weeks.


However I'm suprised: looking into cyrus imap as a black box, it's 
almost like it has two databases for the same things.



  bye  Thanks
av.

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: Empty folders

2014-12-29 Thread Andrea Venturoli
On 12/28/14 20:41, Simon Amor wrote:
 Have they created folder A/B/C in their mail client, but not created A/B ?

No idea, really.
However the point is not A/B has no content or cyrus.* files: I'm fine 
with that.

The real problem is A/B/D is shown as empty.

  bye  Thanks
av.

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: Empty folders

2014-12-29 Thread Andrea Venturoli
On 12/28/14 16:28, Niels Dettenbach (Syndicat.com) wrote:

 Am 28.12.2014 um 16:26 schrieb Niels Dettenbach (Syndicat.com
 http://Syndicat.com) n...@syndicat.com mailto:n...@syndicat.com:

 One „easy“ option is to use cyradm and create the mailbox folders by
 hand with cm or similar (this should not delete content of the folders
 i assume, but make a backup of them for no risk). After that do
 reconstruct -f -r over the mailbox.

Hello.

Thanks for your suggestion.

cm user.A.B did in fact work (and create A/B/cyrus.* files).
reconstruct -f -r user.A, however didn't achieve anything.

cm user.A.B.D results in createmailbox: Mailbox already exists.

Still A.B.D shows up empty in any client and is reported by ctl_mailbox 
has having a directory but no DB entry.


 …just in addition: make sure the folders have correct access rights...

They are.



  bye  Thanks
av.

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: Empty folders

2014-12-29 Thread Andrea Venturoli
On 12/29/14 19:43, Niels Dettenbach (Syndicat.com) wrote:

 hmmm,
 i would make a backup of the folders, delete it by cyradm dm
 (check if the folders in filesystem are gone too then)

cyradm dm does not delete this folder (and its files) from the filesystem.



 and recreate it by cyradm cm, copy the mail files into it, make
 shure the access rights fit your cyrus needs and make a
 reconstruct -r -f over the folders(!).

Thanks to your suggestion I found a procedure that works:
_ store away D's cyrus.* files;
_ sam user.A.B.D root lrswpcdai
_ dm user.A.B.D (as said this doesn't delete anything)
_ cm user.A.B.D (this overwrites cyrus.*)
_ restore the old cyrus.* files.

Only thing, I'll have to script this, since I've got a lot of 
problematic folders...



 depending from your setup the correct path might be user/A
 for now it sound’s a bit like a Cyrus IMAP „path“ problem too.
 Check i.e. with cyradm lm or cyradm lam the naming conventions
 of other (working) directories/folders.

I'm using user.A: this is correct for my server.



 If that doesn’t help, make sure the mailbox user has all access rights to 
 that folders by cyradm lam.

Access rights are not the problem.



 To make sure that you did not see any „old stuff“ (cached or similar) in your 
 imap client,
 use temporarily another imap client without any caching - i.e. mutt -f
 imap://user@imaphost or a webmailer or similar.

I know TB is flaky in this regard, so I used a webmail from the start.


Thanks a lot for your help.

  bye
av.

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

Empty folders

2014-12-28 Thread Andrea Venturoli
Hello.

I'm a long time cyrus IMAP admin, but I'm new to this mailing list, 
since this is the first time I encounter a problem I can't seem to solve 
alone.

A server of mine is running version 2.3.18:
_ user A has got his mailbox with lots of folders: all are working and 
all but one (B) have their cyrus.index, cyrus.header, cyrus.cache;
_ folder (B) has no cyrus.index, cyrus.header, cyrus.cache: ThunderBird 
displays it in gray but allows subfolders; of course there are no 
messages here;
_ as said, under B there are a lot of subfolders, most of which work; 
some, however, are shown as empty even if they exist, have messages in 
the file system and even have cyrus.* files (lets take D as an example).

So, to summarize I've got:
A (working)
  B (empty with no cyrus.* files)
   C (working)
   D (shown as empty even if cyrus.* and message files are present).


I tried reconstruct user.A: no results.
reconstruct -r user.A: user.A.B.D is listed in the output, but still 
no help.
reconstruct -f user.A didn't help either, nor did  reconstruct -f -r 
user.A.

No error is given to the client or displayed in the logs.
Owner and permissions in the filesystem are correct and so are IMAP rights.

The only strange thing I got to see is running ctl_mboxlist -v, which 
gives:
'user.A.B.D' has a directory '/data/imap/user/A/B/C' but no DB entry


Any suggestion on how to get out of this situation?

  bye  Thanks
av.

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