Re: how to use cyradm in a not-so-interactive way?

2003-10-15 Thread Javier Cano Linares
Hi, Kai and people!

Thanks a lot!

Now it works. Just one more question. I read the API documentation for
Cyrus::IMAP::Admin but I can not really understand how to set the
mailbox quota. In the perl file Admin.pm you can see:

=item setquota($mailbox,$resource,$quota[, ...])

Set quota on a mailbox. Note that Cyrus currrently only defines one
resource, CSTORAGE. As defined in RFC 2087, the units are groups of
1024 octects (i.e.Kilobytes)

I do not know how to call this function, I suppose something like (but
exactly how?):
setquota('user.test0004',???,2);

regards
Javier Cano

El lun, 13-10-2003 a las 09:40, Kai escribió:
 Hi
 Use the following scripts
 
 #!/usr/bin/perl
 use Cyrus::IMAP::Admin;
 my $client=Cyrus::IMAP::Admin-new('yourhost');
 $client-authenticate(-authz='',
 -user='admin',
 -password='yourpasswordhere',
 -mechanism='PLAIN');
 my $result=$client-createmailbox($mailbox);
 
 Regards
 Kai
 
  I am trying to automate some tasks in order to create new mail
  accounts... I am using Postfix, Cyrus-IMAP and MySQL.
  Maybe there is a quite obvious answer to this question but I have no
  idea about Perl...
  I would like to find a way to create users in a not-so-interactive way
  like introducing directly these commands (for example). To do this I
  have to connect to cyradm (e.g.,cyradm --user cyrus --server localhost)
  from the terminal and then introduce:
 
  localhost cm user.test0004
  localhost sam user.test0004 cyrus lrswipcda
  localhost sq user.test0004 2
  localhost quit
 
  In the man page of cyradm it says it can be used in this other way:
   perl -MCyrus::IMAP::Shell -e 'run(myscript)'
  but, honestly, I can not understand how to do this. What should be the
  content of myscript? how to connect to cyradm in this case? how to
  provide the password?
 
  Any help would be very grateful!
 
  Greetings!
  Javier Cano
 
 
 __
 Do You Yahoo!?
 Yahoo! BB is Broadband by Yahoo!
 http://bb.yahoo.co.jp/



Re: how to use cyradm in a not-so-interactive way?

2003-10-15 Thread Javier Cano Linares
Hi, Kai and people!

Thanks a lot!

Now it works. Just one more question. I read the API documentation for
Cyrus::IMAP::Admin but I can not really understand how to set the
mailbox quota. In the perl file Admin.pm you can see:

=item setquota($mailbox,$resource,$quota[, ...])

Set quota on a mailbox. Note that Cyrus currrently only defines one
resource, CSTORAGE. As defined in RFC 2087, the units are groups of
1024 octects (i.e.Kilobytes)

I do not know how to call this function, I suppose something like (but
exactly how?):
setquota('user.test0004',???,2);

regards
Javier Cano

El lun, 13-10-2003 a las 09:40, Kai escribió:
 Hi
 Use the following scripts
 
 #!/usr/bin/perl
 use Cyrus::IMAP::Admin;
 my $client=Cyrus::IMAP::Admin-new('yourhost');
 $client-authenticate(-authz='',
 -user='admin',
 -password='yourpasswordhere',
 -mechanism='PLAIN');
 my $result=$client-createmailbox($mailbox);
 
 Regards
 Kai
 
  I am trying to automate some tasks in order to create new mail
  accounts... I am using Postfix, Cyrus-IMAP and MySQL.
  Maybe there is a quite obvious answer to this question but I have no
  idea about Perl...
  I would like to find a way to create users in a not-so-interactive way
  like introducing directly these commands (for example). To do this I
  have to connect to cyradm (e.g.,cyradm --user cyrus --server localhost)
  from the terminal and then introduce:
 
  localhost cm user.test0004
  localhost sam user.test0004 cyrus lrswipcda
  localhost sq user.test0004 2
  localhost quit
 
  In the man page of cyradm it says it can be used in this other way:
   perl -MCyrus::IMAP::Shell -e 'run(myscript)'
  but, honestly, I can not understand how to do this. What should be the
  content of myscript? how to connect to cyradm in this case? how to
  provide the password?
 
  Any help would be very grateful!
 
  Greetings!
  Javier Cano
 
 
 __
 Do You Yahoo!?
 Yahoo! BB is Broadband by Yahoo!
 http://bb.yahoo.co.jp/



Re: how to use cyradm in a not-so-interactive way?

2003-10-15 Thread Kai
Hi,Javier Cano
 I set mailbox's quota by the following script,maybe it's useful to you?
 my $rc=$client-setquota($mailbox,'STORAGE',$quota);

Regards
---
Kai
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/



Re: broken mailbox

2003-10-15 Thread Joakim Ryden
On Tuesday 14 October 2003 08:59 am, Gerard Ceraso wrote:
  I don't know what I did but I think I broke one of my mail boxes. I cannot
 get to it from any of my mail browsers, this folder is pretty hefty though.
 I am using cyrus imap I believe version 1.5. I get this error when trying
 to rename it from cyradm.

 localhost renm INBOX.Debian Users INBOX.DebianUsers
 command failed: Mailbox has an invalid format

You're not using Red Hat, are you?

--Jo



Re: spam filtering

2003-10-15 Thread Tom Allison
Ali Asad Lotia wrote:

i would recommend that you look at amavisd-new for spam filtering. it 
plugs in between your mta (postfix, qmail, sendmail) and cyrus. there 
are also options to allow people to opt out of the spam filtering etc. 
pretty solid piece of software. i am using it with spamassassin and 
clamav (for virus checking). it can use many other anti virus 
packages. the url for amavisd-new is:

http://www.ijs.si/software/amavisd/

aal

I'm thinking your answer might be correct.

Even though I tried a rpm for amavisd-new and that was a pretty bad 
failure, it might make sense for me to just install and configure all of 
this without trying to rely on any packaging.





Re: spam filtering

2003-10-15 Thread Joakim Ryden
On Wednesday 15 October 2003 02:37 am, Tom Allison wrote:
[...]
 I'm thinking your answer might be correct.

 Even though I tried a rpm for amavisd-new and that was a pretty bad
 failure, it might make sense for me to just install and configure all of
 this without trying to rely on any packaging.

The modules install pretty easily (using perl -MCPAN -e shell) provided you 
have a fairly recent version of Perl. Note also that some of the modules are 
optional as far as just getting amavisd running.

--Jo



Re: Using email address as login name

2003-10-15 Thread Avtar Gill
Gerard Ceraso wrote:
I have seen some places where the login name for the email would be
[EMAIL PROTECTED] so for example if I wanted to login my login for this
account would be [EMAIL PROTECTED] How is this done with cyrus, I
tried and it didn't work. Am I missing something? Is it possible with
cyrus?
It's possible with version 2.2, you can log in using the default domain 
that Cyrus is configured for ([EMAIL PROTECTED]) or any virtual 
domain ([EMAIL PROTECTED]).



Re: spam filtering

2003-10-15 Thread Etienne Goyer
Another possibility is MailScanner, that we use successfully at a few
locations.  It does it all : spam filtering with SpamAssassin, virus
scanning, attachement blocking, etc and is very flexible.  Since it work
at the MTA level, it should not interfere with your Cyrus installation.

http://www.sng.ecs.soton.ac.uk/mailscanner/

On Tue, Oct 14, 2003 at 10:34:39PM -0400, Ali Asad Lotia wrote:
 i would recommend that you look at amavisd-new for spam filtering. it 
 [...snip ...]
 http://www.ijs.si/software/amavisd/

-- 
Etienne GoyerLinux Québec Technologies Inc.
http://www.LinuxQuebec.com   [EMAIL PROTECTED]


Re: Moving mail to a new machine

2003-10-15 Thread Gordon
Gordon wrote:

I previously had my imap server running on one machine that I had set 
up myself. I had several folders beside my inbox. I recently built a 
new machine with a new version of Redhat and I've built and installed 
the latest version of cyrus.

I have cyrus running and configured but I'm having a heck of a time 
getting to my old mail files. What I've done is copy the whole 
directory tree of my mail files to the directory 
/var/spool/imap/g/user/gmc. I've gone into cyradm and created a 
mailbox called user.gmc and set the acl to write. I use mozilla for 
email and I was able to set it up and I can now see the emails from my 
old inbox. The problem is that I can't figure out how to get to the 
email that are in the other folders. They're in directories under the 
directory stated above. Can anyone help with this bit? Was there an 
easier way to do this?

Gordon



I finally got it worked out yesterday and this is what I did. It's not 
pretty, pretty ugly in fact, but it appears to have worked. Remember 
that the machine I'm moving my mail to I a brand new installation so I 
have the luxury of being able to break things and try them again.

1. In cyradm I ran cm user.gmc to create my mailbox.
2. In mozilla mail, I added an account to access the imap server. I was 
able to see the new inbox so that was well.
3. Also in mozilla mail, I started creating folders and subfolders to 
match the directory structure that I had on my old machine. I now had a 
directory /var/spool/imap/g/user/gmc with a bunch of subdirs for the 
folders.
4. Shutdown the cyrus server. May or may not be necessary, but I didn't 
want to corrupt anything by having cyrus running at this point.
5. Cd to /var/spool/imap/g/user/gmc and run rsync -av -e ssh 
oldmachine:/var/spool/imap/user/gmc/ .. This operation copied the mail 
files and cyrus metafiles from the old machine to the new machine. Since 
I had CAREFULLY created the directory tree already using mozilla mail 
and MADE SURE the directory tree was the same between the old machine 
and new machine, I now had populated mail folders.
6. Restart cyrus and check that I could see the messages in mozilla.



deliver.db and related issues

2003-10-15 Thread Ben Carter
Cyrus: v2.1.15
OS: Solaris 8
Berkeley DB 4.1.25
I believe I read all of the recent threads on deliver.db issues in the 
archives for this mailing list, but I still have some questions:

First of all we have duplicate delivery suppression turned off.  
However, deliver.db still seems to be maintained.  I saw a post about
it being needed for sieve too but we don't plan to use sieve either.  My 
question is, can I totally disable the use of deliver.db
without making code changes?

(For now, we changed deliver.db to skiplist since BDB format was causing 
hung and 'signaled to death by 10/11' lmtpd processes)

Also, can the periodic execution of ctl_cyrusdb -c be safely disabled 
if one used a cron entry to make copies of the mailboxes file etc?

Finally, since we have no Berkely DB files, what are all the __db... 
files that get created in the 'db' subdirectory and why is one of
them 2MB in size?  Our test mailboxes file is only 72 bytes...

Thanks,

Ben

Ben Carter
University of Pittsburgh
[EMAIL PROTECTED]
412-624-6470



Re: deliver.db and related issues

2003-10-15 Thread Rob Siemborski
On Wed, 15 Oct 2003, Ben Carter wrote:

 First of all we have duplicate delivery suppression turned off.
 However, deliver.db still seems to be maintained.  I saw a post about
 it being needed for sieve too but we don't plan to use sieve either.  My
 question is, can I totally disable the use of deliver.db
 without making code changes?

No.

 (For now, we changed deliver.db to skiplist since BDB format was causing
 hung and 'signaled to death by 10/11' lmtpd processes)

 Also, can the periodic execution of ctl_cyrusdb -c be safely disabled
 if one used a cron entry to make copies of the mailboxes file etc?

You probably still want to checkpoint, since otherwise recovery will take
much longer.  Note that this is more or less a noop for skiplist.

 Finally, since we have no Berkely DB files, what are all the __db...
 files that get created in the 'db' subdirectory and why is one of
 them 2MB in size?  Our test mailboxes file is only 72 bytes...

Those are Berkeley DB log files.

Did you have a berkeley db setup at one time?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Moving mails from file-system to Cyrus

2003-10-15 Thread Alexander Czernay
I'm moving my mail-server from plain Postfix+Popper to Postfix+Cyrus.
For the existing accounts I want to move the existing mail from the 
file-system to Cyrus. Is there any import-feature?

Thanks for any help,
Alexander


--
_
Alexander Czernay
IT-Consulting  Media Development
fon +49-40-41096742
fax +49-40-41096743
icq 4773650
[EMAIL PROTECTED]
www.czernay.com
_



Re: [Exim] AUTH= support for lmtp transport

2003-10-15 Thread Pat Lashley
--On Wednesday, October 15, 2003 09:45:18 AM -0700 Kevin P. Fleming 
[EMAIL PROTECTED] wrote:

To each his own... These sites have no more knowledgeable users, and
don't have any intentions of using any MUAs beyond Outlook Express. In
another situation, sure, what you're describing makes sense.
It's never a good idea to assume that all of your users will remain
completely clueless...
There is another big advantage to my method - it requires absolutely
no coding, no need to maintain a patchset or attempt to get a patchset
integrated into the distribution.  Just manually add an explicit
'anyone p' ACL to every existing mailbox and every new INBOX you
create.  It will be inherited automatically by any new sub-mailboxes.
(INBOXes have an implicit 'anyone p' which is not inherited.  Making
it explicit will enable the inheritance.)


-Pat

Reserve your right to think, for even to think wrongly is better
than not to think at all
To teach superstitions as truth is a most terrible thing.
-Hypatia  370(?)-415 AD


Cyrus SASL 2.1.16-BETA Released

2003-10-15 Thread Rob Siemborski
I'm pleased to announce the release of Cyrus 2.1.16-BETA on
ftp.andrew.cmu.edu.  This release contains significant changes in a
variety of areas, including the SQL auxprop plugin, Win32 support,
writable auxiliary property support, and the use of newer versions of the
GNU autotools.  As such, it is being labeled as beta-quality.

I'd like to thank all of the people who helped contribute to this release,
especially Alexey Melnikov, who did substantial work towards the Win32
port.

Download at:
ftp://ftp.andrew.cmu.edu/pub/cyrus/cyrus-sasl-2.1.16-BETA.tar.gz
or
http://ftp.andrew.cmu.edu/pub/cyrus/cyrus-sasl-2.1.16-BETA.tar.gz

Please send any feedback either to [EMAIL PROTECTED]
(public list) or to [EMAIL PROTECTED]

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski | Andrew Systems Group * Research Systems Programmer
PGP:0x5CE32FCC | Cyert Hall 207 * [EMAIL PROTECTED] * 412.268.7456
-BEGIN GEEK CODE BLOCK
Version: 3.12
GCS/IT/CM/PA d- s+: a-- C$ ULS$ P+++$ L+++() E W+ N o? K-
w O- M-- V-- PS+ PE++ Y+ PGP+ t+@ 5+++ R@ tv-@ b+ DI+++ G e h r- y?
--END GEEK CODE BLOCK-



Re: deliver.db and related issues

2003-10-15 Thread Ben Carter
Rob Siemborski wrote:

On Wed, 15 Oct 2003, Ben Carter wrote:

 

First of all we have duplicate delivery suppression turned off.
However, deliver.db still seems to be maintained.  I saw a post about
it being needed for sieve too but we don't plan to use sieve either.  My
question is, can I totally disable the use of deliver.db
without making code changes?
   

No.
 

OK.

 

(For now, we changed deliver.db to skiplist since BDB format was causing
hung and 'signaled to death by 10/11' lmtpd processes)
Also, can the periodic execution of ctl_cyrusdb -c be safely disabled
if one used a cron entry to make copies of the mailboxes file etc?
   

You probably still want to checkpoint, since otherwise recovery will take
much longer.  Note that this is more or less a noop for skiplist.
We're thinking of having a cron job that locks the mailboxes file (flat file) and just 
copies
it to a different disk occasionally.  So, I'm assuming in this case that I wouldn't
need recovery using ctl_cyrusdb at all, since we don't care about the
deliver.db file's recovery.  Am I correct?
I'm not trying to re-invent the wheel, but just trying to simplify the Cyrus
part of our server's configuration.  I don't like ctl_cyrusdb calling BDB
routines at all (especially since we have no BDB files) because if it gets hung
or spews error messages to syslog, both of which it's done to us, we'd rather
just avoid it.  If there is a way to get ctl_cyrusdb to just backup the flat
mailboxes file and do its noop for the skiplist deliver.db that would be fine
with us too.
 

Finally, since we have no Berkely DB files, what are all the __db...
files that get created in the 'db' subdirectory and why is one of
them 2MB in size?  Our test mailboxes file is only 72 bytes...
   

Those are Berkeley DB log files.

Did you have a berkeley db setup at one time?
 

We did, but I wiped out db/*, db.backup1/* and db.backup2/* and these files
reappeared - I assume they were created by ctl_cyrusdb.
Thanks,

Ben

Ben Carter
University of Pittsburgh
[EMAIL PROTECTED]
412-624-6470




Re: [Exim] AUTH= support for lmtp transport

2003-10-15 Thread Craig Ringer
To each his own... These sites have no more knowledgeable users, and
don't have any intentions of using any MUAs beyond Outlook Express. In
another situation, sure, what you're describing makes sense.
It's never a good idea to assume that all of your users will remain
completely clueless...
I guess it depends where you work. I'm unfortunate enough that it's a 
99% safe bet at my place of work :-(
training? What's training?

I do see your point, but I'd be willing to accept the results if a user 
/did/ reconfigure their mailer to use the high port. I guess it depends 
on exactly why you need the delete-prevention.

There is another big advantage to my method - it requires absolutely
no coding, no need to maintain a patchset or attempt to get a patchset
integrated into the distribution.
That's why I was suggesting just moving to a high port - it's simple and 
there's no coding involved ;-) Nonetheless, it was only an idea - 
suggested in case it'd work in your environment.

Craig Ringer



cyradm not responding

2003-10-15 Thread dkoobs
I have a new install of Cyrus-2.1.15 on RH9. The imap server is running I can telnet 
into port 143), but cyradm does not work.  When I first tried to run cyradm, it gave 
me an error that it couldn't find Cyrus/IMAP/Shell.pm. So, I copied Shell.pm to 
/usr/lib/perl5/5.8.0/Cyrus/IMAP. Now when I run it, nothing happens, and the command 
prompt returns. Nothing is logged in imap.log or messages about cyradm. 

I've also copied the ntire contents (from the source) of 
cyrus-imapd-2.1.15/perl/imap/IMAP into 
/usr/lib/perl5/5.8.0/Cyrus/IMAP

but still no reponse.

Any idea how to fix this?

Thanks,

Doug 



Moving IMAP from one server to another

2003-10-15 Thread Adam Fox
Hi all,

I'm in the process of moving / upgrading our Cyrus IMAP server. We are
currently running Cyrus IMAP 2.1.3 on Redhat Linux 7.2 which has been
working fine, but the server is now under too much load as the number of
email users has grown, and the server is used for other tasks such as DNS,
DHCP. We've got a new server setup to move the existing IMAP data to, which
is running Cyrus IMAP 2.1.15 and Cyrus SASL 2.1.15.

I don't see any problems moving the IMAP folders across - just move the
/var/spool/imap and /var/imap over. The problem I've got at the moment is
moving the sasldb2 across. We're using the auxprop mechanism to authenticate
our users and have just been adding passwords for users with the saslpasswd2
command. I copied the /etc/sasldb2 file over to the new server and did a
sasldblistusers2, and it lists all the users, but in the domain of the
original server. So it lists me as [EMAIL PROTECTED] for
example.

Is there a way to change the realms of the users in the sasldb2 file to be
the realm of the new server? Or any other suggestions?

Thanks

Adam Fox


Attention:
The information contained in this message and or attachments is intended only for the 
person or entity to which it is addressed and may contain confidential and/or 
privileged material.  Any review, retransmission, dissemination or other use of, or 
taking of any action in reliance upon, this information by persons or entities other 
than the intended recipient is prohibited. If you received this in error, please 
contact the sender and delete the material from any system and destroy any copies.

Any views expressed in this message are those of the individual sender and may not 
necessarily reflect the views of The Gribbles Group.

Thank You.

Whilst every effort has been made to ensure that this e-mail message and any 
attachments are free from viruses, you should scan this message and any attachments.
Under no circumstances do we accept liability for any loss or damage which may result 
from your receipt of this message or any attachment.