Re: Cyrus Muder: determine backend of a mailbox

2010-09-22 Thread Andrew Morgan
On Wed, 22 Sep 2010, Torsten Schlabach wrote:

> Dear list!
>
> We are running a Cyrus Murder configuration.
>
> In the mailboxlist (which I can get using ctl_mboxlist, I can see on 
> which backend each mailbox resides physically.
>
> Is there any way to extract that information through the IMAP protocol?
>
> What I mean is, I can issue a command:
>
> list "Mail" "*"
>
> but the output will not list the backend that the mailbox / folder sits 
> on.
>
> Are there any options I could use for that?
>
> Or am I on the wrong path and I should achieve this in a different way.
>
> I hope ctl_mboxlist is not the only way to access this information.

Here is a chunk of perl code which uses IMAP to get the mailbox 
location/backend:

##
# Locate which backend a mailbox is on
##
sub locatemailbox {
 my ($server, $authuser, $authpw, $mailbox) = @_;
 my $location = "";

 use Mail::IMAPClient;

 my $imap = Mail::IMAPClient->new(
 Server => $server,
 User => $authuser,
 Password => $authpw,
 Ssl => 1,
 );
 if (! $imap) {
 die("Cannot connect to mail server '$server' to locate mailbox 
- $!");
 }

 my @results = $imap->tag_and_run(qq/GETANNOTATION $mailbox "*" 
"value.shared"/);

 $imap->logout;

 foreach my $r (@results) {
 $r =~ s/\r//g;
 $r =~ s/\n//g;
 if ($r =~ /\/vendor\/cmu\/cyrus-imapd\/server" 
\("value.shared""(.*)"\)$/) {
 $location = $1;
 }
 }

 if ($location eq '') {
 die("Cannot locate mailbox '$mailbox'.\n");
 }

 return $location;
}



$mailbox is something like "user.morgan".  Basically, you need to look at 
the mailbox annotations to get this.  There are other interesting things 
in the annotations.  Here are the annotations on my own mailbox:

condstore: false
duplicatedeliver: false
lastpop:
lastupdate: 22-Sep-2010 10:01:36 -0700
partition: p4
pop3newuidl: true
server: cyrus-be3.onid.oregonstate.edu
sharedseen: false
size: 67386044


Andy

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


Re: Cyrus Muder

2007-11-26 Thread Derwyn Dpenha
Hi All,
> Is your postfix running chrooted? If yes check in master.cf that at least
> lmtp is not running chrooted.
I was trying murder on Fed box and came across this on
http://cyrusimap.web.cmu.edu/imapd/install-murder.html

Delivering mail
To deliver mail to your Murder, configure your MTA just as you did
before, but instead of connecting directly to lmtpd, it should connect
to lmtpproxyd. You can connect to the lmtpproxyd running on the
frontend machines, or you can install master and lmtpproxyd on your
SMTP servers.

My cyrus.conf does seem to have
frontend
  lmtp  cmd="lmtpproxyd -a" listen="*:lmtp" prefork=1

master
  lmtp cmd="lmtpd" listen="*:lmtp" prefork=1
  lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=1

backend
  lmtp  cmd="lmtpd -a" listen="*:lmtp" prefork=1
  lmtpunix  cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=1

The debug logs I get in cyrus is

Nov 26 16:41:48 location postfix/lmtp[29178]: match_list_match:
location.exampledomain.com: no match
Nov 26 16:41:48 location postfix/lmtp[29178]: flush_add: site
location.exampledomain.com id 7A25311E5AB status 4
Nov 26 16:41:48 location postfix/lmtp[29178]: smtp_loop: got 1 of 1
end-of-data replies
Nov 26 16:41:48 location postfix/lmtp[29178]: name_mask: resource
Nov 26 16:41:48 location postfix/lmtp[29178]: name_mask: software
Nov 26 16:41:48 location postfix/lmtp[29178]: scache_clnt_save_dest:
dest_label=lmtp:[192.168.50.77]:24 dest_prop=4096
endp_label=lmtp:[192.168.50.77]:24
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr request = save_dest
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr ttl = 2
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr label =
lmtp:[192.168.50.77]:24
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr property = 4096
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr label =
lmtp:[192.168.50.77]:24
Nov 26 16:41:48 location postfix/lmtp[29178]: private/scache: wanted
attribute: status
Nov 26 16:41:48 location postfix/lmtp[29178]: input attribute name: status
Nov 26 16:41:48 location postfix/lmtp[29178]: input attribute value: 0
Nov 26 16:41:48 location postfix/lmtp[29178]: private/scache: wanted
attribute: (list terminator)
Nov 26 16:41:48 location postfix/lmtp[29178]: input attribute name: (end)
Nov 26 16:41:48 location postfix/lmtp[29178]: scache_clnt_save_endp:
endp=lmtp:[192.168.50.77]:24
prop=3?192.168.50.77:24?192.168.50.77?192.168.50.77?6144?15?1196075807?4096
fd=16
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr request = save_endp
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr ttl = 2
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr label =
lmtp:[192.168.50.77]:24
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr property =
3?192.168.50.77:24?192.168.50.77?192.168.50.77?6144?15?1196075807?4096
Nov 26 16:41:48 location postfix/lmtp[29178]: private/scache: wanted
attribute: dummy
Nov 26 16:41:48 location postfix/lmtp[29178]: input attribute name: dummy
Nov 26 16:41:48 location postfix/lmtp[29178]: input attribute value: (end)
Nov 26 16:41:48 location postfix/lmtp[29178]: private/scache: wanted
attribute: (list terminator)
Nov 26 16:41:48 location postfix/lmtp[29178]: input attribute name: (end)
Nov 26 16:41:48 location postfix/lmtp[29178]: private/scache: wanted
attribute: status
Nov 26 16:41:48 location postfix/lmtp[29178]: input attribute name: status
Nov 26 16:41:48 location postfix/lmtp[29178]: input attribute value: 0
Nov 26 16:41:48 location postfix/lmtp[29178]: private/scache: wanted
attribute: (list terminator)
Nov 26 16:41:48 location postfix/lmtp[29178]: input attribute name: (end)
Nov 26 16:41:48 location postfix/lmtp[29178]: deliver_request_final: send: "" -1
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr status =
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr diag_type =
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr diag_text =
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr mta_type =
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr mta_mname =
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr action =
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr reason =
Nov 26 16:41:48 location postfix/lmtp[29178]: send attr status = 4294967295
Nov 26 16:41:48 location postfix/lmtp[29178]: master_notify: status 1
Nov 26 16:41:48 location postfix/lmtp[29178]: connection closed


Wanted to know as to how to debug lmtpproxyd.

and wondering what I'm doing wrong here...

Derwyn

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Cyrus Muder

2007-11-23 Thread Simon Matter
> Hi,
> Have been googling for a while now on murder and trying a test set it
> up on fedora + Mailscanner + postfix + ldap.
> when I run
> mupdatetest -u murder -a murder -w murder master (where murder is the
> username and passwd and master is the name  of the master mc defined
> in /etc/hosts file.) All seems to worl fine from the fronend as well
> as the backend I can authenticate.
> The problem arises when I try to send mails from the front end I keep
> getting a  error
>
> Nov 23 12:28:59 location postfix/lmtp[19396]: 2DE2E11E5C6:
> to=<[EMAIL PROTECTED]>, relay=none, delay=68543,
> delays=68542/0.37/0/0, dsn=4.4.1, status=deferred (connect to
> location.exampledomain.com[/var/imap/socket/lmtp]: Connection refused)
>
> Cant seem to figure this one out... Has any one faced the same problem
> before?

Is your postfix running chrooted? If yes check in master.cf that at least
lmtp is not running chrooted.

Regards,
Simon


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html