Problem with cyrus and virtdomains option

2003-06-16 Thread Marco Pizzi
Hi to all,

I'm sorry but I'm very newbie with cyrus.
I've installed cyrus-imapd-2.2.0.a and cyrus-sasl-2.1.13_2 on a
FreeBSD 5.0 server with Sendmail 8.12.6p2/8.12.6
 I've got problems with virtual domains :(
If I have this maiboxes:

--
localhost.domain.it lm
user/[EMAIL PROTECTED]
user/marco.pizzi
--

with testdomain.it in the sendmail.cw file (local-host-names file)


and with  sendmail.cf modified as follow:

Mcyrusv2,   P=[IPC], F=lsDFMnqXzA@/:|m,
S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n,
T=DNS/RFC822/SMTP,
A=FILE /usr/local/etc/imap/socket/lmtp

I've got the following error:

Jun 16 10:29:07 pe2650 sm-mta[1172]: h5G8T71n001172: from=[EMAIL PROTECTED], 
size=394, class=0, nrcpts=1, msgid=200306160829.h5G8T7
[EMAIL PROTECTED], proto=ESMTP, daemon=MTA, relay=localhost.test.it [127.0.0.1]
Jun 16 10:29:07 pe2650 sendmail[1171]: h5G8T7xf001171: [EMAIL PROTECTED], 
ctladdr=marcolin (102/20), delay=00:00:00, xdelay=00:0
0:00, mailer=relay, pri=30048, relay=localhost.test.it. [127.0.0.1], dsn=2.0.0, 
stat=Sent (h5G8T71n001172 Message accepted for delivery)
Jun 16 10:29:07 pe2650 sm-mta[1174]: h5G8T71n001172: to=[EMAIL PROTECTED], 
delay=00:00:00, xdelay=00:00:00, mailer=cyrusv2, pri=3
0394, relay=localhost, dsn=5.1.1, stat=User unknown
Jun 16 10:29:07 pe2650 sm-mta[1174]: h5G8T71n001172: h5G8T71n001174: DSN: User unknown

What is wrong with my configuration?
Thanks for your precious attention.

Best regards,

--

Marco. 



Re: Fwd: Problem with cyrus and virtdomains option

2003-06-16 Thread Hank Beatty
On Mon, 2003-06-16 at 06:44, Marco Pizzi wrote:
 Hello again,
 
 It looks like that sendmail strips away the domain of the receiver when it is
 recognized as local.
 Have you ever encountered this problem?

Here is a portion of my sendmail.mc file that will leave the domain
portion attached for local delivery:

OSTYPE(linux)dnl
define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')dnl
define(`confLOCAL_MAILER', `cyrusv2')dnl
FEATURE(`nocanonify')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`use_cw_file')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl
MAILER(`cyrusv2')dnl

LOCAL_RULE_0
R$=L  @ $=w . $: @ $1`@'$2special local names
R$+  @ $j .   $: $1   leave untouched if @$j
R$+  @ $=w .  $: $1`@'$2  regular local name')
Rbb + $+  @ $=w . $#cyrusbb $: $1

---

Please note that this server is not an Internet facing mail server.
Which means that any mail that makes it to this server should be for a
mailbox that is actually on this server.

Regards,
-- 
Hank Beatty [EMAIL PROTECTED]



[no subject]

2003-06-16 Thread Daniel Qian
In the /var/imap/db directory of my email server I noticed several backup 
files:
__db.001  __db.002  __db.003  __db.004  __db.005  log.01 mailbox.dump
I figure I may use these files to restore messages in mailboxes. But I 
couldn't find any documentation as to how these files are created and how I 
could use them to restore mailboxes. Anyone can give me some ideas how they 
work or point me to some resources where I can get to know how?

 
Best Regards,
Daniel Qian




Re:

2003-06-16 Thread Ken Murchison


Daniel Qian wrote:
In the /var/imap/db directory of my email server I noticed several backup 
files:
__db.001  __db.002  __db.003  __db.004  __db.005  log.01 mailbox.dump
I figure I may use these files to restore messages in mailboxes. But I 
couldn't find any documentation as to how these files are created and how I 
could use them to restore mailboxes. Anyone can give me some ideas how they 
work or point me to some resources where I can get to know how?
These files are for restoring the mboxlist.db, they can not be used to 
restore messages.  If you deleted a message file and don't have a 
backup, you're screwed.

--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp


Can't delete old folders from before ALTNAMESPACE

2003-06-16 Thread Lee
Hey All,
One of our users has the following folders listed in his account:
user/joe/INBOX/A =D (\HasChildren)
user/joe/INBOX/A =D/Accounts (\HasNoChildren)
These folders don't exist because the were remnants of our mail system 
before we turned on ALTNAMESPACE. The problem is that when I try to 
delete the folder in cyradm or in outlook, cyrus just returns errors.

Any ideas?

Thanks,
Lee


Re: Can't delete old folders from before ALTNAMESPACE

2003-06-16 Thread Ken Murchison
Quoting Lee [EMAIL PROTECTED]:

 Hey All,
 One of our users has the following folders listed in his account:
 
 user/joe/INBOX/A =D (\HasChildren)
 user/joe/INBOX/A =D/Accounts (\HasNoChildren)
 
 These folders don't exist because the were remnants of our mail system 
 before we turned on ALTNAMESPACE. The problem is that when I try to 
 delete the folder in cyradm or in outlook, cyrus just returns errors.
 
 Any ideas?

You should be able to delete these from within cyradm as an admin, unless 
somebody deleted stuff by hand from the filesystem.

What errors are you getting from cyradm?

-- 
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp


Re: Can't delete old folders from before ALTNAMESPACE

2003-06-16 Thread Lee
You should be able to delete these from within cyradm as an admin, 
unless
somebody deleted stuff by hand from the filesystem.
I think that might be the problem.

When i try to SAM the folders pre-deletion in cyradm, i get a:

setaclmailbox: admin: lcp: System I/O error

Is there a way to force remove cyrus' internal list of those folders?

L

On Monday, June 16, 2003, at 01:50 PM, Ken Murchison wrote:

Quoting Lee [EMAIL PROTECTED]:

Hey All,
One of our users has the following folders listed in his account:
user/joe/INBOX/A =D (\HasChildren)
user/joe/INBOX/A =D/Accounts (\HasNoChildren)
These folders don't exist because the were remnants of our mail system
before we turned on ALTNAMESPACE. The problem is that when I try to
delete the folder in cyradm or in outlook, cyrus just returns errors.
Any ideas?
You should be able to delete these from within cyradm as an admin, 
unless
somebody deleted stuff by hand from the filesystem.

What errors are you getting from cyradm?

--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp



Re: Can't delete old folders from before ALTNAMESPACE

2003-06-16 Thread Rob Siemborski
On Mon, 16 Jun 2003, Lee wrote:

  You should be able to delete these from within cyradm as an admin,
  unless
  somebody deleted stuff by hand from the filesystem.

 I think that might be the problem.

Don't do that! ;)

To fix the problem, recreate the directories in the filesystem,
reconstruct the mailboxes, and then delete them properly via cyradm.

 Is there a way to force remove cyrus' internal list of those folders?

Not any easy ways, there are some test utilities for cyrusdb functionality
that let you manipluate the database on a per-key basis.  They're in the
distribution, but they're a use-at-your-own-risk sort of thing.

-Rob

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



Re: Can't delete old folders from before ALTNAMESPACE

2003-06-16 Thread John Alton Tamplin
Lee wrote:

You should be able to delete these from within cyradm as an admin, 
unless
somebody deleted stuff by hand from the filesystem.
I think that might be the problem.

When i try to SAM the folders pre-deletion in cyradm, i get a:

setaclmailbox: admin: lcp: System I/O error

Is there a way to force remove cyrus' internal list of those folders?
If you deleted them without Cyrus knowing about it, your best bet is to 
take Cyrus down, dump the mboxlist (ctl_mboxlist -d file.txt), edit the 
text version of the file to remove things that are no longer there, and 
then undump the mboxlist (ctl_mboxlist -u -f file.txt), and then bring 
everything up.  You really should not be deleting things under Cyrus's 
control except through Cyrus.

--
John A. Tamplin   Unix System Administrator
Emory University, School of Public Health +1 404/727-9931



Re: Can't delete old folders from before ALTNAMESPACE

2003-06-16 Thread Lee
I created the directories spool/imap/user/joe/INBOX and INBOX/A =D and 
INBOX/A =D/Accounts, then i ran recontruct -R on user/joe, but that 
just returned the following errors:

user.joe.INBOX.A =D: System I/O error Bad file descriptor
user.joe.INBOX.A =D.Accounts: System I/O error Bad file descriptor
This is odd since we're using the / as the directory seperator not . 
(which we used to use a long time ago).

BTW i also tried creating and reconstructing two top level directory 
folders spool/imap/user.joe.INBOX.A =D and spool/imap/user.joe.INBOX.A 
=D .Accounts, but it didn't change the error I recieved when running 
reconstruct.

Any other ideas?

L

On Monday, June 16, 2003, at 03:16 PM, Rob Siemborski wrote:

On Mon, 16 Jun 2003, Lee wrote:

You should be able to delete these from within cyradm as an admin,
unless
somebody deleted stuff by hand from the filesystem.
I think that might be the problem.
Don't do that! ;)

To fix the problem, recreate the directories in the filesystem,
reconstruct the mailboxes, and then delete them properly via cyradm.
Is there a way to force remove cyrus' internal list of those folders?
Not any easy ways, there are some test utilities for cyrusdb 
functionality
that let you manipluate the database on a per-key basis.  They're in 
the
distribution, but they're a use-at-your-own-risk sort of thing.

-Rob

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



Re: Can't delete old folders from before ALTNAMESPACE

2003-06-16 Thread John Alton Tamplin
Lee wrote:

Will this cause any problems with seen / unseen flags (or anything for 
that matter)?
Seen flags are kept in a different database, under 
/var/imap/user/X/user.seen.  I presume Cyrus gracefully deals with 
nonexistent folders in the seen/sub files, but I haven't looked at that 
part of the code so conceivably that might be a problem.

If you want to be sure, restore the missing directories from backup and 
delete them the proper way though Cyrus.

--
John A. Tamplin   Unix System Administrator
Emory University, School of Public Health +1 404/727-9931



Re: Can't delete old folders from before ALTNAMESPACE

2003-06-16 Thread Lee
Will this cause any problems with seen / unseen flags (or anything for 
that matter)?

L

On Monday, June 16, 2003, at 03:34 PM, John Alton Tamplin wrote:

Lee wrote:

You should be able to delete these from within cyradm as an admin, 
unless
somebody deleted stuff by hand from the filesystem.
I think that might be the problem.

When i try to SAM the folders pre-deletion in cyradm, i get a:

setaclmailbox: admin: lcp: System I/O error

Is there a way to force remove cyrus' internal list of those folders?
If you deleted them without Cyrus knowing about it, your best bet is 
to take Cyrus down, dump the mboxlist (ctl_mboxlist -d file.txt), 
edit the text version of the file to remove things that are no longer 
there, and then undump the mboxlist (ctl_mboxlist -u -f file.txt), and 
then bring everything up.  You really should not be deleting things 
under Cyrus's control except through Cyrus.

--
John A. Tamplin   Unix System Administrator
Emory University, School of Public Health +1 404/727-9931




[PATCH] segfault in pop3proxyd

2003-06-16 Thread Etienne Goyer
Hi,

Here is a fix for a segfault in pop3proxyd.c proxy_authenticate().  It
happen when connecting to a backend whose hostname does not have a
domain part.  In theory, it should never happen but in some fringe
condition (like mine) it could.


-- 
Etienne GoyerLinux Québec Technologies Inc.
http://www.LinuxQuebec.com   [EMAIL PROTECTED]
--- pop3proxyd.c.orig   Mon Jun 16 14:59:18 2003
+++ pop3proxyd.cMon Jun 16 15:25:34 2003
@@ -1160,7 +1160,7 @@

 strcpy(buf, hostname);
 p = strchr(buf, '.');
-*p = '\0';
+p ? *p = '\0' : ;
 strcat(buf, _mechs);

 /* we now do the actual SASL exchange */


Re: squatter

2003-06-16 Thread Christian Schulte
Ken Murchison wrote:

I just committed a similar patch.

Jun 16 22:48:24 smtp squatter[6180]: done indexing mailboxes

Wow...I did not see that for months in the logs.
After latest cvs update all my squatter-problems seem to be gone. The 
latest change to squat_build.c and squatter.c did it! Thanks a lot!

--Christian




Re: help me please

2003-06-16 Thread RYAN M vAN GINNEKEN

--

- Original Message -

DATE: Mon, 16 Jun 2003 15:29:45
From: RYAN M vAN GINNEKEN [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: 

Ok it is me again i did some major updates on my server this weekend and seem to have 
fixed the SIGHUP problem now i have a new problem

i run freebsd 4.8
cyrus-imapd-2.1.13
cyrus-sasl-2.1.13_4
and db3-3.3.11,1 dont know if that has anything to do with things

see below for the rest of my info
problem #1
for some reason no matter how many times i set my /var/imap and /var/spool/imap to 
user cyrus and group mail it changes back to user cyrus group cyrus
problem #2
my logs do not work /var/log/imap.log /var/log/auth.log
they are always empty
problem #3
when i do this
[Mon Jun 16] 03:14 PM [0]
v20.computerking.ca  ~ $su cyrus
Password:
Sorry
[Mon Jun 16] 03:15 PM [0]
v20.computerking.ca  ~ $cyradm -u rmvg localhost
cyradm: cannot authenticate to server with  as rmvg
i get this in my syslog 

Jun 16 15:07:22 v20 last message repeated 2 times
Jun 16 15:14:49 v20 su: BAD SU rmvg to cyrus on /dev/ttyp2
Jun 16 15:15:10 v20 su: BAD SU rmvg to cyrus on /dev/ttyp2
Jun 16 15:15:32 v20 imapd[1681]: OTP unavailable because can't read/write key 
database /etc/opiekeys: Permission denied
Jun 16 15:15:32 v20 imapd[1681]: no user in db
Jun 16 15:15:32 v20 imapd[1681]: client response doesn't match what we generated
Jun 16 15:15:32 v20 imapd[1681]: badlogin: localhost.computerking[127.0.0.1] 
DIGEST-MD5 [SASL(-13): authentication failure: client response doesn't match what we 
generated]
Jun 16 15:15:35 v20 perl: No worthy mechs found

so i tryed this
saslpasswd2 -c rmvg
Password:
Again (for verification):

and got this in syslog
Jun 16 15:18:10 v20 ctl_cyrusdb[1684]: checkpointing cyrus databases
Jun 16 15:18:12 v20 ctl_cyrusdb[1684]: done checkpointing cyrus databases
Jun 16 15:20:06 v20 saslpasswd2: Could not open db
Jun 16 15:20:07 v20 saslpasswd2: SASL error opening password file. Do you have write 
permissions?
Jun 16 15:20:07 v20 saslpasswd2: Could not open db for write
Jun 16 15:20:07 v20 saslpasswd2: SASL error opening password file. Do you have write 
permissions?
Jun 16 15:20:07 v20 saslpasswd2: Could not open db for write
Jun 16 15:20:07 v20 saslpasswd2: SASL error opening password file. Do you have write 
permissions?
Jun 16 15:20:07 v20 saslpasswd2: Could not open db for write
Jun 16 15:20:07 v20 saslpasswd2: SASL error opening password file. Do you have write 
permissions?
Jun 16 15:20:07 v20 saslpasswd2: Could not open db for write

help 
--
- Original Message -

DATE: Sat, 14 Jun 2003 02:31:07
From: RYAN M vAN GINNEKEN [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: 

ok i have been working on this cyrus thing for about a year now 
and still cannot get things to work.  Please help
mostly i could not creat mail boxes but since the last time i tied that some othe 
stuff has gon wrong see below.

added the following lines to my /etc/syslog.conf

local6.*   /var/log/imapd.log
auth.*  /var/log/auth.log
daemon.*/var/log/daemon.log


my /var/log directory listing and permissions are these correct
because i get nothing in my log they are both empty

-rw-r--r--  1 root  wheel   0 Dec 31 19:33 imapd.log
-rw---  1 root  wheel Jun 14 01:02 auth.log


my imapd.conf file
#==
# /usr/local/etc/imapd.conf @v20
#==
configdirectory: /var/imap
partition-default: /var/spool/imap
admins: rmvg
sasl_pwcheck_method: saslauthd

#end of file
#==

the two directories mentioned in the config file above
are these the right permissions
/var/spool
drwxr-x---  12 cyrus   mail 512 Jun 14 01:23 imap
/var/spool/imap
drwxr-x---  4 cyrus  mail 512 Jan 29 01:51 imap

v20.computerking.ca  /var/spool #su cyrus
%tools/mkimap
tools/mkimap: Command not found.
WHAT THE ??? THIS DOES NOT SEEM TO WORK

%cd /usr/local/cyrus/bin
%mkimap
mkimap: Command not found.
%
STILL NOTHING

%./mkimap
reading configure file...
i will configure directory /var/imap.
i saw partition /var/spool/imap.
done
creating /var/imap...
creating /usr/sieve...
creating /var/spool/imap...
done
%
OK IT WORKS LOOKS GOOD RIGHT

#
#/etc/cyrus.conf @v20 standard standalone server implementation
#=
START {
  # do not delete this entry!
  recover   cmd=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/imap/socket
SERVICES {
  # add or remove based on 

Re: Cyrus on Red Hat Enterprise Linux

2003-06-16 Thread Craig Ringer
[OT: Yes, I'm aware that there other other Linuces beyond RH, but we're
committed to HP hardware which is only certified for RH and SuSE (one of
my colleagues has been told by an HP engineer that they support Debian but
I've yet to see anything official). We have zero SuSE experience in-house,
so RH kind of have us by the danglies...]
That sounds depressingly like you're talking about MS or some custom 
software vendor, not Red Hat. The price of successful business, I guess.

*sigh*

Craig Ringer




Problem logging into sieveshell

2003-06-16 Thread Jim Norton
Hello all:

I am trying to get the sieve vacation thing working.
However,  sieveshell seems to be unable to log me in.

I never get a fail message,  it just asks me for a 
password 4 times then fails.

I am of course able to log directly into the imap server
via telnet hostname.com imap and then login.

Is it possible to enable sieve scripts without using
sieveshell?

Or,  does anybody have an idea about failing to log into
sieveshell?

Thanks,
Jim



Re: Questions about backup files in /var/imap/db

2003-06-16 Thread Daniel Qian
Ken Murchison [EMAIL PROTECTED] said:

 
 
 Daniel Qian wrote:
  Ken Murchison [EMAIL PROTECTED] said:
  
  
 
 Daniel Qian wrote:
 
 In the /var/imap/db directory of my email server I noticed several 
backup 
 files:
 __db.001  __db.002  __db.003  __db.004  __db.005  log.01 
 
  mailbox.dump
  
 I figure I may use these files to restore messages in mailboxes. But I 
 couldn't find any documentation as to how these files are created and 
how 
 
  I 
  
 could use them to restore mailboxes. Anyone can give me some ideas how 
 
  they 
  
 work or point me to some resources where I can get to know how?
 
 These files are for restoring the mboxlist.db, they can not be used to 
 restore messages.  If you deleted a message file and don't have a 
 backup, you're screwed.
 
 -- 
 Kenneth Murchison Oceana Matrix Ltd.
 Software Engineer 21 Princeton Place
 716-662-8973 x26  Orchard Park, NY 14127
 --PGP Public Key--http://www.oceana.com/~ken/ksm.pgp
 
 
 
  
  
  How could I restore the mboxlist.db from these files? My mboxlist.db file 
is 
  a small file but how come these __db.00X files are much larger?
  I tried ctl_mboxlist -u  mailbox.dump but didn't succeed.
 
 
 These files are generated by checkpointing the Berkeley DB environment, 
 which includes all databases using BDB.  Read the documentation at 
 http://www.sleepycat.com for more details on checkpointing and the log 
 files.
 
 -- 
 Kenneth Murchison Oceana Matrix Ltd.
 Software Engineer 21 Princeton Place
 716-662-8973 x26  Orchard Park, NY 14127
 --PGP Public Key--http://www.oceana.com/~ken/ksm.pgp
 
 
 

It confused me by putting all databases using BDB under a imap directory. 
Anyway I am more concerned about a proper way to backup all my mailbox 
messages. It seems to me that I can backup the content under these 
directories:
/var/imap ; where my mailboxes.db resides
/var/spool/imap/user ; suppose I only care about the messages already in user 
mailboxes

So even on a newly installed empty system resulted from a system crash I 
would still be able to recover everything in mailboxes simply by copying back 
these backup files to where they are before the crash and run a reconstruct.
Correct me if I am missing anything.

Thanks for reply

-- 
Best Regards,
Daniel Qian




Emails change formatting by themselves (when going through cyrus)

2003-06-16 Thread Jason Grindlay
Hi,

I'm trying to track down the root cause of a weird issue that I think 
Cyrus is linked to somehow.  I'm hoping somebody here might of heard of 
something similar or have some suggestions on this as it has me baffled.

To put it briefly rich HTML mail going through Cyrus in one server I 
have seems to change colour during delivery (e.g. sent from client PC as 
 black and arrives as lime green)  or else certain spaces vanish 
leaving the email looking like;
HiBob,

Howis it going?
Itis good here. We arehaving good fun...
(And it is not just typos, I've sent several emails that have been 
confirmed as typed ok that have arrived like this.)

The server that is doing this is built as follows;

Fetchmail gets pop3 mail from ISP
   |
Exim recieves mail and passes it through RAV antivirus
   |
If virus free it depending on exim settings is passed to qpopper or cyrus .
   |
Cyrus recieves the mail via the 'deliver' command and places it in the 
user's inbox.
   |
The client PC uses the InsightConnector plugin for Outlook to connect it 
to Cyrus with better IMAP support than default Outlook.

(running Debian 3.0, Linux kernel 2.2.20 with the latest version of 
Cyrus if that makes any difference)

The thing that makes me think it is related to Cyrus is that users who 
get their mail through qpopper rather than cyrus don't have these 
issues. (Exim under our setup can delivers certain email to qpopper, the 
reast to cyrus) (Yes I know that leaves the IMAP plugin as well but I've 
already looked heavilly into it with their technical support and no 
leads there yet.)

The real weird thing is that I build this server using a series of 
custom debian packages and scripts that I've written (we have several of 
these servers) and every other server built with them has not had this 
issue - the email system works perfectlly for them.

The exim transport setup used for delievery is

local_delivery:
driver = pipe
command = /usr/cyrus/bin/deliver ${local_part}
return_path_add
return_output
prefix = 
user = cyrus
If you want anymore technical details about the setup please ask away.

If anybody has any ideas as to anything that could be wrong with my 
setup I'd be eternally greatful...

--
Regards
Jason Grindlay
SSLnz
Phone:  04-473-4666
Fax:04-472-9450
Mobile: 021-175-6321
http://www.sslnz.com