Re: FWD: cyrus 2.0.16/SIEVE

2002-01-07 Thread Abu @ Trabas Dot Com

Hai Again, 

Yes I dont understand cyrus-2.xx running sieve more difficult than ver 1.,
and installsieve/sieveshell cannot running with cyrus admin.
if i have thousand of user, it is not secure to write password first to
file and pipe it to sieveshell/installsieve.

i dont have solution for this case, it is little tricky, i makee script to do:

1. if user want forward/vacation, script make a password to file first
2. make sieve script 
3. run installsieve:
   
   exec(installsieve -u $user -i $file.script -a $file  password)

4. delete user password file and script file.
5. i must have directory for apache to write file.

its to hard to understand why sieve tool to do it. or any better solution. :(



Noll Janos([EMAIL PROTECTED])@Mon, Jan 07, 2002 at 02:02:48PM +0100:
 Hi!
 
 On 07-Jan-2002 Abu @ Trabas Dot Com wrote:
  i want apache run installsieve/sieveshell with exec command, example:
  exec('installsieve -u user@domain -i file -a file server');
  
  - how to supply password if apache has no password or know password.
  the password fill from prompt shell?
 
  I think sieveshell would work, if you opened a pipe to it, and wrote the
 password, then the commands to it.
 
  The other way (example):
  1. create a temp file, like /tmp/example1 that contains
 thepasswordhere
 list
  2. use the command:
 cat /tmp/example1 | sieveshell -u usernamehere 127.0.0.1
 
  And voila!
 
  The first approach might be more secure.
 
 | Noll Janos [EMAIL PROTECTED] | http://www.johnzero.hu |
 | Expect the unexpected!| ICQ# 4547866 |  Linux rulez! |

-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
Don't relax!  It's only your tension that's holding you together.



Re: FWD: cyrus 2.0.16/SIEVE bug

2002-01-06 Thread Abu @ Trabas Dot Com

Why sieveshell or installsieve (deprecated) hard to use on web script.

i mean if someone want to autoforward/vacation himself, he must have shell to use
sieveshell/installsieve.

i want apache run installsieve/sieveshell with exec command, example:

exec('installsieve -u user@domain -i file -a file server');

- how to supply password if apache has no password or know password.
the password fill from prompt shell?

i am still comfusing when upgrade from 1.xx to 2.00. on sieve on cyrus 1
i can supply autoforward/vacation with admin user but know i dont know exactly.

somebody help me!


Noll Janos([EMAIL PROTECTED])@Mon, Jan 07, 2002 at 03:01:05AM +0100:
 Hy!
 
  (Hope you're not seeing this mail twice.)
 
 
  I might have hit a bug.
 
  I tried a SIEVE script on a test mail that had a 
  subject: [Prim]xx (without quotes, of course)
 
  The script's condition section:
  
  if header :matches Subject [Prim]*
  
  By common sense, this should match. But it doesn't.
 
  What does match:
  
  if header :matches Subject \\[Prim]*
  
 
  And the cause?
 
  Cyrus uses the unix fnmatch() function, which was made for matching filenames.
 And that is the reason it has one side-effect: it interprets not only * and ?
 characters, but also [ ] chars.
  And from our point of view, that's bad.
 
  I've read the RFC, and it doesn't specify that you have to escape the [ char
 (and this is only logical).
 
  I've attached a fix, it should be good (also included below).
 
  There may be problems with the * characters escaped to \\* (that should
 instead be \*, which is in a C source file \\*). The RFC is not really clear
 about this!
 
 
 *** comparator.c.original   Fri Jan  4 00:49:34 2002
 --- comparator.cFri Jan  4 02:04:59 2002
 ***
 *** 38,43 
 --- 38,70 
   #include tree.h
   #include sieve.h
   
 + /* string_match added by Noll Janos [EMAIL PROTECTED] */
 + static int string_match(const char *pat, const char *text)
 + {
 + int ret,nt;
 + char *epat; /* will be the pattern, [-escaped */
 + char *p,*q;
 + 
 + if (!strchr(pat,'[')) { /* no [ - no problem */
 + ret = !fnmatch(pat, text, 0);
 + } else {
 +   /* count how many ['s there are */
 + for ( nt=-1, p=(char *)pat-1 ; p!=NULL ; p=strchr(p+1,'[') ) nt++;
 + 
 +   /* copy and escape ['s */
 +   epat=(char *)malloc(strlen(pat)+nt+1);  
 +   for ( p=(char *)pat,q=epat ; *p ; p++ ) {
 +   if (*p=='[') { *(q++)='\\'; }
 +   *(q++)=*p;
 +   }
 +   *q=0;
 + 
 + ret = !fnmatch(epat, text, 0);
 +   free(epat);
 + }
 + return(ret);
 + }
 + 
   /* --- i;octet comparators --- */
   
   /* just compare the two; these should be NULL terminated */
 ***
 *** 93,99 
   
   static int octet_matches(const char *pat, const char *text)
   {
 ! return !fnmatch(pat, text, 0);
   }
   
   #ifdef ENABLE_REGEX
 --- 120,126 
   
   static int octet_matches(const char *pat, const char *text)
   {
 ! return string_match(pat, text);
   }
   
   #ifdef ENABLE_REGEX
 ***
 *** 146,152 
   for (i = 0; t[i] != '\0'; i++)
 t[i] = toupper(t[i]);
   
 ! ret = !fnmatch(p, t, 0);
   free(p); free(t);
   
   return ret;
 --- 173,179 
   for (i = 0; t[i] != '\0'; i++)
 t[i] = toupper(t[i]);
   
 ! ret = string_match(p, t);
   free(p); free(t);
   
   return ret;
 
 -
 
 
 | Noll Janos [EMAIL PROTECTED] | http://www.johnzero.hu |
 | Expect the unexpected!| ICQ# 4547866 |  Linux rulez! |
 



-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
You may be gone tomorrow, but that doesn't mean that you weren't here today.



Mailbox Backup

2001-12-04 Thread Abu @ Trabas Dot Com

How to backup cyrus mailbox/folder? 
is there any tool/utility for local mailbox cyrus imapd server backup?

I have search on archive but found nothing. 
-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
You will probably marry after a very brief courtship.



I/O error because folder and db not syncron

2001-11-28 Thread Abu @ Trabas Dot Com

Hai.
How to fix if folder and and db not syncron,
if i remove folder /var/spool/imap/user/*
and stil list with cyradm but no on folder.

How to fix it?


-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
Today is the first day of the rest of the mess.



Broken link when download IMSP

2001-11-28 Thread Abu @ Trabas Dot Com

I just want try IMSP but this link 
(ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.0.3-BETA.tar.gz)
is broken. 


-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
Caution: breathing may be hazardous to your health.



Cyrus and Address book

2001-11-21 Thread Abu @ Trabas Dot Com

Someone ask me, cyrus can save Address book?
Can it? Somebody knows lotus mailserver, is lotus mailserver can save address book?
Sorry asking lotus notes on cyrus mailing list. Maybe someone give me solution?
Using ldap/database yeah maybe.


-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
Good news from afar can bring you a welcome visitor.



Re: how-to? LDAP

2001-11-13 Thread Abu @ Trabas Dot Com

What do you want ldap do with cyrus?

Benoit Joseph([EMAIL PROTECTED])@Tue, Nov 13, 2001 at 01:02:18AM +0100:
 
 Hello, 
 
 I discover the world of mail server and i wonder if there is some 
 pretty howto about cyrus with ldap... Something i can understand 
 without headache! ;-) and quite complete?
 
 Thanks a lot 
 
 Merci beaucoup
 
 A+
 
 Ben

-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
Fine day to work off excess energy.  Steal something heavy.



Re: cyradm problem

2001-11-06 Thread Abu @ Trabas Dot Com

I have no idea. but maybe you want
try my small script, (modify please) have you seen maillog/messages log.
i use cyrus 2.0.16 too, but have no problem like you.
download IMAP::Admin first from search.cpan.org

~abu~

Marcelo Romaniuc([EMAIL PROTECTED])@Mon, Nov 05, 2001 at 11:43:53PM -0800:
 I got the same error when adding -u cyrus -auth
 login...
 
 BTW, imtest authenticates without problems:
 
 su-2.05$ imtest -u cyrus -m login localhost
 C: C01 CAPABILITY
 S: * OK smith Cyrus IMAP4 v2.0.16 server ready
 S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+
 NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT
 MULTIAPPEND SORT THREAD=ORDEREDSUBJECT
 THREAD=REFERENCES IDLE
 S: C01 OK Completed
 Password:
 C: L01 LOGIN cyrus {8}
 + go ahead
 C: omitted
 L01 OK User logged in
 Authenticated.
 Security strength factor: 0
 
   I'm using sasldb for authentication.
 
 Any ideas ?
 
-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
Fortune: You will be attacked next Wednesday at 3:15 p.m. by six samurai
sword wielding purple fish glued to Harley-Davidson motorcycles.


#!/usr/bin/perl -w
use strict;
use IMAP::Admin;

if(@ARGV  1) {
print usage : user [partition]\n;
exit;
}

my $user = shift;
my $partition = shift || undef;

my $imap = IMAP::Admin-new('Server' = 'localhost',
 'Login' = 'cyrus',
 'Password' = 'c1ru5m4m',
 );

my $err;

$err= $imap-create(user.$user, $partition) if defined $partition;
$err= $imap-create(user.$user) unless defined $partition;


if ($err != 0) {
  print $imap-{'Error'}\n;
} else {
  print user $user created\n;
}



msg04391/pgp0.pgp
Description: PGP signature


Re: cyradm problem

2001-11-05 Thread Abu @ Trabas Dot Com

Try #cyradm -u cyrus -auth login localhost
IMAP Password:xxx
localhost

have you create cyrus password, if you use sasl:
#sasldblistuser
#saslpasswd cyrus
Password:xxx

by root.

Marcelo Romaniuc([EMAIL PROTECTED])@Mon, Nov 05, 2001 at 09:35:52AM -0800:
 Hi,
 
 
   I'm stuck on this problem for a while (hope someone
 can give me a solution)
   When I call cyradm localhost I got the following
 message:
 
 
 $cyradm localhost
 IMAP Password:
 
   Login failed: authentication failure at
 /usr/lib/perl5/site_perl/5.6.1/i586-linux/Cyrus/IMAP/Admin.pm
 line 78
 cyradm: cannot authenticate to server with  as cyrus
 
 
   The cursor waits for about 5 seconds (for my
 password) and then prints the Login failed message.
 Doesn't matter if I type or not the password -
 sometimes the message is printed during the password
 typing...
 
 
 Any help will be welcome!
 
 Thanks
 
 __
 Do You Yahoo!?
 Find a job, post your resume.
 http://careers.yahoo.com

-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
There will be big changes for you but you will be happy.



msg04388/pgp0.pgp
Description: PGP signature


Qmail+Cyrus vs VMailmgr vs VPop

2001-10-28 Thread Abu @ Trabas Dot Com

Hai, I was successfully install qmail+cyrus, for virtualdomain,
I just put into virtualdomain (/var/qmail/control):
test.dom:cyrus
test2.dom:cyrus

then i make scrypt to deliver all mail from test.dom, test2.dom
in ~cyrus to use cyrus deliver (/usr/cyrus/bin/deliver), I think
i dont need vpop or vmailmgr because all mail save to cyrus mailbox,

I just want to discuss its possible without vpop or vmailmgr if
using qmail+cyrus?, but I dont know, how many concurent 
connection if using cyrus deliver?

I use pam-mysql or pam-ldap for authenticate via pam for imap/pop.

Why i use qmail+cyrus:
qmail: virt. domain, secure, fast, only one user (cyrus user only)
cyrus: virtual user for mailbox, quota management, many tool for manage user.

Thanks.

~yusril~

-- 
   __   
  (oo)  
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
Your ignorance cramps my conversation.



msg04526/pgp0.pgp
Description: PGP signature


Re: script to add users to virtual accounts

2001-10-21 Thread Abu @ Trabas Dot Com

Joe Stump([EMAIL PROTECTED])@Mon, Oct 22, 2001 at 02:11:28AM -0500:
 I'm using Qmail+Cyrus+SASL ... it's virtual accounts with virtual users and
 seems to be supporting multiple boxes one multiple domains. Here is a short
 list of what got Qmail+Cyrus up and running ...
 
 1.) Any Cyrus+SASL HOWTO will work for compiling instructions
 2.) Add qmail to the mail group (not sure how secure this is but it fixed 
 a lot of problems)
 3.) Make sure /usr/cyrus and /var/imap are chown'd cyrus.mail (I overlooked
 this initially)
 4.) I had to support [EMAIL PROTECTED] and [EMAIL PROTECTED] on the same machine
 and preferably with the same codebase so I created a simple script that
 I put in my .qmail-vhost-default files that rewrites info and passes the
 email off to deliver.

Would you share us your scrypt too in .qmail-vhost-default?
I tried to put |/usr/cyrus/bin/deliver $param
to send to cyrus mailbox but till now not work, I think i have to translate
and put to cyrus mailbox like user_domain_com.

I will change from sendmail+cyrus imapd to qmail+cyrus imapd.

Thanks

 5.) I create accounts like this: 
 1.) echo password | saslpasswd -p username
 2.) create the inbox using username_domain_tld
 3.) point mail.domain.tld to my mail frontend (squirrel) and modified my 
 php frontend to convert [EMAIL PROTECTED] to username_domain_tld.
 4.) The above script in the .qmail-vhost-default file takes the To: header
 and simply replaces @ and . with _ and passes it on to deliver.
 
 The one drawback is no .'s or _'s in usernames ... but when I get a customer
 that has more than the combination of numbers, letters and -'s I'll worry about
 that :)
 
 With a decent SAN this should scale to support many, many, many users - and
 the best part is it does it from one code base :)
 
 --Joe
 
 On Mon, Oct 22, 2001 at 12:59:27PM +0700, Abu @ Trabas Dot Com wrote:
  We are using IMAP::Admin, its perl module. 
  
  Are you using qmail+cyrus, using virtual user and virtual domain?
  would you share to use how to qmail deliver to cyrus imapd.
  
  Thanks
  
  Joe Stump([EMAIL PROTECTED])@Sun, Oct 21, 2001 at 05:30:14PM -0500:
   Anyone out there have any scripts to add virtual accounts?
   
   I have Qmail+Cyrus+SASL+PHP on the server. I need an API to allow partners to
   create users via a HTTP script of some sort.
   
   --Joe
   
   Joe Stump [EMAIL PROTECTED]
   
   How would this sentence be different if pi equaled 3? 
  
  -- 
 __   
(oo)  
   / \/ \ GnuPg public information pub 1024/EBD26280 
   `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
  Don't relax!  It's only your tension that's holding you together.
 
 
 
 Joe Stump [EMAIL PROTECTED]
 
 How would this sentence be different if pi equaled 3? 
 



-- 
   __   
  (oo)  Open Solution Provider visit http://www.trabas.com
 / \/ \ GnuPg public information pub 1024/EBD26280 
 `V__V' A9A9 8F57 9E9D 14E3 05B4  3EDB C241 A313 EBD2 6280
Don't relax!  It's only your tension that's holding you together.

 PGP signature


Cyrus + Qmail

2001-10-05 Thread Abu @ Trabas Dot Com

Where can I find document about Cyrus working together
with Qmail, maybe anybody have experience install on
linux box.

Thanks

 PGP signature