Timsieved valid commands -- Expected EOL -- sovled

Su Li sli at rim.net
Mon Nov 25 14:35:25 EST 2002


I did:

PUTSCRIPT "s2" {127+}
require ["fileinto", "reject", "imapflags"]; if header :is "From" "testtest at testrim.net" { addflag["\\Answered", "$MDSent"]; }
OK


Thanks,

Su

-----Original Message-----
From: Su Li 
Sent: November 25, 2002 1:59 PM
To: Mark Keasling
Cc: info-cyrus at lists.andrew.cmu.edu
Subject: RE: Timsieved valid commands -- Expected EOL


Hi Mark,

I am still working on Timsieved. I got error "Expected EOL".

GETSCRIPT "mysieve"
{127}
require ["fileinto", "reject", "imapflags"];
if header :is "From" "testtest at testrim.net"
{
addflag["\\Answered", "$MDSent"];
}

OK

----------------------------
PUTSCRIPT "S1" "require ["fileinto", "reject", "imapflags"]; if header :is "From" "testtest at testrim.net" { addflag["\\Answered", "$MDSent"]; }" {127}

NO "Expected EOL"

----------------------------
PUTSCRIPT "S1" {127} require ["fileinto", "reject", "imapflags"]; if header :is "From" "testtest at testrim.net" { addflag["\\Answered", "$MDSent"]; }

NO "Did not specify script data"


In my C++ program I did:
sprintf((char*) sendBuffer, "PUTSCRIPT \"%s\" \"%s\"\r\n", scriptName.c_str(), script.c_str());
m_pConnection->Send(sendBuffer, strlen(sendBuffer));

The C++ program gave me the same result. 

I wonder why other command didn't complain about "EOL", but PUTSCRIPT complains?

Thanks a lot


Su

-----Original Message-----
From: Mark Keasling [mailto:mark at air.co.jp]
Sent: November 19, 2002 8:54 PM
To: Su Li
Cc: info-cyrus at lists.andrew.cmu.edu
Subject: Re: Timsieved valid commands


Hi,


On Tue, 19 Nov 2002 16:08:58 -0500, Su Li <sli at rim.net> wrote...
> Hi
> 
> I am building a web admin server to manage the sieve filtering for Cyrus IMAP. I don't want to use Sieveshell. I telnet to Sieve port 2000 and did a 'AUTHENTICATE "PLAIN" ' command. I checked the man page of timsieved. There is not much information about valid commands. I am not sure how can I input my auth name and user name to be able to login. 
> 
> This is so far I got:
> 
> >telnet web9 2000
> 
> >Trying 10.101.85.213...
> >Connected to web9.swlab.rim.net.
> >Escape character is '^]'.
> >"IMPLEMENTATION" "Cyrus timsieved v1.1.0"
> >"SASL" "PLAIN OTP DIGEST-MD5 CRAM-MD5"
> >"SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational regex"
> >OK
> 
> >AUTHENTICATE "PLAIN"
> 
> >{0}
> 
> >user "cyrus"
> 
> >NO "Authentication Error"
> 
> Can any body let me know the valid commands for Timsieved?

The PLAIN authentication method seems to be defined in rfc2595.txt.

The example given for ACAP in the rfc is:
               C: a003 AUTHENTICATE "PLAIN" {21+}
               C: <NUL>tim<NUL>tanstaaftanstaaf
               S: a003 OK CRAM-MD5 password initialized

>From this it appears that you can't use PLAIN via telnet because you can't
enter a <NUL> character (at least I don't know how it would be done).

I've been able to telnet to the timsieved by enabling the LOGIN authentication
mechanism.  However you'll have to be able to convert username and password to
base64 inorder to use it.

I do have C++ source for a b64echo which I can post if anyone wants it.

Sieve commands are defined in:
   cyrus-imapd-x.y.z/doc/sieve-protocol.html

Regards,
Mark Keasling <mark at air.co.jp>







More information about the Info-cyrus mailing list