• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Probleme beim Erstellen von Usern in Cyrus

Status
Für weitere Antworten geschlossen.

aquadraht

Newbie
Hallo,

ich bin dabei einen Mailserver zu konfigurieren (Postfix+Cyrus IMAP+Fetchmail). Ich habe mich an der Anleitung von http://linux.tin.org orientiert.
Der Mailserver soll die Maiils an einen Relay ausliefern. Per Fetchmail werden diverse externe Mailaccounts abgerufen und diese Mails sollen dann in die IMAP-Mailboxen gelegt werden, auf die die User dann mit ihrem Mailclient zugreifen können.

Das Zusammenspiel von Postfix und Cyrus hakt noch etwas, da liegen meine Probleme. Auch weiß ich nicht, ob ich die Mailboxen in Cyrus richtig anlege:

Wenn ich per
Code:
cyradm
eine Mailbox anlege (
Code:
cm user.example
), dann wird unter /var/spool/imap ein Verzeichnis
Code:
user^example
angelegt, darin befinden sich dann die cyrus-cache, -header und -index-Dateien, jedoch keine weiteren Ordner (z.B. Inbox, Drafts, Trash, Sent, ...). Müssen diese Ordner händisch angelegt werden?

Ich kann mich per IMAP von einem Client aus auf diese Mailbox verbinden, allerdings ist sie total leer. Wenn ich nun per fetchmail Mails abhole, können sie auch nicht in diese Mailbox geschoben werden.

Danke schon mal für jede Hilfe.

Grüße,
 

oc2pus

Ultimate Guru
du musst Postfix noch dazu bringen an Cyrus auszuliefern ;)

lies den tin.org Artikel noch mal genau durch.

/etc/mail/master.cf anpassen

in /etc/cyrus.conf ist auch eine Anpassung erforderlich:
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=1

Wahrscheinlich steht da prefork=0 bei dir.
 

dermichel

Advanced Hacker
wichtig ist auch bei den meistens clients folgender eintrag
bei der konfiguration von IMAP:

z.b. beim thunderbird unter servereinstellungen / erweitert:

IMAP-Ordner-Verz.: INBOX.
 
OP
aquadraht

aquadraht

Newbie
hallo,

ich habe nun prefork auf 1 gesetzt, es funktioniert allerdings noch immer nicht.

Ich hole Mails mit fetchmail von einem externen Mailserver und möchte diese an die Cyrus-Mailboxen zustellen. Das sagt mein mail.log:

Code:
Jul  4 13:48:50 server postfix/smtpd[25446]: connect from localhost[127.0.0.1]
Jul  4 13:48:50 server postfix/smtpd[25446]: 9E2B015179: client=localhost[127.0.0.1]
Jul  4 13:48:50 server postfix/cleanup[25447]: 9E2B015179: message-id=<200407031115.i63BFOH6018762@novgorod.yyy.de>
Jul  4 13:48:50 server postfix/qmgr[25076]: 9E2B015179: from=<david@novgorod.yyy.de>, size=1611, nrcpt=1 (queue active)
Jul  4 13:48:50 server postfix/lmtp[25450]: 9E2B015179: to=<test@localhost.xxx.de>, relay=/var/spool/postfix/public/lmtp[/var/spool/postfix/public/lmtp], delay=0, status=bounced (host /var/spool/postfix/public/lmtp[/var/spool/postfix/public/lmtp] said: 550-Mailbox unknown.  Either there is no mailbox associated with this 550-name or you do not have authorization to see it. 550 5.1.1 User unknown)

und das mein imapd.log:

Code:
Jul  4 13:48:50 server lmtpd[24952]: accepted connection
Jul  4 13:48:50 server lmtpd[24952]: lmtp connection preauth'd as postman
Jul  4 13:48:50 server master[25451]: about to exec /usr/lib/cyrus/bin/lmtpd
Jul  4 13:48:50 server lmtpunix[25451]: executed


Grüße,
 

oc2pus

Ultimate Guru
poste mal fetchmailrc (ohne Passwords ;))

hast du da drin
poll yahoo
proto pop3
via pop.mail.yahoo.de
port 110
user xxxx
pass "yyyy"
is MrHide
nokeep
fetchall
no ssl

und MrHide ist ein cyrus-user ?

falls nein musst du den cyrus-user mit cyradm anlegen
 
OP
aquadraht

aquadraht

Newbie
meine .fetchmailrc:

Code:
set postmaster "postmaster"
set no bouncemail
poll mx.freenet.de with proto POP3
        user 'test@xxx.de' there
        with password 'geheim' is test here warnings 3600

user "test" existiert natürlich auch als cyrus user:

Code:
server:/etc # ls -al /var/spool/imap/user^test/
total 12
drwxr-x---    2 cyrus    mail          144 Jul  2 18:16 .
drwxr-x---   11 cyrus    mail          304 Jul  2 20:32 ..
-rwxr-x---    1 cyrus    mail            4 Jul  2 18:16 cyrus.cache
-rwxr-x---    1 cyrus    mail          155 Jul  2 18:16 cyrus.header
-rwxr-x---    1 cyrus    mail           76 Jul  2 18:16 cyrus.index
 

oc2pus

Ultimate Guru
in der /etc/postfic/main.cf

mailbox_command = /usr/lib/cyrus/bin/deliver

vorhanden ?
 
OP
aquadraht

aquadraht

Newbie
ja, der eintrag ist vorhanden!
mittlerweile habe ich mir irgendwelche permissions verbogen :-(

Code:
Jul  4 15:17:36 server postfix/pipe[31692]: 5F15C15177: to=<test@localhost.xxx.de>, relay=cyrus, delay=3573, status=deferred (temporary failure. Command output: couldn't connect to lmtpd: Permission denied_ 421 4.3.0 deliver: couldn't connect to lmtpd_ )


soll ich mal meine configs posten?


thanx,
 

oc2pus

Ultimate Guru
yepp,

postconf -n

master.cf von postfix
/etc/cyrus.conf

und nutzt du sasldb ? (saslauthd)

ich denke das ist kein permission-problem; es sieht so aus als ob cyrus die mails nicht erhält oder annimmt
 
OP
aquadraht

aquadraht

Newbie
hi,

ja, ich benutze sasldb. hier meine configs...

postconf -n:
Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 10
default_privs = nobody
inet_interfaces = all
local_destination_concurrency_limit = 2
local_transport = cyrus
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = /usr/lib/cyrus/bin/deliver
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain $mydomain
mydomain = xxx.de
myhostname = server.xxx.de
mynetworks = 192.168.0.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/sbin/sendmail
program_directory = /usr/lib/postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relay_clientcerts = ldap:ldaprelcert
relayhost = mx.freenet.de
sample_directory = /usr/share/doc/packages/postfix/samples
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
smtpd_banner = $myhostname ESMTP
smtpd_tls_CAfile = /etc/ssl/CA/usedCA.pem
smtpd_tls_ask_ccert = yes
smtpd_tls_cert_file = /etc/ssl/certs/cert.pem
smtpd_tls_key_file = /etc/ssl/certs/skey.pem
smtpd_tls_received_header = yes
smtpd_use_tls = yes
tls_daemon_random_source = dev:/dev/urandom
tls_random_source = dev:/dev/urandom

server:/etc # cat postfix/master.cf | grep -v ^#
Code:
smtp      inet  n       -       n       -       -       smtpd
smtps     inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
tlsmgr    fifo  -       -       n       300     1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
flush     unix  n       -       n       1000?   0       flush
smtp      unix  -       -       n       -       -       smtp
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
cyrus     unix  -       n       n       -       -       pipe
  flags=R user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -m ${extension} ${user}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
vscan     unix  -       n       n       -       10       pipe
  user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
procmail  unix  -       n       n       -       -       pipe
  flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}

server:/etc # cat cyrus.conf
Code:
# 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/lib/imap/socket
SERVICES {
  # add or remove based on preferences
  imap          cmd="imapd" listen="imap" prefork=0
  imaps                cmd="imapd -s" listen="imaps" prefork=0
  pop3          cmd="pop3d" listen="pop3" 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/spool/postfix/public/lmtp" prefork=1

  # this is only necessary if using notifications
#  notify       cmd="notifyd" listen="/var/lib/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

  # Uncomment the next entry, if you want to automatically remove
  # old messages of EVERY user.
  # This example calls ipurge every 60 minutes and ipurge will delete
  # ALL messages older then 30 days.
  # enter 'man 8 ipurge' for more details

  # cleanup      cmd="ipurge -d 30 -f" period=60
}


thanx!
 
OP
aquadraht

aquadraht

Newbie
noch ein nachtrag:

wenn ich postfix restarte (es sind 2 mails in der queue), dann bekomme ich folgendes im imapd-log:

Code:
Jul  4 15:34:48 server deliver[6432]: connect(/var/spool/postfix/public/lmtp) failed: Permission denied
Jul  4 15:34:48 server deliver[6434]: connect(/var/spool/postfix/public/lmtp) failed: Permission denied
 

oc2pus

Ultimate Guru
das steht bei mir:

snake:/etc # ls -al /var/spool/postfix/public/
total 0
drwx--x--- 2 postfix maildrop 224 Jul 3 12:18 .
drwxr-xr-x 15 root postfix 360 Aug 4 2003 ..
srw-rw-rw- 1 postfix postfix 0 May 16 18:47 cleanup
srw-rw-rw- 1 postfix postfix 0 May 16 18:47 flush
srwxrwxrwx 1 root root 0 Jul 3 12:18 lmtp
prw--w--w- 1 postfix postfix 0 Jul 4 15:45 pickup
srw-rw-rw- 1 postfix postfix 0 Feb 27 18:32 pre-cleanup
prw--w--w- 1 postfix postfix 0 Jul 4 15:42 qmgr
srw-rw-rw- 1 postfix postfix 0 May 16 18:47 showq
 

oc2pus

Ultimate Guru
in der main.cf habe ich folgende Differenz:

# meine interne Netzwerkkarte und localhost
inet_interfaces = 192.168.42.42 127.0.0.1

mailbox_transport = lmtp:unix:public/lmtp
 

oc2pus

Ultimate Guru
master.cf unterscheidet sich in dieser Zeile

cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
 
OP
aquadraht

aquadraht

Newbie
hi,

die rechte in
/var/spool/postfix/public/

sind bei uns beiden identisch. ansonsten habe ich auch mal deine configs ausprobiert.
bringt allet nüscht!.

wie sieht denn deine /var/spool/imap aus? wenn du einen user anlegst (cm user.test), erscheint er dann als user^test im filesystem? ohne unterverzeichnisse?


grüße,
 

oc2pus

Ultimate Guru
ich habe mein cyus Verzeichnis in /local/Post/imap

dort existiert ein Unterverzeichnis user und darunter pro User ein Verzeichnis

franz
paul
SPAM
NOSPAM

jedes dieser Verzeichnisse enthält eine Datei
cyrus.cache
cyrus.header
cyrus.index
sowie xxx. Dateien (Das sind die mails)

die Rechte sind 600 cyrus mail für alle Dateien

der ganze Dateibaum Post/user/* gehört cyrus.mail

ich habe die user aber nur mit cm franz etc angelegt nicht cm user.franz !
Vielleicht liegt der hund da begraben.

Denn deine config-Dateien sind bis auf kleine Unterschiede ja identisch mit meinen, den "BUG" mit prefork=1 hast du ja geändert.
Ich gehe davon aus, das du nach dieser Änderung auch rccyrus restart aufgerufen hast ?
 

oc2pus

Ultimate Guru
siehe auch /usr/share/doc/packages/cyrus-imapd/README.SuSE

Kommando zurück: cm user.franz ist korrekt ;)
 
OP
aquadraht

aquadraht

Newbie
jaja, ich habe postfix und cyrus schon immer neu gestartet, wenn ich änderungen vorgenommen habe.
danke erstmal - mir reicht's für heute. ich kümmere mich morgen weiter darum.

cu,
 

dermichel

Advanced Hacker
entweder:

mailbox_transport = cyrus

dann muss man in der master.cf den deliver von cyrus angeben

oder:

mailbox_transport = lmtp:unix:public/lmtp

das sind zwei unterschiedliche arten der zustellung. ich selbst nutze "lmtp".



meine config:

cyrus - cyrus.conf: lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=4

postfix - main.cf: mailbox_transport = lmtp:unix:public/lmtp

/var/spool/postfix/public:
srwxrwxrwx 1 root root 0 Jul 4 08:43 lmtp=

logauszug in /var/log/mail:
Jul 4 16:05:48 primergy postfix/lmtp[2459]: ECC5ABF80A: to=<michael@domain.de>, relay=public/lmtp[public/lmtp], delay=1, status=sent (250 2.1.5 Ok)

/var/spool/imap/user:
drwx------ 16 cyrus mail 4760 Jul 4 12:49 michael/

damit geht alles wunderbar...
 
Status
Für weitere Antworten geschlossen.
Oben