Re: Vacation sieve scripts not working

2019-05-16 Thread Willem Offermans
Dear Cyrus-imap friends and Sylvain,

Without further info, I cannot tell you what is wrong or why your script is not 
working.

Is there a way to debug sieve?

I can only confirm that the following is working in my case:

vacation :days 5 :addresses [“myn...@example.com", “othern...@example2.com"] 
:subject “I'm out of office"

Maybe you need to specify addresses?, though it is not logical.


Wiel Offermans
wil...@offermans.rompen.nl




> On 16 May 2019, at 11:49, Sylvain  wrote:
> 
> Hi list,
> 
> I'm testing Cyrus 3 on the future debian 10 that will be soon released.
> 
> Vacation sieve scripts seem not to run. Other scripts do.
> 
> For example, this one will never send vacation messages to sender :
> require ["vacation"];
> vacation :days 1 :subject "OUTOFTHEOFFICE" "I AM OUT OF THE OFFICE";
> 
> But this one will reject the mail :
> require ["reject","fileinto"];
> if address :is :all "From" "f...@example.org "
> {
> reject "testing";
> }
> 
> Of course I double checked that the vacation script is activated, and I 
> change the from address at each test. I use sieveshell to put them.
> 
> Anyone can reproduce this ?
> Any idea to debug this situation?
> 
> Thanks
> 
> 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: LDAP auth and ptloader

2019-04-23 Thread Willem Offermans
Dear Cyrus friends and Sven,

A reason to look for authentication by radius.
But maybe this should go to feature request.


Wiel Offermans
wil...@offermans.rompen.nl




> On 23 Apr 2019, at 13:50, Sven Schwedas  wrote:
> 
> On 23.04.19 13:43, Willem Offermans wrote:
>> Dear Cyrus Friends and Sven,
>> 
>> I don’t know if this is of any help.
>> 
>> I have setup saslauthd to do LDAP authentication of Cyrus.
> 
> That's what I want to get away from, because saslauthd cannot handle
> groups, and I need to maintain PAM LDAP auth in parallel just to handle
> that.
> 
> -- 
> Mit freundlichen Grüßen, / Best Regards,
> Sven Schwedas, Systemadministrator
> ✉ sven.schwe...@tao.at | ☎ +43 680 301 7167
> TAO Digital   | Teil der TAO Beratungs- & Management GmbH
> Lendplatz 45  | FN 213999f/Klagenfurt, FB-Gericht Villach
> A8020 Graz| https://www.tao-digital.at
> 


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: LDAP auth and ptloader

2019-04-23 Thread Willem Offermans
Dear Cyrus Friends and Sven,

I don’t know if this is of any help.

I have setup saslauthd to do LDAP authentication of Cyrus.

Now I’m at this point. I know this is off-topic:

LDAP is a database and not developed to do authentication.
Radius is developed to do AAA (Authentication, Authorization and Accounting).
Radius can do authentication in many different ways with many different 
databases.
Is it possible to do authentication with radius, for example freeradius?



Wiel Offermans
wil...@offermans.rompen.nl




> On 23 Apr 2019, at 11:45, Sven Schwedas  wrote:
> 
> I'm trying to set up direct LDAP auth via auth_meth=pts, but on start I
> always get "ptload(): can't connect to ptloader server: No such file or
> directory" as error. The directory for ptloader_sock exists and is the
> same as for all other sockets, so there shouldn't be any permission
> problems with the socket.
> 
> I suppose I need to somehow manually start up ptloader via cyrus.conf,
> but there's no documentation and nothing I can find in the mailing list
> archives as to *how*? What am I missing?
> 
> -- 
> Mit freundlichen Grüßen, / Best Regards,
> Sven Schwedas, Systemadministrator
> ✉ sven.schwe...@tao.at | ☎ +43 680 301 7167
> TAO Digital   | Teil der TAO Beratungs- & Management GmbH
> Lendplatz 45  | FN 213999f/Klagenfurt, FB-Gericht Villach
> A8020 Graz| https://www.tao-digital.at
> 
> 
> 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 2.5 imap idle/stuck connections (DOS like)

2019-03-07 Thread Willem Offermans
Dear Cyrus friends and Heiler Bensimon Bemerguy,

Don’t forget to report your solution.

It might certainly help other Cyrus users as well, though it is not directly 
related to Cyrus.



Wiel Offermans
wil...@offermans.rompen.nl




> On 7 Mar 2019, at 15:39, Heiler Bemerguy via Info-cyrus 
>  wrote:
> 
> Yes I've read imapd.conf and cyrus.conf and found no options to limit 
> connections per source IP or "idleness".. 
> 
> It means anyone can open a lot of connections to any port (143, 25, 110 etc) 
> and render the server unusable??
> 
> I'm using Debian, so I'll try to figure out how to do that with iptables.. 
> Thanks!
> 
> 
> 
> Best Regards,
> 
> Heiler Bensimon Bemerguy - CINBESA
> Analista de Redes, Wi-Fi,
> Virtualização e Serviços Internet
> (55) 91 98151-4894
> Em 07/03/2019 11:25, Willem Offermans escreveu:
>> Dear Cyrus friends and Heiler Bensimon Bemerguy,
>> 
>> You could use your firewall to achieve this.
>> 
>> For ipfw:
>> 
>> ${fwcmd} add pass tcp from any to ${ip_me} imap setup limit src-addr 10
>> 
>> You have to lookup the right syntax for your firewall.
>> 
>> Dit you check man imapd or man cyrus, maybe there is also an option for the 
>> daemon itself, but I would prefer the firewall. 
>> 
>> 
>> Wiel Offermans
>> wil...@offermans.rompen.nl <mailto:wil...@offermans.rompen.nl>
>> 
>> 
>> 
>> 
>>> On 7 Mar 2019, at 14:53, Heiler Bemerguy via Info-cyrus 
>>> mailto:info-cyrus@lists.andrew.cmu.edu>> 
>>> wrote:
>>> 
>>> Hail,
>>> 
>>> I've noticed an user with ~200 open connections to cyrus  imap port (143) 
>>> and, because of him, no one else could login to the server.
>>> 
>>> I've noticed even with a single "telnet ip 143", the connection is accepted 
>>> and never ever dropped, even while still unauthenticated.
>>> 
>>> How to stop that from happening?
>>> 
>>> cyrus.conf:
>>> imapcmd="imapd -U 30" listen="imap" prefork=6 maxchild=200
>>> 
>>> 
>>> -- 
>>> Atenciosamente,
>>> 
>>> Heiler Bensimon Bemerguy - CINBESA
>>> Analista de Redes, Wi-Fi,
>>> Virtualização e Serviços Internet
>>> (55) 91 98151-4894
>>> 
>>> 
>>> Cyrus Home Page: http://www.cyrusimap.org/ <http://www.cyrusimap.org/>
>>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ 
>>> <http://lists.andrew.cmu.edu/pipermail/info-cyrus/>
>>> To Unsubscribe:
>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus 
>>> <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 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 2.5 imap idle/stuck connections (DOS like)

2019-03-07 Thread Willem Offermans
Dear Cyrus friends and Heiler Bensimon Bemerguy,

You could use your firewall to achieve this.

For ipfw:

${fwcmd} add pass tcp from any to ${ip_me} imap setup limit src-addr 10

You have to lookup the right syntax for your firewall.

Dit you check man imapd or man cyrus, maybe there is also an option for the 
daemon itself, but I would prefer the firewall. 


Wiel Offermans
wil...@offermans.rompen.nl




> On 7 Mar 2019, at 14:53, Heiler Bemerguy via Info-cyrus 
>  wrote:
> 
> Hail,
> 
> I've noticed an user with ~200 open connections to cyrus  imap port (143) 
> and, because of him, no one else could login to the server.
> 
> I've noticed even with a single "telnet ip 143", the connection is accepted 
> and never ever dropped, even while still unauthenticated.
> 
> How to stop that from happening?
> 
> cyrus.conf:
> imapcmd="imapd -U 30" listen="imap" prefork=6 maxchild=200
> 
> 
> -- 
> Atenciosamente,
> 
> Heiler Bensimon Bemerguy - CINBESA
> Analista de Redes, Wi-Fi,
> Virtualização e Serviços Internet
> (55) 91 98151-4894
> 
> 
> 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: Sieve script not working

2019-03-01 Thread Willem Offermans
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.

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



Wiel Offermans
wil...@offermans.rompen.nl




> On 1 Mar 2019, at 15:04, Andrea Venturoli  wrote:
> 
> 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


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 Willem Offermans
Dear Michael and Cyrus friends,

Where is this documented?

I cannot find anything about this in

https://www.cyrusimap.org/imap/reference/admin/sieve.html 
<https://www.cyrusimap.org/imap/reference/admin/sieve.html>

How should a user/administrator know?

Pay attention to

https://www.cyrusimap.org/imap/reference/manpages/usercommands/sieveshell.html#std:cyrusman-sieveshell(1)
 
<https://www.cyrusimap.org/imap/reference/manpages/usercommands/sieveshell.html#std:cyrusman-sieveshell(1)>

and look at activate/deactivate. 

This is sufficient documentation according to the developer, who spent many 
hours in the code, I guess.
However, an ignorant user only gets a hint at most. Where is defaultbc 
mentioned? Be aware that the 
text the user reads is far away off what the user experiences, when he uses 
sieveshell. There is no 
(visual) connection between the two. It is a challenge to find your way. 

I’m a bit ashamed, but I found a way to contribute to the documentation:

https://www.cyrusimap.org/imap/developer/documentation.html

It is better for me to contribute. 

I hope I can find some time ...



Wiel Offermans
wil...@offermans.rompen.nl




> On 1 Mar 2019, at 12:31, Michael Menge  
> wrote:
> 
> Hi
> 
> Quoting 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
>> 
> 
> is the script activated? 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.
> 
>> 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
> 
> 
> 
> 
> M.MengeTel.: (49) 7071/29-70316
> Universität Tübingen   Fax.: (49) 7071/29-5912
> Zentrum für Datenverarbeitung  mail: 
> michael.me...@zdv.uni-tuebingen.de
> Wächterstraße 76
> 72074 Tübingen
> 
> 
> 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: Sieve script not working

2019-03-01 Thread Willem Offermans
Dear Andrea and Cyrus friends,

I remember from a long time ago, that documentation with respect to sieve was 
sparse.
It took me quite some time to set things up and to handle sieve back then. But 
even now
I wouldn’t know how to debug the sieve process. Most of the things in the 
background of the
sieve process are still mysterious to me. But it works very well from a 
perspective from a user.
Since then, it didn’t change for the better, I’m afraid.

It can happen with software development: nice and excellent code has been 
developed,
but the program is almost not useable or is only partly used with respect to 
its power, because of lack of 
documentation. Usually an excellent developer is a poor documenter. It is very 
time consuming and oh so boring to write
good documentation…. To a great frustration of the users … And this is not a 
judgement, I can understand both sides.

What can help in such a situation, is to dig into the original code.
If you are extremely lucky, the developer commented its code and you can 
follow, read and/or puzzle on
what is going on. It might give you hints on how to debug.
Also go through the original code distribution. Sometimes it includes ReadMe’s 
or examples, which can give you hints.
 
If you find something useful, or if you even can solve your problem, then 
please document it and try to get the documentation 
into the source distribution, or at least into the mailing list, so that others 
can benefit from it.

The following is illustrative of what I mean:


$ ll /usr/local/cyrus/bin/*ieve*
-rwxr-xr-x  1 root  wheel  uarch 1191104 Nov  7  2016 
/usr/local/cyrus/bin/sievec
-rwxr-xr-x  1 root  wheel  uarch 1182048 Nov  7  2016 
/usr/local/cyrus/bin/sieved
-rwxr-xr-x  1 root  wheel  uarch 1512864 Nov  7  2016 
/usr/local/cyrus/bin/compile_sieve
-rwxr-xr-x  1 root  wheel  uarch 1544432 Nov  7  2016 
/usr/local/cyrus/bin/timsieved
-r-xr-xr-x  1 root  wheel  uarch4976 Nov  7  2016 
/usr/local/cyrus/bin/masssievec
$ man sievec
No manual entry for sievec
$ man sieved
No manual entry for sieved
$ man compile_sieve
No manual entry for compile_sieve
$ man masssievec
No manual entry for masssievec
$ man timsieved
TIMSIEVED(8)  TIMSIEVED(8)



 *

NAME
   timsieved - CMU hack for getting sieve scripts onto the server

SYNOPSIS
   timsieved [ -C config-file ]

DESCRIPTION
   timsieved  is a server that allows users to remotely manage their sieve
   scripts kept on the server.  It accepts commands on its standard  input
   and  responds  on  its standard output. It MUST be invoked by master(8)
   with those descriptors attached to a remote client connection.

   Cyrus admins that authenticate and authorize as themselves (e.g.  don't
   proxy) manage global scripts.

   Timsieved reads its configuration options out of the imapd.conf(5) file
   unless specified otherwise by -C.


OPTIONS
   -C config-file
  Read configuration options from config-file.

FILES
   /etc/imapd.conf

SEE ALSO
   imapd.conf(5), master(8)



CMU  Project CyrusTIMSIEVED(8)



man  is usually the starting point of your journey.  



Wiel Offermans
wil...@offermans.rompen.nl




> On 1 Mar 2019, at 11:16, Andrea Venturoli  wrote:
> 
> 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


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

2019-02-26 Thread Willem Offermans
Dear jpilfold-bagwell <mailto:jpilfold-bagw...@bordengrammar.kent.sch.uk> and 
Cyrus friends,

Now you are sure that sieve is actually listening on the mentioned ports.

How about the main question? 

Are the scripts applied to the incoming mail?



Wiel Offermans
wil...@offermans.rompen.nl




> On 26 Feb 2019, at 11:36, J Pilfold-Bagwell 
>  wrote:
> 
> Hi Willem,
> 
> Once I found that you can run sieve on ports 200 and 4190 at the same time, I 
> set it up just in case Cyrus was talking to only one of the ports.
> 
> If I telnet in, I get this response.
> 
> [root@mail rules]# telnet localhost 2000
> Trying ::1...
> telnet: connect to address ::1: Connection refused
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> "IMPLEMENTATION" "Cyrus timsieved v2.4.17-Fedora-RPM-2.4.17-13.el7"
> "SASL" "PLAIN LOGIN CRAM-MD5 DIGEST-MD5"
> "SIEVE" "comparator-i;ascii-numeric fileinto reject vacation imapflags notify 
> envelope relational regex subaddress copy"
> "STARTTLS"
> "UNAUTHENTICATE"
> OK
> #
> 
> and 
> 
> [root@mail rules]# telnet localhost 4190
> Trying ::1...
> telnet: connect to address ::1: Connection refused
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> "IMPLEMENTATION" "Cyrus timsieved v2.4.17-Fedora-RPM-2.4.17-13.el7"
> "SASL" "PLAIN LOGIN CRAM-MD5 DIGEST-MD5"
> "SIEVE" "comparator-i;ascii-numeric fileinto reject vacation imapflags notify 
> envelope relational regex subaddress copy"
> "STARTTLS"
> "UNAUTHENTICATE"
> OK
> 
> 
> Replacing localhost with 127.0.0.1 gets rid of the  "telnet: connect to 
> address ::1: Connection refused" 
> .
> 
> I can also log into sieveshell and list and manipulate scripts::
> 
> [root@mail rules]# sieveshell --authname=mail-admin --user=jpb localhost
> connecting to localhost
> Please enter your password: 
> > list
> mail 
> sieve-test  <- active script
> > get sieve-test
> require ["fileinto"];
> if address :is "From" "test-u...@gmail.com" <mailto:test-u...@gmail.com> {
>   fileinto "INBOX.Microsoft";
>   stop;
> }
> 
> 
> 
> 
> 
> 
> 
> 
> On 18/02/2019 09:33, Willem Offermans wrote:
> 
>> Dear Egoitz and Cyrus friends,
>> 
>> Check if sieve is actually listening at port 2000 as well.
>> 
>> 
>> Wiel Offermans
>> wil...@offermans.rompen.nl <mailto:wil...@offermans.rompen.nl>
>> 
>> 
>> 
>> 
>>> On 18 Feb 2019, at 09:34, ego...@sarenet.es <mailto:ego...@sarenet.es> 
>>> wrote:
>>> 
>>> Hi!
>>> 
>>> 
>>> 
>>> Could you try enabling local6.debug channel in syslog, so that you could 
>>> see additional Sieve debugging information?. Can you then post that log?
>>> 
>>> 
>>> 
>>> Cheers!
>>> 
>>>  
>>> 
>>> 
>>> El 2019-02-15 12:32, J Pilfold-Bagwell escribió:
>>> 
>>>> Hi All,
>>>> 
>>>> I have a Centos 7 box running with the latest default cyrus install from 
>>>> the Centos 7 repo, i.e. cyrus-imapd-2.4.17-13.el7.x86_64 .
>>>> 
>>>> The problem I have is that sieve doesn't seem to pay any attention to the 
>>>> scripts.  I have sieve running, I can successfully log in to it using 
>>>> sieveshell, create, upload and activate scripts, but they don't seem to be 
>>>> applied to the incoming mail.  First I was trying the vacation and reject 
>>>> scripts so checked that the correct sendmail is in use but it fails on 
>>>> fileinto as well.
>>>> 
>>>> ~~
>>>> 
>>>> imapd.conf looks like this:
>>>> 
>>>> [root@mail admin]# cat /etc/imapd.conf
>>>> configdirectory: /var/lib/imap
>>>> partition-default: /var/spool/imap
>>>> admins: cyradmin
>>>> sieve_admins: cyradmin
>>>> sievedir: /var/lib/imap/sieve
>>>> sendmail: /usr/sbin/sendmail
>>>> hashimapspool: true
>>>> sasl_pwcheck_method: auxprop
>>>> sasl_auxprop_plugin: sasldb
>>>> sasl_mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
>>>> allowplaintext: yes
>>>> allowusermoves: yes
>>>> defaultdomain: mail
>>>> lmtp_downcase_rcpt: yes
>>>

Re: Sieve not working

2019-02-18 Thread Willem Offermans
Dear Egoitz and Cyrus friends,

Check if sieve is actually listening at port 2000 as well.


Wiel Offermans
wil...@offermans.rompen.nl




> On 18 Feb 2019, at 09:34, ego...@sarenet.es wrote:
> 
> Hi!
> 
> 
> 
> Could you try enabling local6.debug channel in syslog, so that you could see 
> additional Sieve debugging information?. Can you then post that log?
> 
> 
> 
> Cheers!
> 
>  
> 
> 
> El 2019-02-15 12:32, J Pilfold-Bagwell escribió:
> 
>> Hi All,
>> 
>> I have a Centos 7 box running with the latest default cyrus install from the 
>> Centos 7 repo, i.e. cyrus-imapd-2.4.17-13.el7.x86_64 .
>> 
>> The problem I have is that sieve doesn't seem to pay any attention to the 
>> scripts.  I have sieve running, I can successfully log in to it using 
>> sieveshell, create, upload and activate scripts, but they don't seem to be 
>> applied to the incoming mail.  First I was trying the vacation and reject 
>> scripts so checked that the correct sendmail is in use but it fails on 
>> fileinto as well.
>> 
>> ~~
>> 
>> imapd.conf looks like this:
>> 
>> [root@mail admin]# cat /etc/imapd.conf
>> configdirectory: /var/lib/imap
>> partition-default: /var/spool/imap
>> admins: cyradmin
>> sieve_admins: cyradmin
>> sievedir: /var/lib/imap/sieve
>> sendmail: /usr/sbin/sendmail
>> hashimapspool: true
>> sasl_pwcheck_method: auxprop
>> sasl_auxprop_plugin: sasldb
>> sasl_mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
>> allowplaintext: yes
>> allowusermoves: yes
>> defaultdomain: mail
>> lmtp_downcase_rcpt: yes
>> 
>> tls_cert_file: /etc/ssl/certs/cyrus-imapd/newcert.pem
>> tls_key_file: /etc/ssl/certs/cyrus-imapd/newkey.pem
>> tls_ca_file: /etc/ssl/certs/cyrus-imapd/cacert.pem
>> tls_ca_path: /etc/ssl/certscyrus-imapd
>> 
>> 
>> 
>> cyrus.conf:
>> 
>> # standard standalone server implementation
>> 
>> START {
>>   # do not delete this entry!
>>   recovercmd="ctl_cyrusdb -r"
>> 
>>   # this is only necessary if using idled for IMAP IDLE
>>   idledcmd="idled"
>> }
>> 
>> # UNIX sockets start with a slash and are put into /var/lib/imap/sockets
>> SERVICES {
>>   # add or remove based on preferences
>>   imapcmd="imapd" listen="imap" prefork=5
>>   imapscmd="imapd -s" listen="imaps" prefork=1
>> #  pop3cmd="pop3d" listen="pop3" prefork=3
>> #  pop3scmd="pop3d -s" listen="pop3s" prefork=1
>>   sievecmd="timsieved" listen="0.0.0.0:2000" prefork=0
>>   sieve cmd="timsieved" listen="0.0.0.0:4190" prefork=0
>> #  managesieve   cmd="timsieved" listen="localhost:4190" prefork=0
>> 
>>   # these are only necessary if receiving/exporting usenet via NNTP
>> #  nntpcmd="nntpd" listen="nntp" prefork=3
>> #  nntpscmd="nntpd -s" listen="nntps" prefork=1
>> 
>>   # at least one LMTP is required for delivery
>> #  lmtpcmd="lmtpd" listen="lmtp" prefork=0
>>   lmtpunixcmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
>> 
>>   # this is only necessary if using notifications
>> #  notifycmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp" 
>> prefork=1
>> }
>> 
>> EVENTS {
>>   # this is required
>>   checkpointcmd="ctl_cyrusdb -c" period=30
>> 
>>   # this is only necessary if using duplicate delivery suppression,
>>   # Sieve or NNTP
>>   delprunecmd="cyr_expire -E 3" at=0400
>> 
>>   # this is only necessary if caching TLS sessions
>>   tlsprunecmd="tls_prune" at=0400
>> 
>>   # reindex changed mailboxes (fulltext) approximately every three hours
>>   squatter1   cmd="/usr/bin/ionice -c idle /usr/lib/cyrus/bin/squatter 
>> -s" period=180
>> 
>>   # reindex all mailboxes (fulltext) daily
>>   squattera   cmd="/usr/lib/cyrus/bin/squatter" at=0117
>> }
>> 
>> 
>> 
>> sieveshell logs in fine:
>> 
>> [root@mail admin]# sieveshell --authname=cyradmin --user=testuser1 localhost
>> connecting to localhost
>> Please enter your password:
>>> 
>>> list
>> mail
>> sieve-test  <- active script
>> 
>> telnet
>> 
>> Telnet login provides:
>> 
>> [root@mail admin]# telnet 192.168.0.6 4190
>> Trying 192.168.0.6...
>> Connected to 192.168.0.6.
>> Escape character is '^]'.
>> "IMPLEMENTATION" "Cyrus timsieved v2.4.17-Fedora-RPM-2.4.17-13.el7"
>> "SASL" "PLAIN LOGIN CRAM-MD5 DIGEST-MD5"
>> "SIEVE" "comparator-i;ascii-numeric fileinto reject vacation imapflags 
>> notify envelope relational regex subaddress copy"
>> "STARTTLS"
>> "UNAUTHENTICATE"
>> OK
>> 
>> ~
>> 
>> And this works for both port 2000 and 4190 on all interfaces. LMTP is in use 
>> but somewhere, they aren't talking.
>> 
>> Does anyone have any troubleshooting tips they can feed me or, can anyone 
>> see a glaringly obvious error I've made because it's all gone a bit wood for 
>> the trees here.
>> 
>> The logs

Re: Migrating IMAP from Cyrus v2.2.13 to Cyrus v2.4.17

2016-04-07 Thread Willem Offermans via Info-cyrus
Hello Cyrus friends,

Is imapsync not an option?

imapsync - IMAP synchronization, copy or migration tool.
Synchronize mailboxes between two imap servers.
Good at IMAP migration.

WWW: http://imapsync.lamiral.info/


On Wed, Apr 06, 2016 at 02:07:17PM -0500, John Wade via Info-cyrus wrote:
> Hi Jack,
> 
> You should be able to export the mailboxes database on the old
> server to text and then import on the new server.   In package of
> cyrus we are running, the DB export is actually done daily
> automatically.
> 
> Here is an approximation of what we did last time we did a
> server/version migration, may have cut some steps to
> sanitize/simplify:
> 
> ## Copy Mail spools on a nightly basis until conversion:
> #On old server:
> 
> vi /root/mailtools/rsyncmailspools.sh
> 
> #!/bin/bash
> date
> echo "syncing spool 0"
> rsync -Haz --delete-after -e ssh /var/spool/imap/0/
> cyrus@newserver:/var/spool/imap/0/
> echo "end spool 0"
> date
> echo "syncing spool 1"
> rsync -Haz --delete-after -e ssh /var/spool/imap/1/
> cyrus@newserver:/var/spool/imap/1/
> echo "end spool 1"
> date
> echo "syncing spool 2"
> rsync -Haz --delete-after -e ssh /var/spool/imap/2/
> cyrus@newserver:/var/spool/imap/2/
> echo "end spool 2"
> date
> echo "syncing spool 3"
> rsync -Haz --delete-after -e ssh /var/spool/imap/3/
> cyrus@newserver:/var/spool/imap/3/
> echo "end spool 3"
> date
> echo "syncing spool 4"
> rsync -Haz --delete-after -e ssh /var/spool/imap/4/
> cyrus@newserver:/var/spool/imap/4/
> echo "end spool 4"
> date
> --
> # run it (Cyrus user has authorized_keys file on newserver)
> /root/mailtools/rsyncmailspools.sh
> 
> # cron to sync spools
> crontab -e
> # set up rsync to sync mail spools until final cutover
> 00 18 * * * /root/mailtools/rsyncmailspools.sh
> 
> 
> #At time of conversion (or can be done for testing)
> 
> # On oldserver:
> 
> #cd /var/lib/imap
> su - cyrus
> /usr/cyrus/bin/ctl_mboxlist -d >mailboxes.oldserver.text
> exit
> 
> 
> # newserver
> rsync -av -e ssh
> cyrus@oldserver:/var/lib/imap/mailboxes.oldserver.text /var/lib/imap
> 
> su - cyrus
> cd /var/lib/imap
> rm -f /var/lib/imap/mailboxes.db*
> /usr/lib/cyrus-imapd/ctl_mboxlist -u <
> /var/lib/imap/mailboxes.oldserver.text
> 
> # Confirm it by dumping back:
> /usr/lib/cyrus-imapd/ctl_mboxlist -d >
> /var/lib/imap/mailboxes.newserver.text
> cat mailboxes.newserver.text
> 
> # Confirm the above file looks OK; then delete it:
> rm /var/lib/imap/mailboxes.newserver.text
> exit
> 
> 
> 
> # move over all sieve scripts
> rsync -Havz --delete-after -e ssh
> cyrus@oldserver:/var/lib/imap/sieve/ /var/lib/imap/sieve
> 
> # move over all seen, sub files
> rsync -Havz --delete-after -e ssh
> cyrus@oldserver:/var/lib/imap/user/ /var/lib/imap/user
> 
> # move over quota files
> rsync -Havz --delete-after -e ssh
> cyrus@oldserver:/var/lib/imap/quota/ /var/lib/imap/quota
> 
> # fix ownership
> chown -R cyrus:mail /var/lib/imap
> 
> ## Start mail and hope
> 
> 
> Enjoy,
> John
> 
> On 4/6/2016 1:39 PM, Jack Snodgrass via Info-cyrus wrote:
> >
> >I read that.. but after 8 hours of trying to get it going I gave
> >up on it.
> >
> >I the debian 8 / Cyrus 2.5 stuff did not want to process the cyrus
> >2.4 db files from debian 6.
> >
> >You can say pretty words like: "may require support for whichever
> >backend you were using" but if all you have is access to apt-get
> >and you have two systems that are YEARS apart in what they have
> >setup.. how do you do this?  Tell me the apt-get install command
> >to run so that  ctl_cyrusdb -r works or it's just words.
> >
> >
> >jack
> >
> >
> >
> >On 04/06/2016 01:32 PM, Dan White wrote:
> >>On 04/06/16 13:20 -0500, Jack Snodgrass via Info-cyrus wrote:
> >>>Is there a documented process for taking a system from: Cyrus
> >>>v2.2.13 to Cyrus v2.4.17
> >>
> >>>I have rsync'd the mail between the two systems.
> >>>
> >>>/usr/lib/cyrus/bin/reconstruct did NOT magically convert the
> >>>system from the old to the new.
> >>
> >>>/usr/lib/cyrus/bin/reconstruct -G -f
> >>
> >>>The 'seen' flags and probably some other flags / acls are not working.
> >>
> >>Check the upgrade instructions here:
> >>
> >>https://cyrusimap.org/docs/cyrus-imapd/2.5.3/install-upgrade.php
> >>
> >>'ctl_cyrusdb -r' may require support for whichever backend you
> >>were using
> >>on the older version (on the new system), such as a legacy berkeleydb
> >>version.
> >
> >
> >-- 
> >*jack* - Southlake Texas - http://mylinuxguy.net
> > - *817-601-7338*
> >
> >
> >
> >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

domain wide sieve script

2015-11-06 Thread Willem Offermans via Info-cyrus
Dear Cyrus friends,

Is it possible to put a domain wide applicable sieve script in cyrus as 
described in

https://support.tigertech.net/sieve#sieve-filtering-for-jmp-2

look for ``Sieve filtering for an entire domain name''

-- 
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,
De jrus wah,

Wiel

*
 W.K. Offermans

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 imapd debug

2015-07-16 Thread Willem Offermans
Dear cyrus friends,

I have activated virtdomains in my imapd.conf:


...
virtdomains: yes
defaultdomain: example.com
...


If I use e-mail clients within the example.com domain, then e-mails can be
read and sent without any issue. However, if e-mail clients at remote
locations are used, for example via vpn connections, then it really depends
on the mail client whether there are issues or not.

1) mutt over vpn:

works, if I use:

imaps://myn...@example.com@IMAPServer.example.com/INBOX

2) live mail over vpn:

works, if I use:

username: myn...@example.com
incoming mail server: IMAPServer.example.com

does not work, if I use:

username: myn...@example.com
incoming mail server: IMAPServer.vpn.example.com

does not work, if I use:

username: MyName
incoming mail server: IMAPServer.vpn.example.com

3) outlook 2010 over vpn:

Although I can log in to the imap server, the client doesn't show any
received mails. Although it doesn't show any error message, I suspect that
the mail client tries to access the wrong INBOX. Outlook doesn't seem to be
able to connect in a way such as:
imaps://myn...@example.com@IMAPServer.example.com/INBOX

all of the above combinations for username and incoming mail server do not
work!


Does anyone know a solution to this?

If not, are you familiar with the general approach of debugging imapd? Can
you inform me about this procedure or show me the url?

Shouldn't the default work in any case? i.e.:

username: MyName
incoming mail server: any valid IP adress


-- 
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,

Will

*
W.K. Offermans

   Powered by 

(__)
 \\\'',)
   \/  \ ^
   .\._/_)

   www.FreeBSD.org

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