PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : SMTP-Authentifizierung über CRAM-MD5 funktioniert nicht



Googol
13.10.04, 11:26
Hallo!

ich möchte auf meinem RedHat 9 mit sendmail 8.13.1 CRAM-MD5 zum Laufen kriegen. Allerdings sollten dabei automatisch alle Zugangskenndaten verwendet werden, die auch fuer den Mailversand ueber PLAIN oder LOGIN zum Einsatz kommen (shadow).

Danke Googol

Terran Marine
13.10.04, 12:20
Spezielles Problem,

bitte log-Files sowie .conf Files posten.

Gruß
Terran

Googol
13.10.04, 15:25
Spezielles Problem,

bitte log-Files sowie .conf Files posten.

Gruß
Terran

Hallo!

Es geligt mir, eine sasl2 Datenbank mit Benutzern zu erstellen, die sich über
CRAM-MD5 einloggen können. Allerdings muss ich dann jeden Benutzer einzel eintragen. Es sollten aber jene Benutzer verwendet werden, die auch über POP3 Zugriff haben.

Habe LogLevel auf 15 gestellt, dann folgende Ergebnisse:

/var/log/messages

Oct 8 14:14:06 server1 sendmail[9377]: unable to open Berkeley db /etc/sasldb2: No such file or directory
Oct 8 14:14:06 server1 sendmail[9377]: unable to open Berkeley db /etc/sasldb2: No such file or directory
Oct 8 14:14:06 server1 sendmail[9377]: no secret in database
Oct 8 14:14:06 server1 sendmail[9377]: Bad IPREMOTEPORT value

/var/log/maillog

Oct 8 14:14:06 server1 sendmail[9377]: NOQUEUE: connect from xdsl19-19.c.bkom.it [217.199.19.19] (may be forged)
Oct 8 14:14:06 server1 sendmail[9377]: STARTTLS: ServerCertFile missing
Oct 8 14:14:06 server1 sendmail[9377]: AUTH: available mech=PLAIN LOGIN GSSAPI DIGEST-MD5 CRAM-MD5 ANONYMOUS, allowed mech=EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: Milter: no active filter
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 220 server1.safog.com ESMTP Sendmail 8.13.1/8.12.8; Fri, 8 Oct 2004 14:14:06 +0200
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: <-- EHLO majestic12
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250-server1.safog.com Hello xdsl19-19.c.bkom.it [217.199.19.19] (may be forged), pleased to meet you
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250-ENHANCEDSTATUSCODES
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250-PIPELINING
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250-8BITMIME
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250-SIZE
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250-DSN
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250-ETRN
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250-DELIVERBY
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 250 HELP
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: <-- AUTH CRAM-MD5
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 334 PDQwMDU1NDkzMjMuNjcxODY3MUBzZXJ2ZXIxLnNhZm9nLmNvbT 4=
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: --- 535 5.7.0 authentication failed
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: AUTH failure (CRAM-MD5): user not found (-20) SASL(-13): user not found: no secret in database
Oct 8 14:14:06 server1 sendmail[9377]: i98CE6MV009377: xdsl19-19.c.bkom.it [217.199.19.19] (may be forged) did not issue MAIL/EXPN/VRFY/ETRN during connection to stdin

Ausschnitt sendmail.cf:

#
# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#

################################################## ####################
################################################## ####################
#####
##### SENDMAIL CONFIGURATION FILE
#####
##### built by stuart@gathman on Tue Aug 24 23:33:32 EDT 2004
##### in /bms/rpm/BUILD/sendmail-8.13.1/cf/cf
##### using ../ as configuration include directory
#####
################################################## ####################
#####
##### DO NOT EDIT THIS FILE! Only edit the source .mc file.
#####
################################################## ####################
################################################## ####################

##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ #####
##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ #####
##### setup for Red Hat Linux #####
##### $Id: linux.m4,v 8.13 2000/09/17 17:30:00 gshapiro Exp $ #####



##### $Id: local_procmail.m4,v 8.22 2002/11/17 04:24:19 ca Exp $ #####


##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ #####

##### $Id: smrsh.m4,v 8.14 1999/11/18 05:06:23 ca Exp $ #####

##### $Id: mailertable.m4,v 8.25 2002/06/27 23:23:57 gshapiro Exp $ #####

##### $Id: virtusertable.m4,v 8.23 2002/06/27 23:23:57 gshapiro Exp $ #####

##### $Id: redirect.m4,v 8.15 1999/08/06 01:47:36 gshapiro Exp $ #####

##### $Id: always_add_domain.m4,v 8.11 2000/09/12 22:00:53 ca Exp $ #####

##### $Id: use_cw_file.m4,v 8.11 2001/08/26 20:58:57 gshapiro Exp $ #####


##### $Id: use_ct_file.m4,v 8.11 2001/08/26 20:58:57 gshapiro Exp $ #####


##### $Id: local_procmail.m4,v 8.22 2002/11/17 04:24:19 ca Exp $ #####

##### $Id: access_db.m4,v 8.26 2004/06/24 18:10:02 ca Exp $ #####

##### $Id: blacklist_recipients.m4,v 8.13 1999/04/02 02:25:13 gshapiro Exp $ #####

##### $Id: accept_unresolvable_domains.m4,v 8.10 1999/02/07 07:26:07 gshapiro Exp $ #####


##### $Id: proto.m4,v 8.710 2004/07/27 17:32:48 ca Exp $ #####

# level 10 config file format
V10/Berkeley

# override file safeties - setting this option compromises system security,
# addressing the actual file configuration problem is preferred
# need to set this before any file actions are encountered in the cf file
#O DontBlameSendmail=safe

# default LDAP map specification
# need to set this now before any LDAP maps are defined
#O LDAPDefaultSpec=-h localhost

##################
# local info #
##################

# my LDAP cluster
# need to set this before any LDAP lookups are done (including classes)
#D{sendmailMTACluster}$m

Cwlocalhost
# file containing names of hosts for which we receive email
Fw/etc/mail/local-host-names

# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM

# host/domain names ending with a token in class P are canonical
CP.

# "Smart" relay host (may be null)
DS


# operators that cannot be in local usernames (i.e., network indicators)
CO @ % !

# a class with just dot (for identifying canonical names)
C..

# a class with just a left bracket (for identifying domain literals)
C[[

# access_db acceptance class
C{Accept}OK RELAY


C{ResOk}OKR


# Hosts for which relaying is permitted ($=R)
FR-o /etc/mail/relay-domains

# arithmetic map
Karith arith
# macro storage map
Kmacro macro
# possible values for TLS_connection in access map
C{Tls}VERIFY ENCR





# dequoting map
Kdequote dequote

# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root
C{TrustAuthMech}EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
C{E}root
C{w}localhost.localdomain



# my name for error messages
DnMAILER-DAEMON


# Mailer table (overriding domains)
Kmailertable hash -o /etc/mail/mailertable.db

# Virtual user table (maps incoming users)
Kvirtuser hash -o /etc/mail/virtusertable.db

CPREDIRECT

# Access list database (for spam stomping)
Kaccess hash -T<TMPF> -o /etc/mail/access.db

# Configuration version number
DZ8.13.1


###############
# Options #
###############

# strip message body to 7 bits on input?
O SevenBitInput=False

# 8-bit data handling
#O EightBitMode=pass8

# wait for alias file rebuild (default units: minutes)
O AliasWait=10

# location of alias file
O AliasFile=/etc/aliases

# minimum number of free blocks on filesystem
O MinFreeBlocks=100

# maximum message size
#O MaxMessageSize=0

# substitution for space (blank) characters
O BlankSub=.

# avoid connecting to "expensive" mailers on initial submission?
O HoldExpensive=False

# checkpoint queue runs after every N successful deliveries
#O CheckpointInterval=10

# default delivery mode
O DeliveryMode=background

# error message header/file
#O ErrorHeader=/etc/mail/error-header

# error mode
#O ErrorMode=print

# save Unix-style "From_" lines at top of header?
#O SaveFromLine=False

# queue file mode (qf files)
#O QueueFileMode=0600

# temporary file mode
O TempFileMode=0600

# match recipients against GECOS field?
#O MatchGECOS=False

# maximum hop count
#O MaxHopCount=25

# location of help file
O HelpFile=/etc/mail/helpfile

# ignore dots as terminators in incoming messages?
#O IgnoreDots=False

# name resolver options
#O ResolverOptions=+AAONLY

# deliver MIME-encapsulated error messages?
O SendMimeErrors=True

# Forward file search path
O ForwardPath=$z/.forward.$w:$z/.forward

# open connection cache size
O ConnectionCacheSize=2

# open connection cache timeout
O ConnectionCacheTimeout=5m

# persistent host status directory
#O HostStatusDirectory=.hoststat

# single thread deliveries (requires HostStatusDirectory)?
#O SingleThreadDelivery=False

# use Errors-To: header?
O UseErrorsTo=False

# log level
O LogLevel=9

# send to me too, even in an alias expansion?
#O MeToo=True

# verify RHS in newaliases?
O CheckAliases=False

# default messages to old style headers if no special punctuation?
O OldStyleHeaders=True

# SMTP daemon options

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA

# SMTP client options
#O ClientPortOptions=Family=inet, Address=0.0.0.0

# Modifiers to define {daemon_flags} for direct submissions
#O DirectSubmissionModifiers

# Use as mail submission program? See sendmail/SECURITY
#O UseMSP

# privacy flags
O PrivacyOptions=authwarnings,novrfy,noexpn,restrict qrun

# who (if anyone) should get extra copies of error messages
#O PostmasterCopy=Postmaster

# slope of queue-only function
#O QueueFactor=600000

# limit on number of concurrent queue runners
#O MaxQueueChildren

# maximum number of queue-runners per queue-grouping with multiple queues
#O MaxRunnersPerQueue=1

# priority of queue runners (nice(3))
#O NiceQueueRun

# shall we sort the queue by hostname first?
#O QueueSortOrder=priority

# minimum time in queue before retry
#O MinQueueAge=30m

# how many jobs can you process in the queue?
#O MaxQueueRunSize=10000

# perform initial split of envelope without checking MX records
#O FastSplit=1

# queue directory
O QueueDirectory=/var/spool/mqueue

# key for shared memory; 0 to turn off
#O SharedMemoryKey=0



# timeouts (many of these)
#O Timeout.initial=5m
O Timeout.connect=1m
#O Timeout.aconnect=0s
#O Timeout.iconnect=5m
#O Timeout.helo=5m
#O Timeout.mail=10m
#O Timeout.rcpt=1h
#O Timeout.datainit=5m
#O Timeout.datablock=1h
#O Timeout.datafinal=1h
#O Timeout.rset=5m
#O Timeout.quit=2m
#O Timeout.misc=2m
#O Timeout.command=1h
O Timeout.ident=0
#O Timeout.fileopen=60s
#O Timeout.control=2m
O Timeout.queuereturn=5d
#O Timeout.queuereturn.normal=5d
#O Timeout.queuereturn.urgent=2d
#O Timeout.queuereturn.non-urgent=7d
#O Timeout.queuereturn.dsn=5d
O Timeout.queuewarn=4h
#O Timeout.queuewarn.normal=4h
#O Timeout.queuewarn.urgent=1h
#O Timeout.queuewarn.non-urgent=12h
#O Timeout.queuewarn.dsn=4h
#O Timeout.hoststatus=30m
#O Timeout.resolver.retrans=5s
#O Timeout.resolver.retrans.first=5s
#O Timeout.resolver.retrans.normal=5s
#O Timeout.resolver.retry=4
#O Timeout.resolver.retry.first=4
#O Timeout.resolver.retry.normal=4
#O Timeout.lhlo=2m
#O Timeout.auth=10m
#O Timeout.starttls=1h

# time for DeliverBy; extension disabled if less than 0
#O DeliverByMin=0

# should we not prune routes in route-addr syntax addresses?
#O DontPruneRoutes=False

# queue up everything before forking?
O SuperSafe=True

# status file
O StatusFile=/etc/mail/statistics

# time zone handling:
# if undefined, use system default
# if defined but null, use TZ envariable passed in
# if defined and non-null, use that info
#O TimeZoneSpec=

# default UID (can be username or userid:groupid)
O DefaultUser=8:12

# list of locations of user database file (null means no lookup)
O UserDatabaseSpec=/etc/mail/userdb.db

# fallback MX host
#O FallbackMXhost=fall.back.host.net

# fallback smart host
#O FallbackSmartHost=fall.back.host.net

# if we are the best MX host for a site, try it directly instead of config err
O TryNullMXList=true

# load average at which we just queue messages
#O QueueLA=8

# load average at which we refuse connections
#O RefuseLA=12

# log interval when refusing connections for this long
#O RejectLogInterval=3h

# load average at which we delay connections; 0 means no limit
#O DelayLA=0

# maximum number of children we allow at one time
#O MaxDaemonChildren=0

# maximum number of new connections per second
#O ConnectionRateThrottle=0

# Width of the window
#O ConnectionRateWindowSize=60s

# work recipient factor
#O RecipientFactor=30000

# deliver each queued job in a separate process?
#O ForkEachJob=False

# work class factor
#O ClassFactor=1800

# work time factor
#O RetryFactor=90000

# default character set
#O DefaultCharSet=iso-8859-1

# service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
#O ServiceSwitchFile=/etc/mail/service.switch

# hosts file (normally /etc/hosts)
#O HostsFile=/etc/hosts

# dialup line delay on connection failure
#O DialDelay=10s

# action to take if there are no recipients in the message
#O NoRecipientAction=add-to-undisclosed

# chrooted environment for writing to files
#O SafeFileEnvironment=/arch

# are colons OK in addresses?
#O ColonOkInAddr=True

# shall I avoid expanding CNAMEs (violates protocols)?
#O DontExpandCnames=False

# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=$j Sendmail $v/$Z; $b

# UNIX initial From header format (old $l macro)
O UnixFromLine=From $g $d

# From: lines that have embedded newlines are unwrapped onto one line
#O SingleLineFromHeader=False

# Allow HELO SMTP command that does not include a host name
#O AllowBogusHELO=False

# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
#O MustQuoteChars=.

# delimiter (operator) characters (old $o macro)
O OperatorChars=.:%@!^/[]+

# shall I avoid calling initgroups(3) because of high NIS costs?
#O DontInitGroups=False

# are group-writable :include: and .forward files (un)trustworthy?
# True (the default) means they are not trustworthy.
#O UnsafeGroupWrites=True


# where do errors that occur when sending errors get sent?
#O DoubleBounceAddress=postmaster

# where to save bounces if all else fails
#O DeadLetterDrop=/var/tmp/dead.letter

# what user id do we assume for the majority of the processing?
#O RunAsUser=sendmail

# maximum number of recipients per SMTP envelope
#O MaxRecipientsPerMessage=0

# limit the rate recipients per SMTP envelope are accepted
# once the threshold number of recipients have been rejected
#O BadRcptThrottle=0

# shall we get local names from our installed interfaces?
O DontProbeInterfaces=true

# Return-Receipt-To: header implies DSN request
#O RrtImpliesDsn=False

# override connection address (for testing)
#O ConnectOnlyTo=0.0.0.0

# Trusted user for file ownership and starting the daemon
#O TrustedUser=root

# Control socket for daemon management
#O ControlSocketName=/var/spool/mqueue/.control

# Maximum MIME header length to protect MUAs
#O MaxMimeHeaderLength=0/0

# Maximum length of the sum of all headers
#O MaxHeadersLength=32768

# Maximum depth of alias recursion
#O MaxAliasRecursion=10

# location of pid file
#O PidFile=/var/run/sendmail.pid

# Prefix string for the process title shown on 'ps' listings
#O ProcessTitlePrefix=prefix

# Data file (df) memory-buffer file maximum size
#O DataFileBufferSize=4096

# Transcript file (xf) memory-buffer file maximum size
#O XscriptFileBufferSize=4096

# lookup type to find information about local mailboxes
#O MailboxDatabase=pw

# override compile time flag REQUIRES_DIR_FSYNC
#O RequiresDirfsync=true

# list of authentication mechanisms
O AuthMechanisms=EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN

# Authentication realm
#O AuthRealm

# default authentication information for outgoing connections
#O DefaultAuthInfo=/etc/mail/default-auth-info

# SMTP AUTH flags
O AuthOptions=A

# SMTP AUTH maximum encryption strength
#O AuthMaxBits

# SMTP STARTTLS server options
#O TLSSrvOptions

# Input mail filters
#O InputMailFilters


# CA directory
#O CACertPath
# CA file
#O CACertFile
# Server Cert
#O ServerCertFile
# Server private key
#O ServerKeyFile
# Client Cert
#O ClientCertFile
# Client private key
#O ClientKeyFile
# File containing certificate revocation lists
#O CRLFile
# DHParameters (only required if DSA/DH is used)
#O DHParameters
# Random data source (required for systems without /dev/urandom under OpenSSL)
#O RandFile

############################
# QUEUE GROUP DEFINITIONS #
############################


###########################
# Message precedences #
###########################

Pfirst-class=0
Pspecial-delivery=100
Plist=-30
Pbulk=-60
Pjunk=-100

#####################
# Trusted users #
#####################

# this is equivalent to setting class "t"
Ft/etc/mail/trusted-users
Troot
Tdaemon
Tuucp

#########################
# Format of headers #
#########################

H?P?Return-Path: <$g>
HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
$.$?{auth_type}(authenticated$?{auth_ssf} bits=${auth_ssf}$.)
$.by $j ($v/$Z)$?r with $r$. id $i$?{tls_version}
(version=${tls_version} cipher=${cipher} bits=${cipher_bits} verify=${verify})$.$?u
for $u; $|;
$.$b
H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: $?x$x <$g>$|$g$.
H?F?From: $?x$x <$g>$|$g$.
H?x?Full-Name: $x
# HPosted-Date: $a
# H?l?Received-Date: $b
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>

Vielen Dank!

Googol

Terran Marine
14.10.04, 08:17
Vielen Dank!


Sendmail ! ! !

Sorry, hatte irgendwie automatisch an postfix gedacht.

sendmail kein Plan.