PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Cyrus imap auf Gentoo



poohbert
11.09.02, 13:47
allo zusammen!

Ich habe massive Probleme beim Konfigurieren/Einbinden des Cyrus imapd. Kompilieren geht ohne Probleme, das Starten der services per /etc/init.d/cyrus und /etc/init.d/saslauthd verläuft auch ohne jegliche Schwierigkeiten. Insgesamt möchte ich den Pfad der Einrichtung gehen, wie er
hier (http://www.linuxforen.de/forums/showthread.php?threadid=30158)
eingeschlagen wurde.
Ich würde mich freuen, wenn sich jemand melden würde, der eine auf Gentoo lauffähige, der auf Linuxforen vorgeschlagenen ähnelnde Cyrus-Installation hat und mir bei der Lösung meiner Probleme helfen kann.

Um noch etwas ins Detail zu gehen:

# nmap localhost
...
143/tcp open imap2
993/tcp open imaps
995/tcp open pop3s
...

# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* BYE Fatal error: can't write proc file
Connection closed by foreign host.

# imtest localhost
connect: Connection refused
failure: Network initialization

# cyradm localhost
Broken pipe

Konfig-Dateien:

/etc/imapd.conf
----------------------
configdirectory: /var/imap
partition-default: /var/spool/imap
sievedir: /var/imap/sieve
admins: cyrus
hashimapspool: yes
allowanonymouslogin: no
allowplaintext: no
sasl_pwcheck_method: saslauthd
quotawarn: 90
defaultacl: anyone lrs

/etc/cyrus.conf
----------------------
# 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
# idled cmd="idled"
}

# UNIX sockets start with a slash and are put into /var/imap/socket
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap2" prefork=0
pop3 cmd="pop3d" listen="pop-3" prefork=0
# Don't forget to generate the needed keys for SSL or TLS
# (see doc/html/install-configure.html)
imaps cmd="imapd -s" listen="imaps" prefork=0
pop3s cmd="pop3d -s" listen="pop3s" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0

# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0

# this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
}

EVENTS {
# this is required
checkpoint cmd="ctl_cyrusdb -c" period=30

# this is only necessary if using duplicate delivery suppression
delprune cmd="ctl_deliver -E 3" period=1440

# this is only necessary if caching TLS sessions
tlsprune cmd="tls_prune" period=1440
}

So... ich hoffe, diese Informationen sind nützlich.
Vielen Dank schon mal für Tipps!
Ich bin nach jetzt 4 Stunden Internetrecherche und Rumprobierens am Ende...

phoen][x
11.09.02, 13:52
Ich hab noch nie cyrus installiert, aber hast du vielleicht noch eine Konfigdatei in /etc/conf.d uebersehen?

Hast du irgendwas an den configs geaendert oder ist das die Standardconfig?

Welche Version von cyrus-imapd?

ich mach mal ein "emerge cyrus-imapd".

-phoen][x-

poohbert
11.09.02, 13:59
das ist weitestgehend die standardconfig...
hab mich ja an die anleitung auf Linuxforen gehalten - bis zu dem punkt, an dem ich feststellen musste, dass ich mich auf keine mir bekannte weise connecten kann...

an der /etc/cyrus.conf hab ich nur listen="imap" auf listen="imap2" gesetzt, weil es imap in /etc/services nicht gab - heißt da imap2.. ähnlich auch mit pop3 und pop-3.

Diese Änderung bewirkte dann, dass nmap einen offene imap2 port gefunden hat - sonst nichts.

phoen][x
11.09.02, 14:28
Also ich hab "emerge cyrus-imapd" gemacht und danach die beiden Ports in /etc/cyrus.conf geaendert. Anschliessend "/etc/init.d/saslauthd start" und "/etc/init.d/cyrus start. Mit telnet connected, scheint zu gehen:


whb01694 imap # telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK whb01694.bswg.telekom.de Cyrus IMAP4 v2.1.5 server ready


Ach so, meine Version ist cyrus-imapd-2.1.5-r1.

Was sagt denn dein logging?

-phoen][x-

poohbert
11.09.02, 14:33
hehe
du wirst lachen
es sagt gar nichts---
imapd.log ist leer...
und in anderen logfiles findet sich auch nichts interessantes

mich wundert jetzt echt, dass das ganze bei dir so reibungslos ging...
ich hab auch nichts weiter verändert
am besten ich mach nochmal
emerge -C cyrus-imapd saslauthd
und probiers nochmal von neuem...

bekloppte sache:rolleyes:

phoen][x
11.09.02, 14:47
Hast du denn alles gemacht was am Ende von "emerge cyrus-imapd" kommt?

-phoen][x-

poohbert
11.09.02, 14:50
ach, du meinst

* ************************************************** ***************
* * WARNING: If you change the fs-type of /var/imap or *
* * /var/spool/imap you should read step 9 of *
* * /usr/share/doc/cyrus-imapd-2.1.9/html/install-configure.html. *
* * Setting /var/imap/user/* and /var/imap/quota/* to synchronous *
* * updates. *
* * Setting /var/spool/imap/* to synchronous updates. *
* * If the queue directory of the mail daemon resides on an ext2 *
* * or ext3 partition you need to set it manually to update *
* * synchronously. E.g. 'chattr +S /var/spool/mqueue'. *
* ************************************************** ***************
* ************************************************** ***************
* * NOTE: For correct logging add *
* * local6.* /var/log/imapd.log *
* * auth.debug /var/log/auth.log *
* * to /etc/syslog.conf. *
* ************************************************** ***************
* ************************************************** ***************
* * WARNING: Read the section about SSL and TLS of *
* * /usr/share/doc/cyrus-imapd-2.1.9/html/install-configure.html. *
* * about installing the needed keys. *
* ************************************************** ***************


?

naja... nicht direkt... :rolleyes:
was bedeutet denn dies? (ich habe nämlich metalog drauf)
zudem habe ich das auf einer ext3 partition...

poohbert
11.09.02, 15:08
ahhh
aus irgendeinem grund klappt gibt es seit der neuinstallation einen fortschritt:

# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK poohture.intra.net Cyrus IMAP4 v2.1.9 server ready

aber:
# cyradm -u cyrus localhost
cyradm: cannot authenticate to server with as doerrfleischfee

(das ganze aus einer Konsole in X des Benutzers doerrfleischfee und mit su ge-root-et)

phoen][x
11.09.02, 16:21
Hast du die keys erstellt und diesen dubiosen "/etc/init.d/saslauthd" gestartet?

-phoen][x-

poohbert
11.09.02, 16:31
ich habe mit hilfe von

# saslpasswd2 cyrus

dem user cyrus ein pw zugewiesen...
hat auch geklappt, was

# sasldblistusers2
cyrus@poohture.intra.net: cmusaslsecretOTP
cyrus@poohture.intra.net: userPassword

beweist.
und ja, der saslauthd läuft.

Jasper
11.09.02, 16:48
Original geschrieben von poohbert
# cyradm -u cyrus localhost
cyradm: cannot authenticate to server with as doerrfleischfee


cyradm --user cyrus localhost

siehe manpage.

-j

poohbert
11.09.02, 16:56
LOL

au man... ja
hast ja recht, danke! :ugly:

komischerweise hat das aber wirklich jeder und überall wo ich geschaut habe mit nur einem strich geschrieben...

Jetzt der Test:

cyrus@poohture / $ cyradm --user cyrus localhost
Password:
cyradm: cannot authenticate to server with as cyrus

mist verdammter :(


auch mit imtest ein ähnliches Bild:

cyrus@poohture / $ imtest -m login -p imap2 localhost
S: * OK poohture.intra.net Cyrus IMAP4 v2.1.9 server ready
C: C01 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES IDLE AUTH=OTP AUTH=DIGEST-MD5 AUTH=CRAM-MD5 LISTEXT LIST-SUBSCRIBED X-NETSCAPE
S: C01 OK Completed
Please enter your password:
C: L01 LOGIN cyrus {7}
S: + go ahead
C: <omitted>
S: L01 NO Login failed: authentication failure
Authentication failed. generic failure
Security strength factor: 0

poohbert
12.09.02, 02:24
ich möchte noch folgenden Umstand hinzufügen, aus dem ich ebenfalls nicht ganz schlau werde:

# passwd cyrus
passwd: Authentication token manipulation error

phoen][x
12.09.02, 06:40
Huh? als root? Ist dein PAM in Ordnung? Versuch mal "emerge pam pam-login"

-phoen][x-

poohbert
12.09.02, 14:39
Ah, ja

ich hab mal was überprüft...
in /etc/passwd stand bei cyrus:

cyrus:x:85:12::/usr/cyrus:/bin/sh

das habe ich in

cyrus::85:12::/usr/cyrus:/bin/sh

geändert, weil in /etc/shadow kein pw für diesen user definiert war.
Daraufhin veränderte sich das bild wie folgt:

# passwd cyrus
New UNIX password:
Retype new UNIX password:
passwd: User not known to the underlying authentication module

the underlying authentication module?
ok... userdel cyrus, useradd cyrus, daten angepasst und jetzt kann ich auch mit passwd ein Passwort setzen.

Daraufhin:
# su cyrus
$ imtest -m login -p imap2 localhost
S: * OK poohture.intra.net Cyrus IMAP4 v2.1.9 server ready
C: C01 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES IDLE AUTH=OTP AUTH=DIGEST-MD5 AUTH=CRAM-MD5 LISTEXT LIST-SUBSCRIBED X-NETSCAPE
S: C01 OK Completed
Please enter your password:
C: L01 LOGIN cyrus {5}
S: + go ahead
C: <omitted>
S: L01 OK User logged in
Authenticated.
Security strength factor: 0


Bin ich denn jetzt blöde?
der soll sich doch per saslauthd authentifizieren und nicht per unix user... glaub ih zumindest... :ugly:

Nachtrag: cyradm --user cyrus localhost tut es immernoch nicht.

poohbert
12.09.02, 20:11
aha!



Configuring Authentication


/etc/sasldb2


The easiest method for authenticating users is to use the libsasl authentication database and create users using the "saslpasswd" utility. Set "sasl_pwcheck_method: auxprop", and be sure that the SASL sasldb auxprop module is installed (it is, by default). Make sure Cyrus can read "/etc/sasldb2":

chown cyrus /etc/sasldb2*


Shadow Passwords


If you want to authenticate users from "/etc/shadow", things are considerably more complicated, since the cyrus user cannot read the shadow password file. It is suggested that you configure libsasl with saslauthd support, and set "sasl_pwcheck_method: saslauthd". The SASL library will then make calls to an external utility running as root to authenticate users.

poohbert
12.09.02, 20:27
jippie!
ich habs hinbekommen!

man muss cyradm nur genau mitteilen, wie es bei der anmeldung vorzugehen hat:

# cyradm --user cyrus --auth login localhost
IMAP Password: <Eingabe des per passwd festgelegten Passworts>
localhost>

froi :D

Flightbase
04.11.02, 13:14
cyrus@newmail:/root$ cyradm --user cyrus --auth login localhost
IMAP Password:
cyrus@newmail:/root$

trotz eingabe des richtigen passwortes fliege ich raus ... woran könnte es liegen ?

greets, Nik

Jasper
04.11.02, 13:25
Original geschrieben von Flightbase
cyrus@newmail:/root$ cyradm --user cyrus --auth login localhost
IMAP Password:
cyrus@newmail:/root$

trotz eingabe des richtigen passwortes fliege ich raus ... woran könnte es liegen ?


schon mal in die logfiles gesehen? oder mit 'imtest' probiert?

-j