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

erste Schritte mit Linux Mail-Server

OP
P

#patrick

Member
die Zeile smtp_sasl_password_map habe ich gar nicht

ja, ich will nur interne Mails verschicken - Windows/Linux sind verbunden samba läuft, Dateizugriff ist möglich, ping geht - kurz: Verbindung steht!

ich schreibe mail -s Test patrick@LinuxMail[Enter]blabla[Enter].
 
OP
P

#patrick

Member
hab ich, postfix startet ohne Fehler (auch keine in /var/log/mail). wenn ich dann die mail - wie o.b. - verschicke sieht es wie folgt aus:
Aug 5 14:44:30 LinuxMail postfix/pickup[9420]: 9D59319F9A: uid=0 from=<root>
Aug 5 14:44:30 LinuxMail postfix/cleanup[9427]: 9D59319F9A: message-id=<41122BAE.mail79S11XUYL@LinuxMail.local>
Aug 5 14:44:30 LinuxMail postfix/qmgr[9421]: 9D59319F9A: from=<root@LinuxMail.local>, size=422, nrcpt=1 (queue active)
Aug 5 14:44:30 LinuxMail postfix/qmgr[9421]: 9D59319F9A: to=<patrick@LinuxMail.local>, relay=none, delay=0, status=deferred (deferred transport)


LinuxMail:~ # mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
9D59319F9A 422 Thu Aug 5 14:44:30 root@LinuxMail.local
(deferred transport)
patrick@LinuxMail.local

-- 0 Kbytes in 1 Request.
LinuxMail:~ #
 

oc2pus

Ultimate Guru
ok, dann untersuchen wir jetzt die master.cf (posten bitte)

und aus main.cf die beiden Einträge
mailbox_command =
mailbox_transport =
 
OP
P

#patrick

Member
also, main.cf
mailbox_command = /usr/lib/cyrus/bin/deliver
mailbox_transfer = cyrus

und hier die master (da habe ich nur die eine Änderung von weiter oben vorgenommen):
#
# Postfix master process configuration file. Each line describes how
# a mailer component program should be run. The fields that make up
# each line are described below. A "-" field value requests that a
# default value be used for that field.
#
# Service: any name that is valid for the specified transport type
# (the next field). With INET transports, a service is specified as
# host:port. The host part (and colon) may be omitted. Either host
# or port may be given in symbolic form or in numeric form. Examples
# for the SMTP server: localhost:smtp receives mail via the loopback
# interface only; 10025 receives mail on port 10025.
#
# Transport type: "inet" for Internet sockets, "unix" for UNIX-domain
# sockets, "fifo" for named pipes.
#
# Private: whether or not access is restricted to the mail system.
# Default is private service. Internet (inet) sockets can't be private.
#
# Unprivileged: whether the service runs with root privileges or as
# the owner of the Postfix system (the owner name is controlled by the
# mail_owner configuration variable in the main.cf file). Only the
# pipe, virtual and local delivery daemons require privileges.
#
# Chroot: whether or not the service runs chrooted to the mail queue
# directory (pathname is controlled by the queue_directory configuration
# variable in the main.cf file). Presently, all Postfix daemons can run
# chrooted, except for the pipe, virtual and local delivery daemons.
# The files in the examples/chroot-setup subdirectory describe how
# to set up a Postfix chroot environment for your type of machine.
#
# Wakeup time: automatically wake up the named service after the
# specified number of seconds. A ? at the end of the wakeup time
# field requests that wake up events be sent only to services that
# are actually being used. Specify 0 for no wakeup. Presently, only
# the pickup, queue manager and flush daemons need a wakeup timer.
#
# Max procs: the maximum number of processes that may execute this
# service simultaneously. Default is to use a globally configurable
# limit (the default_process_limit configuration parameter in main.cf).
# Specify 0 for no process count limit.
#
# Command + args: the command to be executed. The command name is
# relative to the Postfix program directory (pathname is controlled by
# the daemon_directory configuration variable). Adding one or more
# -v options turns on verbose logging for that service; adding a -D
# option enables symbolic debugging (see the debugger_command variable
# in the main.cf configuration file). See individual command man pages
# for specific command-line options, if any.
#
# In order to use the "uucp" message tranport below, set up entries
# in the transport table.
#
# In order to use the "cyrus" message transport below, configure it
# in main.cf as the mailbox_transport.
#
# SPECIFY ONLY PROGRAMS THAT ARE WRITTEN TO RUN AS POSTFIX DAEMONS.
# ALL DAEMONS SPECIFIED HERE MUST SPEAK A POSTFIX-INTERNAL PROTOCOL.
#
# DO NOT CHANGE THE ZERO PROCESS LIMIT FOR CLEANUP/BOUNCE/DEFER OR
# POSTFIX WILL BECOME STUCK UP UNDER HEAVY LOAD
#
# DO NOT CHANGE THE ONE PROCESS LIMIT FOR PICKUP/QMGR OR POSTFIX WILL
# DELIVER MAIL MULTIPLE TIMES.
#
# DO NOT SHARE THE POSTFIX QUEUE BETWEEN MULTIPLE POSTFIX INSTANCES.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 nqmgr
#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
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
#localhost:10025 inet n - n - - smtpd -o content_filter=
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -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}
flags=R user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -m ${extension} ${user}
 
OP
P

#patrick

Member
jetzt meldet er connect to public/lmtp[public/lmtp]: No such file or directory) in der mailq und in /var/log/mail
 

oc2pus

Ultimate Guru
vergleiche die Angaben in /etc/imapd.conf
lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=1

ls -al /var/spool/postfix/public/lmtp
srwxrwxrwx 1 root root 0 Aug 4 13:34 /var/spool/postfix/public/lmtp

das ist der Kommunikationssocket zwischen postfix und cyrus
 
OP
P

#patrick

Member
da haben wir den Salat: in /var/spool/postfix/public/ gibt es nur cleanup, flush,pickup,qmgr,showq - kein lmtp
 

oc2pus

Ultimate Guru
nach der Umstellung des maibox_transport, hast du da rccyrus oder rcpostfix restart gesagt ?
ich habe mich glaube ich vertippt, sorry

rcpostfix restart (nicht reload!)
 

oc2pus

Ultimate Guru
patrick, ich brauch immer den Auszug aus der /var/log/mail bzw /var/log/messages ;)

also ein rccyrus restart legt diesen socket an, wenn er nicht existiert ==>
deine cyrus.conf zeigt noch auf eine anderen Socket....
/etc/cyrus.conf_
lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=1
 
OP
P

#patrick

Member
oh man .. das schafft mich echt - php,apache.mysql,freetds,gd war nicht so schwierig wie das hier.

Ich werde mir die Dateien jetzt alle noch mal in Ruhe reintun und heute noch mal in die Stadt fahren und mir ein postfix-Buch kaufen. Für alle Fälle - dann muss ich nicht alles Fragen und bekomme vielleicht auch ein wenig Hintergrund. Und das nächste Mal denke ich auch wieder an die Logs ...
 
OP
P

#patrick

Member
Moin,

neuer Tag - selbes Problem ... ich habe mal ein wenig gegoggelt und folgendes gefunden http://lists.suse.com/archive/suse-linux/2004-Feb/4549.html - scheint genau mein Problem zu sein ... leider wird dort als Lösung eine komplette Neuinstallation und Einrichtung von cyrus vorgeschlagen.

Aber vielleicht gibt's ncoh eine andere Möglichkeit? So sieht es jedenfalls bei mir aus:
mail -s Test patrick@LinuxMail.local
Test
.

<LinuxMail:~ # mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
6936C19F9A 423 Thu Aug 5 17:07:11 root@LinuxMail.local
(connect to public/lmtp[public/lmtp]: read timeout)
patrick@LinuxMail.local

-- 0 Kbytes in 1 Request.

tail -f /var/log/messages
Aug 6 08:35:53 LinuxMail master[12025]: about to exec /usr/lib/cyrus/bin/ctl_cyrusdb
Aug 6 08:35:53 LinuxMail master[10451]: process 12025 exited, status 75

tail -f /var/log/mail
Aug 6 08:05:47 LinuxMail postfix/qmgr[10415]: 6936C19F9A: from=<root@LinuxMail.local>, size=423, nrcpt=1 (queue active)
Aug 6 08:10:47 LinuxMail postfix/lmtp[11977]: 6936C19F9A: to=<patrick@LinuxMail.local>, relay=none, delay=54216, status=deferred (connect to public/lmtp[public/lmtp]: read timeout)

scheint das gleiche Problem wie hier zu sein: http://www.linux-club.de/viewtopic.php?t=10726&postdays=0&postorder=asc&start=25 wenn ich jetzt versuche den cyradm aufzurufen passiert nichts - keine Ausgabe in den logs und er bleibt einfach stehen - bis STRG+C

Ich würde jetzt auch diesen MAIL_CREATE_CONFIG=no in YAST setzen - weiß aber nicht wo??
 

oc2pus

Ultimate Guru
ok,
rpm -q db ==> hier posten

rccyrus restart UND /var/log/messages beobachten, wenn da Fehlermeldungen wie:
Aug 6 08:00:10 linux lmtpunix[823]: DBERROR db4: Berkeley DB library configured to support only DB_PRIVATE environments
Aug 6 08:00:10 linux lmtpunix[823]: DBERROR: dbenv->open '/var/lib/imap/db' failed: Invalid argument
Aug 6 08:00:10 linux lmtpunix[823]: DBERROR: init() on berkeley
Aug 6 08:00:10 linux lmtpunix[823]: executed
Aug 6 08:00:10 linux lmtpunix[823]: DBERROR db4: environment not yet opened
Aug 6 08:00:10 linux lmtpunix[823]: DBERROR: opening /var/lib/imap/deliver.db: Invalid argument
Aug 6 08:00:10 linux lmtpunix[823]: DBERROR: opening /var/lib/imap/deliver.db: cyrusdb error
Aug 6 08:00:10 linux lmtpunix[823]: FATAL: lmtpd: unable to init duplicate delivery database
Aug 6 08:00:10 linux tls_prune[821]: DBERROR db4: Berkeley DB library configured to support only DB_PRIVATE environments
Aug 6 08:00:10 linux tls_prune[821]: DBERROR: dbenv->open '/var/lib/imap/db' failed: Invalid argument
Aug 6 08:00:10 linux tls_prune[821]: DBERROR: init() on berkeley
erscheinen, müssen wir die Version des Paketes db austauschen.
 
OP
P

#patrick

Member
jetzt sagt er bei Neustart von postfix/cyrus folgendes:
Aug 6 09:37:42 LinuxMail master[10451]: exiting on SIGTERM
Aug 6 09:37:43 LinuxMail master[12296]: setrlimit: Unable to set file descriptors limit to -1: Operation not permitted
Aug 6 09:37:43 LinuxMail master[12296]: retrying with 1024 (current max)
Aug 6 09:37:43 LinuxMail master[12296]: process started
Aug 6 09:37:43 LinuxMail master[12297]: about to exec /usr/lib/cyrus/bin/ctl_cyrusdb
Aug 6 09:37:43 LinuxMail master[12296]: process 12297 exited, status 75
Aug 6 09:37:43 LinuxMail master[12296]: ready for work
Aug 6 09:37:43 LinuxMail master[12298]: about to exec /usr/lib/cyrus/bin/tls_prune
Aug 6 09:37:43 LinuxMail master[12299]: about to exec /usr/lib/cyrus/bin/ctl_deliver
Aug 6 09:37:43 LinuxMail master[12300]: about to exec /usr/lib/cyrus/bin/ctl_cyrusdb
Aug 6 09:37:43 LinuxMail master[12296]: process 12300 exited, status 75
Aug 6 09:37:43 LinuxMail master[12301]: about to exec /usr/lib/cyrus/bin/lmtpd
Aug 6 09:37:43 LinuxMail master[12296]: process 12299 exited, status 75
Aug 6 09:37:43 LinuxMail master[12296]: process 12298 exited, status 75
Aug 6 09:37:43 LinuxMail lmtpunix[12301]: FATAL: invalid option name on line 19 of configuration file
Aug 6 09:37:43 LinuxMail master[12296]: process 12301 exited, status 75
In dem Link den in oben angegeben hatte habt ihr einen DB-Downgrade gemacht - kommt das für mich auch zum tragen ?!
 

oc2pus

Ultimate Guru
das mit der db glaube ich nicht, da es gestern funktioniert hat, du hast 8.2, oder hast du gestern noch irgendein update via yast eingespielt ?

hm, dein cyrus startet jetzt nicht mehr.
was steht in Zeile 19 der /etc/yrus.conf
 
OP
P

#patrick

Member
ja, gestern hat es geklappt - das irritiert mich auch. Updates habe ich keine eingespielt. SuSE8.2 passt.

Natürlich steht in Zeile 19 in der cyrus.conf nichts (Leerzeile) ... ich poste mal das ganze Teil:
# 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/lib/imap/socket/lmtp" prefork=1
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
}
 

oc2pus

Ultimate Guru
editierst du diese config-Dateien mit einem Windows-Editor ?

in der Zeile
lmtpunix cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" prefork=1
sind das kleine "l" oder grosse "i" ?

was hast du gestern als letze Änderung an der cyrus-config gedreht?
(/etc/imapd.conf und /etc/cyrus.conf)
 
Oben