PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Courier - Probleme beim Versenden von Mails



TheNose
30.08.06, 06:11
Hallo!

Ich habe auf meinem Server einen Mail-Server mit Courier eingerichtet. Das hat alles ganz gut funktioniert, und ich habe dabei auch gelernt, wie Courier funktioniert.

Ein Problem habe ich allerdings noch: wenn ich versuche eine eMail zu versenden, dann bekomme ich immer die Fehlermeldung "User unknown". Hier mal die Fehlermeldung aus mail.log:

Aug 30 06:00:32 lvps87-230-9-159 courieresmtpd: started,ip=[::ffff:84.57.145.162]
Aug 30 06:00:32 lvps87-230-9-159 authdaemond.plain: userdb: opened /etc/courier/userdb.dat
Aug 30 06:00:32 lvps87-230-9-159 authdaemond.plain: userdb: looking up 'andi@jongleur-andi.de'
Aug 30 06:00:32 lvps87-230-9-159 authdaemond.plain: userdb: entry not found
Aug 30 06:00:32 lvps87-230-9-159 authdaemond.plain: userdb: opened /etc/courier/userdb.dat
Aug 30 06:00:32 lvps87-230-9-159 authdaemond.plain: userdb: looking up 'alias@jongleur-andi.de'
Aug 30 06:00:32 lvps87-230-9-159 authdaemond.plain: userdb: entry not found
Aug 30 06:00:40 lvps87-230-9-159 courieresmtpd: error,relay=::ffff:84.57.145.162,from=<test@lvps87-230-9-159.dedicated.hosteurope.de>,to=<andi@jongleur-andi.de>: 550 User unknown.

Komisch ist, dass die eMailadresse andi@jongleur-andi.de die Zieladresse ist. Daher verstehe ich nicht ganz, warum hier geschaut wird ob die Adresse in der Datenbank ist. Oder klappt hier was mit der Verbindung zum anderen Mailserver nicht? Bin über Hinweise dankbar.

Hier noch die zwei wichtigen Configs:

/etc/courier/esmtpd


##VERSION: $Id: esmtpd.dist.in,v 1.18 2004/05/11 00:48:14 mrsam Exp $
#
#
# esmtpd created from esmtpd.dist by sysconftool
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
# distribution information.
#
# This configuration file sets various options for Courier's esmtpd server.
# It is started by couriertcpd, Courier's TCP server.
# A lot of the stuff here is documented in the manual page for couriertcpd.

##NAME: PATH:0
#
# Specify the default PATH that everything inherits.

PATH=/usr/bin:/bin:/usr/bin:/usr/local/bin

##NAME: SHELL:0
#
# The default shell

SHELL=/bin/sh

##NAME: ULIMIT:0
#
# Sets the maximum size of courieresmtpd's data segment
#

ULIMIT=4096

##NAME: BOFHCHECKDNS:0
#
# Comment out the following line in order to accept mail with a bad
# return address.

BOFHCHECKDNS=1

##NAME: BOFHNOEXPN:1
#
# Set BOFHNOEXP to 1 to disable EXPN

BOFHNOEXPN=1

##NAME: BOFHNOVRFY:1
#
# Set BOFHNOVERIFY to disable VRFY

BOFHNOVRFY=1

##NAME: NOADDMSGID:0
#
# The following environment variables keep Courier from adding
# default Date: and Message-ID: header to messages which do not have them.
# If you would like to add default headers only for mail from certain
# IP address ranges, you can override them in couriertcpd access file,
# see couriertcpd(8).

NOADDMSGID=1

##NAME: NOADDDATE:0
#

NOADDDATE=1

##NAME: ESMTP_LOG_DIALOG:0
#
# If set, log the esmtp dialog.

ESMTP_LOG_DIALOG=0

##NAME: AUTH_REQUIRED:0
#
# Set AUTH_REQUIRED to 1 in order to force the client to use ESMTP
# authentication. You can override AUTH_REQUIRED on a per-IP address basis
# using smtpaccess. See makesmtpaccess(8).

AUTH_REQUIRED=0

################################################## #######################
#
##NAME: COURIERTLS:0
#
# The following variables configure ESMTP STARTTLS. If OpenSSL is available
# during configuration, the couriertls helper gets compiled, and upon
# installation a dummy TLS_CERTFILE gets generated. courieresmtpd will
# automatically advertise the ESMTP STARTTLS extension if both TLS_CERTFILE
# and COURIERTLS exist.
#
# WARNING: Peer certificate verification has NOT yet been tested. Proceed
# at your own risk. Only the basic SSL/TLS functionality is known to be
# working. Keep this in mind as you play with the following variables.

COURIERTLS=/usr/bin/couriertls

##NAME: ESMTP_TLS_REQUIRED:0
#
# Set ESMTP_TLS_REQUIRED to 1 if you REQUIRE SSL/TLS to be used for receiving
# mail. Setting it here will require it for every connection. You can also
# set ESMTP_TLS_REQUIRED in the smtpaccess file, see makesmtpaccess(8) for
# more information
#
# ESMTP_TLS_REQUIRED=1

##NAME: TLS_PROTOCOL:0
#
#
# TLS_PROTOCOL sets the protocol version. The possible versions are:
#
# SSL2 - SSLv2
# SSL3 - SSLv3
# TLS1 - TLS1

TLS_PROTOCOL=SSL3

##NAME: TLS_CIPHER_LIST:0
#
# TLS_CIPHER_LIST optionally sets the list of ciphers to be used by the
# OpenSSL library. In most situations you can leave TLS_CIPHER_LIST
# undefined
#
# TLS_CIPHER_LIST="ALL:!ADH:RC4+RSA:+SSLv2:@STRENGTH"

# TLS_TIMEOUT is currently not implemented, and reserved for future use.
# This is supposed to be an inactivity timeout, but its not yet implemented.

##NAME: TLS_DHCERTFILE:0
#
# TLS_DHCERTFILE - PEM file that stores our Diffie-Hellman cipher pair.
# When OpenSSL is compiled to use Diffie-Hellman ciphers instead of RSA
# you must generate a DH pair that will be used. In most situations the
# DH pair is to be treated as confidential, and the file specified by
# TLS_DHCERTFILE must not be world-readable.
#
# TLS_DHCERTFILE=

##NAME: TLS_CERTFILE:0
#
# TLS_CERTFILE - certificate to use. TLS_CERTFILE is required for SSL/TLS
# servers, and is optional for SSL/TLS clients. TLS_CERTFILE is usually
# treated as confidential, and must not be world-readable.
#
TLS_CERTFILE=/etc/courier/esmtpd.pem

##NAME: TLS_CERTINFO:0
#
# TLS_PEERCERTDIR, TLS_OURCACERT - when it is required that all peer
# certificates are signed by specific certificate authorities, set
# TLS_OURCACERT to the name of the file containing the certificate root keys,
# or set TLS_PEERCERTDIR to the name of the directory containing
# the certificate root keys.
#
# For convenience's sake, Courier installs a default set of root certificates
# (which has been swiped from Mozilla's CVS tree :-) ). Before enabling
# certificate verification, you should examine all the certificates in the
# following directory. ANY certificate signed by ANY root cert in
# TLS_PEERCERTDIR will be accepted
#
# TLS_PEERCERTDIR=/usr/lib/courier/rootcerts
# TLS_OURCACERT=

##NAME: TLS_VERIFYPEER:0
#
# TLS_VERIFYPEER - how to verify peer certificates. The possible values of
# this setting are:
#
# NONE - do not verify anything
#
# PEER - verify the peer certificate, if one's presented
#
# REQUIREPEER - require a peer certificate, fail if one's not presented
#
# SSL/TLS servers will usually set TLS_VERIFYPEER to NONE. SSL/TLS clients
# will usually set TLS_VERIFYPEER to REQUIREPEER.
#
TLS_VERIFYPEER=NONE


##NAME: MAILUSERGROUP:0
#
# Mail user and group

MAILUSER=daemon
MAILGROUP=daemon

##NAME: ADDRESS:0
#
# Address to listen on, can be set to a single IP address.
#
#

ADDRESS=87.230.9.159

##NAME: PORT:1
#
# PORT specified the port number to listen on. The standard "smtp" port
# is port 25.
#
# Multiple port numbers can be separated by commas. When multiple port
# numbers are used it is possibly to select a specific IP address for a
# given port as "ip.port". For example, "127.0.0.1.900,192.68.0.1.900"
# accepts connections on port 900 on IP addresses 127.0.0.1 and 192.68.0.1
# The ADDRESS setting, if given, is a default for ports that do not have
# a specified IP address.

PORT=smtp

##NAME: BLACKLISTS:1
#
# Blacklists we query.
#
# The BLOCK environment variable is automatically enforced by submit.
# Nobody really does anything about BLOCK2, this is mainly for use by
# plug-in mail filters. If you want Courier to unilaterally block
# mail from IP addresses listed on the RBL and RSS, and you have a separate
# filter that keys off BLOCK2, uncomment the following. If you want
# to unilaterally block everything on the RBL and RSS, just replaced BLOCK2
# with BLOCK. DUL can be added too...
#
# BLACKLISTS='-block=blackholes.mail-abuse.org,BLOCK -block=relays.mail-abuse.org,BLOCK2'

BLACKLISTS=""

##NAME: ACCESSFILE:1
#
# Access file: $ACCESSFILE - plain text file/dir, $ACCESSFILE.dat - compiled
# database.
#

ACCESSFILE=${sysconfdir}/smtpaccess

##NAME: MAXDAEMONS:0
#
# Maximum number of daemons started
#

MAXDAEMONS=40

##NAME: MAXPERC:0
#
# Maximum number of connections accepted from the same C address block
#

MAXPERC=5

##NAME: MAXPERID:0
#
#
# Maximum number of connections accepted from the same IP address

MAXPERIP=5

##NAME: PIDFILE:0
#
# File where couriertcpd will save its process ID
#

PIDFILE=/var/run/courier/esmtpd.pid

##NAME: TCPDOPTS:2
#
# TCPDOPTS can contain other couriertcpd options, such as
# -nodnslookup and -noidentlookup.
#

TCPDOPTS="-stderrlogger=/usr/sbin/courierlogger"

##NAME: AUTHMODULES:5
#
# Do not touch the AUTHMODULES setting.

AUTHMODULES="authdaemon"

##NAME: ESMTPAUTH:4
#
# To enable authenticated SMTP relaying, uncomment the ESMTPAUTH setting,
# below, and set it to ESMTP authentication mechanisms we support. Currently
# LOGIN and CRAM-MD5 are available:
#
# ESMTPAUTH="LOGIN CRAM-MD5"
#
# You can also try PLAIN and CRAM-SHA1. See INSTALL for more information.
#

ESMTPAUTH="LOGIN"

##NAME: ESMTPAUTH_WEBADMIN:4
#
# ESMTPAUTH_WEBADMIN is used by the webadmin module
#
# Don't touch this setting.

ESMTPAUTH_WEBADMIN="LOGIN CRAM-MD5"

##NAME: ESMTPAUTHINFOTLS:3
#
# To enable SASL PLAIN authentication when using TLS, uncomment the following.
# To enable SASL PLAIN with or without TLS, just add PLAIN to ESMTPAUTH,
# above:
#
# ESMTPAUTH_TLS="PLAIN LOGIN CRAM-MD5"
#
# ESMTPAUTH_TLS_WEBADMIN is used by the webadmin module

ESMTPAUTH_TLS=""

##NAME: ESMTPAUTH_TLS_WEBADMIN:4

ESMTPAUTH_TLS_WEBADMIN="PLAIN LOGIN CRAM-MD5"

##NAME: ESMTPDSTART:0
#
# ESMTPDSTART is not referenced anywhere in the standard Courier programs
# or scripts. Rather, this is a convenient flag to be read by your system
# startup script in /etc/rc.d, like this:
#
# prefix=/usr
# exec_prefix=/usr
# . ${sysconfdir}/esmtpd
# case x$ESMTPDSTART in
# x[yY]*)
# /usr/sbin/esmtpd start
# ;;
# esac
#
# The default setting is going to be NO, until Courier is shipped by default
# with enough platforms so that people get annoyed with having to flip it to
# YES every time.

ESMTPDSTART=YES


/etc/courier/courierd

##VERSION: $Id: courierd.dist.in,v 1.13 2003/12/16 01:19:02 mrsam Exp $
#
# courierd created from courierd.dist by sysconftool
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# Copyright 1998 - 2001 Double Precision, Inc. See COPYING for
# distribution information.
#
# This configuration file sets various global options for Courier.
# The contents of this file is turned into courierd's environment by
# the courierctl.start script.

##NAME: prefixes:0
#

prefix="/usr"
exec_prefix="/usr"

##NAME: PATH:0
#
#
# Specify the default PATH that everything inherits -- including commands
# executed from individual .courier files

PATH=/usr/bin:/bin:/usr/bin:/usr/local/bin

##NAME: SHELL:0
#
# The default shell

SHELL=/bin/sh

##NAME: DSNNOTIFY:0
#
# If you would like to suppress all bounces for mail forwarded via an
# individual .courier file, uncomment the following:
#
# DSNNOTIFY=N

##NAME: DYNAMICDELIVERIES:0
#
# If you would like to disable the ability to generate dynamic delivery
# instructions, set the following variable to 0. See dot-courier(5)
# for more information.

DYNAMICDELIVERIES=1

################################################## ######################
#
##NAME: DEFAULTDELIVERY:0
#
# Specify default delivery instructions by setting DEFAULTDELIVERY
# One of the following definitions of DEFAULTDELIVERY should be
# uncommented.
#
# Default deliveries to $HOME/Maildir
#
# DEFAULTDELIVERY=./Maildir
#
# Alternatively, use procmail to deliver mail to local mailboxes.
#
# DEFAULTDELIVERY="| /usr/bin/preline /usr/bin/procmail"
#
# Here's how to have maildrop handle local deliveries.
#
# DEFAULTDELIVERY="| /usr/bin/maildrop"
#
# If you want to automatically enable .forward support globally,
# use something like this:
#
# DEFAULTDELIVERY="|| dotforward
# ./Maildir"
#
# Yes, it's two lines long, with an embedded newline. Of course, you can use
# any default local mail delivery instruction in place of ./Maildir.

DEFAULTDELIVERY=./Maildir

##NAME: MAILDROPDEFAULT:0
#
# The following setting initializes the DEFAULT variable in maildrop,
# the location of the default mailbox. You should not change this setting
# unless you REALLY know what you're doing.

MAILDROPDEFAULT=./Maildir

##NAME: ESMTP_CORK:0
#
# ESMTP_CORK=1 is an extension used with Linux kernel >2.2 that avoids sending
# partial frames when sending a message via ESMTP. Set ESMTP_CORK to 0 to
# disable it (diagnostic option). In certain situations this option has no
# effect. For example, when using SSL the entire channel has an encryption
# layer around, so courieresmtp is actually talking to a pipe.

ESMTP_CORK=1

##NAME: SOURCE_ADDRESS:0
#
# Specify the source IP address to be used when making ESMTP connections
# outbound to deliver mail. If this value is not specified or "0", the
# kernel will assign the source IP address.
#
# SOURCE_ADDRESS=127.0.0.1

##NAME: UUXFLAGS:0
#
# Specify additional flags to uux. Allowed flags are -g [grade], -j, and
# -r ONLY. This environment variable is parsed in a rather simplistic
# fashion -- it is broken up into space-separate words, and each one is
# passed to uux together with the mandatory uux flags (namely -p).

UUXFLAGS="-j -g C"

##NAME: ARCHIVEDIR:0
#
# This is the big-brother option that saves a copy of EACH and EVERY
# message passing through the system. Uncomment ARCHIVEDIR, and after
# a message is delivered, its queue and data file is moved to ARCHIVEDIR
# instead of being deleted. You must create the ARCHIVEDIR directory
# yourself, and it must be owned by the "daemon" userid.
#
# Also, ARCHIVEDIR *MUST* be on the same partition/volume as Courier's
# mail queue directory.
#
# All messages will be saved into a flat directory, with one subdirectory
# created each calendar day. Therefore, you will need to make sure that
# your filesystem can handle it. Each message consists of two files,
# the control file, and the message data file. The Linux ext2 filesystem,
# for example, will start to have problems once there are more than
# 32,000 files in the same directory, so if your system carries a higher
# daily volume, you'll need to purge out the archive subdirectory several
# times a day.
#
# If you fill up an archive directory, mail will continue to move, but
# not archived. Caveat emptor.
#
# ARCHIVEDIR="/usr/lib/courier/bigbrother"

##NAME: ESMTP_USE_STARTTLS:0
#
# The following variables specify whether or not the ESMTP *client* will use
# SSL when talking to a remote ESMTP server that supports SSL.

ESMTP_USE_STARTTLS=1

##NAME: LC_ALL:0
#
# Reset the locale to make sure there are no unexpected surprises

LC_ALL=C

##NAME: COURIERTLS:0
#
# For SSL to work, OpenSSL must be available when Courier is compiled, and
# couriertls must be installed here:
#
# If couriertls is not installed, ESMTP_USE_TLS is quietly ignored.

COURIERTLS=/usr/bin/couriertls

##NAME: ESMTP_TLS_VERIFY_DOMAIN:0
#
# The following variables specify SSL/TLS properties for the ESMTP SSL client.
#
# Set ESMTP_TLS_VERIFY_DOMAIN to 1 if we must verify the domain in the remote
# server's certificate. For this to actually work as intended, you must
# install root authority certificates in the locations specified by CERTINFO
# setting, and set TLS_VERIFYPEER to PEER. Otherwise, this is meaningless.

ESMTP_TLS_VERIFY_DOMAIN=0

##NAME: TLS_PROTOCOL:0
#
# TLS_PROTOCOL sets the protocol version. The possible versions are:
#
# SSL2 - SSLv2
# SSL3 - SSLv3
# TLS1 - TLS1

TLS_PROTOCOL=SSL3

##NAME: TLS_CIPHER_LIST:0
#
# TLS_CIPHER_LIST optionally sets the list of ciphers to be used by the
# OpenSSL library. In most situations you can leave TLS_CIPHER_LIST
# undefined
#
# TLS_CIPHER_LIST="ALL:!ADH:RC4+RSA:+SSLv2:@STRENGTH"

# TLS_TIMEOUT is currently not implemented, and reserved for future use.
# This is supposed to be an inactivity timeout, but its not yet implemented.

##NAME: TLS_DHCERTFILE:0
#
# TLS_DHCERTFILE - PEM file that stores our Diffie-Hellman cipher pair.
# When OpenSSL is compiled to use Diffie-Hellman ciphers instead of RSA
# you must generate a DH pair that will be used. In most situations the
# DH pair is to be treated as confidential, and the file specified by
# TLS_DHCERTFILE must not be world-readable.
#
# TLS_DHCERTFILE=

##NAME: TLS_CERTFILE:0
#
# TLS_CERTFILE - certificate to use. TLS_CERTFILE is required for SSL/TLS
# servers, and is optional for SSL/TLS clients. TLS_CERTFILE is usually
# treated as confidential, and must not be world-readable.
#
# TLS_CERTFILE=


##NAME: TLS_TRUSTCERTS:0
#
# TLS_TRUSTCERTS=pathname - load trusted certificates from pathname.
# pathname can be a file or a directory. If a file, the file should
# contain a list of trusted certificates, in PEM format. If a
# directory, the directory should contain the trusted certificates,
# in PEM format, one per file and hashed using OpenSSL's c_rehash
# script. TLS_TRUSTCERTS is used by SSL/TLS clients (by specifying
# the -domain option) and by SSL/TLS servers (TLS_VERIFYPEER is set
# to PEER or REQUIREPEER).
#
# We install a default set of root certificates in /usr/lib/courier/rootcerts

TLS_TRUSTCERTS=/usr/lib/courier/rootcerts

##NAME: TLS_TRUSTSECURITYCERTS:0
#
# TLS_TRUSTSECURITYCERTS=pathname - same as TLS_TRUSTCERTS, except that
# these certs are used when the Courier-specific SECURITY extension is
# specified for a given message. ESMTP_USE_STARTTLS must be set to 1,
# above, and this option implies ESMTP_TLS_VERIFY_DOMAIN.
#
# This setting, of course, can be same as TLS_TRUSTCERTS, however it is
# often desirable to use a separate, private, root CA cert in order to
# create private, organization-internal, secure mail delivery channel
# over an untrusted network, that's validated by X.509 certs signed
# by a private root CA.
#
# !!!NOTE!!! this is an experimental, not heavily tested, extension
#
# TLS_TRUSTSECURITYCERTS=

##NAME: TLS_VERIFYPEER:1
#
# TLS_VERIFYPEER - how to verify server certificates. This value should
# be kept at its default value of NONE unless you want to enable peer
# certificate verification.
#
# NONE - do not verify anything
#
# PEER - verify the client certificate, if one's presented
#
# REQUIREPEER - require a client certificate, fail if one's not presented

TLS_VERIFYPEER=NONE

TheNose
31.08.06, 16:41
Habe mein Problem gelöst. Die Domain der Zeiladresse war schon als hosteddomains eingetragen. Das war natürlich quatsch.