Re: mbpath output 2.4

2011-09-20 Thread Jonathan McKeown
On Tuesday 20 September 2011 23:33:09 Wolfgang Breyha wrote:
> Hi!
>
> On 2.3 if I ask a murder frontend server with "mbpath user.x" it displays
> backend.fqdn!partition_name
>
> On 2.4 I only get
> Remote Mailbos: user.x
>
> Is that intended behaviour? Is there another way to ask my frontend where a
> mailbox is located instead on 2.4?
>
I normally use cyr_dbtool:

cyr_dbtool /var/imap/mailboxes.db skiplist show user.x

(adjust for path to your mailboxes.db and the database type).

Jonathan

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


mbpath output 2.4

2011-09-20 Thread Wolfgang Breyha
Hi!

On 2.3 if I ask a murder frontend server with "mbpath user.x" it displays
backend.fqdn!partition_name

On 2.4 I only get
Remote Mailbos: user.x

Is that intended behaviour? Is there another way to ask my frontend where a
mailbox is located instead on 2.4?

Greetings, Wolfgang
-- 
Wolfgang Breyha  | http://www.blafasel.at/
Vienna University Computer Center | Austria

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: lmtpproxy not responding after dot on DATA command

2011-09-20 Thread Dan White
On 20/09/11 11:58 +0200, Lanfeust troy wrote:
>I have installed a murder cyrus as following:
>
>first server contain mupdate and all proxy
>second server as backend.
>
>on backend the lmtptest delivery mail correctly

>Now on frontend lmtp
>
>MAIL FROM:
>250 2.1.0 ok
>RCPT TO:
>250 2.1.5 ok
>DATA
>354 go ahead
>
>test from frontend
>.
>
>Server never reply to "."

>Configuration Frontend
>
>cyrus.conf
>*START {*
>* # do not delete this entry!*
>* recover cmd="/usr/sbin/ctl_cyrusdb -r"*
>* delprune cmd="/usr/sbin/cyr_expire -E 3"*
>* tlsprune cmd="/usr/sbin/tls_prune"*
>*}*
>*SERVICES {*
>* imap cmd="proxyd" listen="imap" prefork=0 maxchild=100*
>* imaps cmd="proxyd -s" listen="imaps" prefork=0 maxchild=100*
>* pop3 cmd="pop3proxyd" listen="pop3" prefork=0 maxchild=50*
>* pop3s cmd="pop3proxyd -s" listen="pop3s" prefork=0 maxchild=50*
>* lmtp cmd="lmtpproxyd" listen="lmtp" prefork=1 maxchild=20*
>*}*
>*EVENTS {*
>* checkpoint cmd="/usr/sbin/ctl_cyrusdb -c" period=30*
>* delprune cmd="/usr/sbin/cyr_expire -E 3" at=0401*
>* tlsprune cmd="/usr/sbin/tls_prune" at=0401*
>*}*

If the frontend is the mupdate master, it is missing 'mupdate -m' in
your SERVICES section. See:

http://cyrusimap.org/docs/cyrus-imapd/2.4.9/install-murder.php

>and imapd.conf
>
>*configdirectory: /var/lib/cyrus*
>*defaultpartition: default*
>*partition-default: /var/spool/cyrus/mail*
>*altnamespace: 1*
>*unixhierarchysep: yes*
>*lmtp_downcase_rcpt: yes*
>*allowanonymouslogin: no*
>*autocreatequota: -1*
>*sieveusehomedir: false*
>*hashimapspool: true*
>*allowplaintext: yes*
>*sasl_pwcheck_method: saslauthd*
>*sasl_mech_list: PLAIN LOGIN*
>*virtdomains: userid*
>*tls_cipher_list: TLSv1+HIGH:!aNULL:@STRENGTH*
>*syslog_prefix: cyrus*
>*admins: admin murder*
>*tls_cert_file: /etc/ssl/certs/CS_memolinux.crt*
>*tls_key_file: /etc/ssl/private/memolinux.key*
>*tls_ca_file: /etc/ssl/certs/CA_memolinux.crt*
>*allowusermoves: 1*
>*mupdate_server: 172.16.68.18*
>*mupdate_authname: murder*
>*mupdate_username: murder*
>*mupdate_password: murdercyrus*

You shouldn't need these mupdate_ lines on the mupdate master server.

>*proxy_authname: murder*
>*murderFrontend_password: murdercyrus*
>*murderBack1_password: murdercyrus*
>*murderBack2_password: murdercyrus*
>
>
>Configuration Backend:
>
>cyrus.conf
>*START {*
>* recover cmd="/usr/sbin/ctl_cyrusdb -r"*
>* mupdatepush   cmd="/usr/sbin/ctl_mboxlist -m"*
>* delprune cmd="/usr/sbin/cyr_expire -E 3"*
>* tlsprune cmd="/usr/sbin/tls_prune"*
>*}*
>*SERVICES {*
>* imap cmd="imapd -U 30" listen="imap" prefork=0 maxchild=100*
>* imaps cmd="imapd -s -U 30" listen="imaps" prefork=0 maxchild=100*
>* pop3 cmd="pop3d -U 30" listen="pop3" prefork=0 maxchild=50*
>* pop3s cmd="pop3d -s -U 30" listen="pop3s" prefork=0 maxchild=50*
>* lmtp cmd="lmtpd" listen=":24" prefork=1 maxchild=20*
>*  sieve cmd="timsieved" listen="localhost:sieve" prefork=0 maxchild=100*
>* notify cmd="notifyd" listen="/var/run/cyrus/socket/notify" proto="udp"
>prefork=1*
>*}*
>*EVENTS {*
>* checkpoint cmd="/usr/sbin/ctl_cyrusdb -c" period=30*
>* delprune cmd="/usr/sbin/cyr_expire -E 3" at=0401*
>* tlsprune cmd="/usr/sbin/tls_prune" at=0401*
>*}*
>*
>*
>Imapd.conf:
>
>*configdirectory: /var/lib/cyrus*
>*admins: admin murder*
>*partition-default: /var/spool/cyrus*
>*sasl_pwcheck_method: saslauthd*
>*sasl_mech_list: PLAIN LOGIN*

Consider removing LOGIN from your mech list on the backend, unless you
really need it. LOGIN does not support proxy auth, but PLAIN does.

>*allowplaintext: 1*
>*mupdate_server: 172.16.68.18*
>*mupdate_authname: murder*
>*mupdate_username: murder*
>*mupdate_password: murdercyrus*
>*proxy_authname: murder*
>*murderBack1_password: murdercyrus*
>*murderBack2_password: murdercyrus*
>*murderFrontend_password: murdercyrus*
>*allowanonymouslogin: 0*
>*allowusermoves: yes*
>*altnamespace: yes*
>*unixhierarchysep: yes*
>*lmtp_downcase_rcpt: yes*
>*anysievefolder: 1*
>*sieveusehomedir: 0*
>*hashimapspool: true*
>*virtdomains: userid*
>*fulldirhash: 0*
>*tls_cert_file: /etc/ssl/certs/CS_memolinux.crt*
>*tls_key_file: /etc/ssl/private/memolinux.key*
>*tls_ca_file: /etc/ssl/certs/CA_memolinux.crt*

You're missing the proxyservers entry on the backend.

-- 
Dan White

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: Migration using imapsync

2011-09-20 Thread Andy Bennett
Hi,

> I'm trying to move from an old uw-imap to Cyrus 2.4.8 using imapsync 1.456.
> 
> So far my main problem has been the lack off useful documentation on
> imapsync's part. Specially on the --regextrans2 parameter. I managed
> to figure that one out by 2 days of Googling and trial-error attempts.
> 
> My remaining problem is, how to create parent folders for sub folders.
> 
> The uw-imap folder structure is flat (a list of files) so i would like
> to get related stuff into a tree structure using subfolders.
> 
> I got a bunch of --regextrans2
> 
>   --regextrans2 's#^BURAPA$#Biker Stuff/BURAPA#' \
>   --regextrans2 's#^BikeWeek$#Biker Stuff/BikeWeek#' \
>   --regextrans2 's#^Biker Events$#Biker Stuff/Biker Events#' \
>   --regextrans2 's#^Hard Rock$#Biker Stuff/Hard Rock#' \
>   --regextrans2 's#^John Daytona$#Biker Stuff/John Daytona#' \
> 
> Resulting in correct created subfolders
> 
>   user/testuser/Biker Stuff/bur...@example.com (\HasNoChildren)
>   user/testuser/Biker Stuff/bikew...@example.com (\HasNoChildren)
>   user/testuser/Biker Stuff/Biker eve...@example.com (\HasNoChildren)
>   user/testuser/Biker Stuff/Hard r...@example.com (\HasNoChildren)
>   user/testuser/Biker Stuff/John dayt...@example.com (\HasNoChildren)
> 
> Using Squirrel Mail as client, i would like to collapse those
> folders, to only show "Biker Stuff (unread/total)".
> 
> For this to work, i need the parent folder
> 
>   user/testuser/Biker st...@example.com (\HasChildren)
> 
> To be created. I can do that manually in cyradm or Squirrel Mail, but there's
> too many parent folders needed for each user to do it by hand.
> 
> Any ideas as to how this can be done. Either by imapsync or some clever 
> script?

+ I assume that you build the imapsync command by hand and type it in.
+ I assume that you have a copy of the imapsync command you used in a
file called '/tmp/cmd'.
+ I assume that you have one regextrans2 per line.
+ I assume that you only have one level of subfolders.

You can extract a list of "parent folders" from 'cmd' thusly (storing
them in '/tmp/parents'):

$ cat /tmp/cmd |sed -e 's!.*$#\(.*\)/.*!\1!' |sort -u > /tmp/parents


You can then create those folders on the uw-imap server by touching the
files:

$ cat /tmp/parents | xargs -n1 -d "\n" touch


You can then resync and the missing folders should be created.

Alternatively, instead of touching the files, you can build commands to
pipe to cyradm that will create the folders.






Regards,
@ndy

-- 
andy...@ashurst.eu.org
http://www.ashurst.eu.org/
0x7EBA75FF


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Re: Remove empty partition

2011-09-20 Thread Bron Gondwana
On 09/20/2011 12:26 PM, Giuseppe Ravasio wrote:
> Hi,
>
> I'm doing some fall cleaning on my imap server and now I've a couple of
> empty partitions because I moved the mails away.
>
> I would like to remove those partitions,
> it's safe removing the lines from imapd.conf and restarting cyrus?
> or this may impact some internal db?
>
> Thanks
> Giuseppe
>
> PS: I'm running cyrus 2.3.8
If they're no longer mentioned in any mailboxes.db entry, you
should be fine.

Bron.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Remove empty partition

2011-09-20 Thread Giuseppe Ravasio
Hi,

I'm doing some fall cleaning on my imap server and now I've a couple of 
empty partitions because I moved the mails away.

I would like to remove those partitions,
it's safe removing the lines from imapd.conf and restarting cyrus?
or this may impact some internal db?

Thanks
Giuseppe

PS: I'm running cyrus 2.3.8

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Deletion of accounts not freeing up filestore

2011-09-20 Thread paul.osborne
Hi,

I inherited an elderly version of cyrus (2.3.7-7) on Red Hat 5.5 - yes I
know it is an older version but the latest Red Hat package is (2.3.7-12)
and looking through RedHat's changelog - I don't believe that any
changes affect the issue that I am seeing at the moment.

For reasons unknown to me, deleting accounts appears to remove users
from any internal cyrus databases but not remove the files from the
filestore.

So for example:

# cyradm --user cyrus localhost
localhost.localdomain> info user/azo1
localhost.localdomain>

Which is what I would expect, but in the filestore:
bash-3.2$ ls -la | grep azo1
drwx--5 cyrus mail   4096 Oct 19  2009 azo1

Shows that the mail store for the user has not actually been removed
from disk.

To delete the users we are pulling data out of a mysql database (that
manages accounts) and using perl and the use Cyrus::IMAP perl module to
hook into Cyrus.

The pertinent part of perl script to delete accounts is:

# Setup ACL (permission)s for the cyrus user so that the account
can be removed.
$cyrus->setaclmailbox($mailbox, $cyrus_user, "all" );
if ($cyrus->error) {
# Create a status file to update database with
status/code
fail_with ("Error: Cannot set perms on $mailbox " .
$cyrus->error . "\n");
}

# If ACL is set, attempt to remove account
$cyrus->deletemailbox($mailbox);
if ($cyrus->error) {
# Create a status file to update database with
status/code
fail_with ("Error: Cannot delete $mailbox " .
$cyrus->error . "\n");
}

And we are definitely not getting failure messages, so at this point I
am baffled and leaves me with the following questions:

1. Have I hit a version of Cyrus with a bug? 
2. Are we doing something wrong with the account deletion? 
3. Is there a cyrus process that I need to run in addition to clear out
the filestore (I cannot see anything in the documentation suggesting
that there is).
4. Can I manually remove the mailbox folders to free up disk which is
getting rather lower than I would like? 

Thoughts would be appreciated.

Many thanks

Paul

Paul Osborne
Systems Analyst
Infrastructure Group
Computing Services
Canterbury Christ Church University
Tel: 01227 782751



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/