Postfix + SASLv2 + MySQL + Courier-IMAP

Bummibaer

Registered Schwarzbär
Hallo Forum,

die PAM Auth. Variante habe ich verworfen, da ich diese mit SASLv2 einfach nicht zum Laufen bewegen konnte (falls sich einer fragen sollte warum neuer Thread).

Code:
installierte Ports:
-------------------
mysql-client-4.0.20 Multithreaded SQL database (client)
mysql-server-4.0.20 Multithreaded SQL database (server)
pam_mysql-0.5_1     A pam module for authenticating with MySQL
php4-mysql-4.3.8_2  The mysql shared extension for php
cyrus-sasl-2.1.19   RFC 2222 SASL (Simple Authentication and Security Layer)
cyrus-sasl-saslauthd-2.1.19 SASL authentication server for cyrus-sasl2
postfix-2.1.4,1     A secure alternative to widely-used Sendmail
courier-imap-3.0.7,1 IMAP (and POP3) server that provides access to Maildir mail

Vorgehensweise bei der Install:
-------------------------------

MySQL Install

# cd /usr/ports/databases/mysql40-server
# make install clean

Cyrus SASL2 Install

# cd /usr/ports/security/cyrus-sasl2
# make -DWITH_MYSQL -DWITHOUT_PGSQL -DWITH_DEV_URANDOM -DWITHOUT_OTP -DWITHOUT_CRAM -DWITHOUT_DIGEST -DWITHOUT_NTLM install clean

# cd /usr/ports/security/cyrus-sasl2-saslauthd
# make build && make install && make clean

Cyrus SASL2 Setup

# cd /usr/local/lib/sasl2

### smtpd.conf ####
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: login plain
log_level: 3

sql_engine: mysql
sql_hostnames: localhost
sql_database: postfix
sql_user: postfix
sql_passwd: posfix
sql_select: SELECT password FROM mailbox WHERE username = '%u@%r'
sql_usessl: no
### END ####

Postfix Install

# cd /usr/ports/mail/postfix
# make install clean

Build with: PCRE, SASL2, MySQL and LDAP

Would you like to activate Postfix in /etc/mail/mailer.conf [n]? y

# postalias /etc/mail/aliases

### rc.conf Ausschnitt ###
# Postfix
sendmail_enable="YES"
sendmail_flags="-bd"
sendmail_pidfile="/var/spool/postfix/pid/master.pid"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
sendmail_msp_queue_enable="NO"
### Ende ###

/etc/periodic.conf

### periodic.conf ###
# Use Postfix
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
### Ende ###

Virtual Maildir

# mkdir /usr/local/virtual
# chown -R postfix:postfix /usr/local/virtual
# chmod -R 751 /usr/local/virtual

Postfix Setup

### main.cf ###
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
setgid_group = maildrop
sample_directory = /usr/local/etc/postfix
readme_directory = no
html_directory = no
home_mailbox = Maildir/
mail_owner = postfix
message_size_limit = 15728640
maximal_queue_lifetime = 30
queue_minfree = 23592960

myhostname = km1601.keymachine.de
mydomain = keymachine.de
mynetworks_style = host
mydestination = $transport_maps

disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_banner = $myhostname ESMTP
# smtpd_sasl_auth_enable = no
smtpd_sasl2_auth_enable = yes
smtp_sasl2_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = $myhostname
# smtpd_sasl_local_domain =
# smtpd_delay_reject = no

smtpd_sasl_security_options = noanonymous

# Test
smtp_sasl_password_maps = hash:/etc/sasldb2
smtpd_sasl_application_name = smtpd

smtpd_error_sleep_time = 1s
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 20

smtp_use_tls = yes
smtpd_use_tls = yes
# smtpd_tls_auth_only = yes

smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /usr/local/etc/postfix/imapd.pem
smtpd_tls_cert_file = /usr/local/etc/postfix/imapd.pem
# smtpd_tls_CAfile = /usr/local/etc/postfix/imapd.pem
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

smtpd_client_restrictions =
    #check_client_access mysql:/usr/local/etc/postfix/mysql-client.cf,
    permit_mynetworks,
    permit_sasl_authenticated,
    # reject_rbl_client dul.dnsbl.sorbs.net,
    # reject_rbl_client relays.ordb.org,
    # reject_rbl_client list.dsbl.org,
    # reject_rbl_client sbl-xbl.spamhaus.org,
    permit

smtpd_helo_restrictions =
    #check_helo_access mysql:/usr/local/etc/postfix/mysql-helo.cf,
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_invalid_hostname,
    reject_unknown_hostname,
    reject_non_fqdn_hostname,
    permit

smtpd_sender_restrictions =
     reject_invalid_hostname,
     reject_unknown_sender_domain,
     reject_non_fqdn_sender,
     reject_unknown_hostname

    # default_rbl_reply = $rbl_code Service unavailable; $rbl_class [$rbl_what]
    # blocked using $rbl_domain${rbl_reason?; $rbl_reason}

# smtpd_expansion_filter = t40!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~

smtpd_recipient_restrictions =
    #check_recipient_access mysql:/usr/local/etc/postfix/mysql-recipient.cf,
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_destination,
    reject_unknown_recipient_domain,
    reject_non_fqdn_recipient

smtpd_data_restrictions =
    reject_unauth_pipelining,
    permit

virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_limit = 51200000
virtual_transport = virtual
virtual_uid_maps = static:125
virtual_gid_maps = static:125

local_recipient_maps =
virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf

### Ende  main.cf ###

### mysql_virtual_alias_maps.cf ###
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
### Ende ###

### mysql_virtual_domains_maps.cf ###
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
### Ende ###

### mysql_virtual_mailbox_maps.cf ###
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
### Ende ###

### master.cf ###
# ==========================================================================
# 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 -o smtpd_etrn_restrictions=reject
#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       oqmgr
#tlsmgr   fifo  -       -       n       300     1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
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
anvil     unix  -       -       n       -       1       anvil
#
# 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}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/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
### Ende ###

Courier-IMAP Install

# cd /usr/ports/mail/courier-imap
# make -DWITH_MYSQL install clean

Courier-IMAP Setup

### authmysqlrc ###
# MYSQL_CRYPT_PWFIELD             password
MYSQL_CLEAR_PWFIELD		password
MYSQL_DATABASE                  postfix
#MYSQL_DATABASE			maildb
MYSQL_GID_FIELD                 125
MYSQL_HOME_FIELD                '/usr/local/virtual'
MYSQL_LOGIN_FIELD               username
MYSQL_MAILDIR_FIELD             maildir
MYSQL_NAME_FIELD                name
MYSQL_OPT                       0
MYSQL_PASSWORD                  postfix
MYSQL_PORT			0
MYSQL_SERVER                    localhost
MYSQL_SOCKET			/tmp/mysql.sock
MYSQL_UID_FIELD                 125
MYSQL_USERNAME                  postfix
#MYSQL_USERNAME			maildb
MYSQL_USER_TABLE                mailbox
MYSQL_QUOTA_FIELD		quota
# Reihenfolge 			username, cryptpw, uid, gid, clearpw, home, maildir, quota, fullname
#MYSQL_SELECT_CLAUSE		SELECT username, password, '', '', '', '', maildir, quota, name FROM mailbox WHERE username = $(local_part)' and domain = '$(domain)'
### ENDE ###

### authdaemonrc ###
authmodulelist="authcustom authuserdb authmysql authpam"
authmodulelistorig="authcustom authuserdb authmysql authpam"
daemons=5
version="authdaemond.mysql"
authdaemonvar=/usr/local/var/authdaemon
### ENDE ###

### aliases ###
# Person who should get root's mail. Don't receive mail as root!
#root:		you

# Basic system aliases -- these MUST be present
MAILER-DAEMON:	postmaster
postmaster:	root

# General redirections for pseudo accounts
bin:		root
daemon:		root
named:		root
nobody:		root
uucp:		root
www:		root
ftp-bugs:	root
postfix:	root

# Put your local aliases here.

# Well-known aliases
manager:	root
dumper:		root
operator:	root
abuse:		postmaster

# trap decode to catch security attacks
decode:		root
### ENDE ###

### imapd ###
ADDRESS=0
PORT=143
MAXDAEMONS=40
MAXPERIP=4
PIDFILE=/var/run/imapd.pid
TCPDOPTS="-nodnslookup -noidentlookup"
AUTHMODULES="authdaemon"
AUTHMODULES_ORIG="authdaemon"
DEBUG_LOGIN=0
IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE"
IMAP_KEYWORDS=1
IMAP_CAPABILITY_ORIG="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 IDLE"
IMAP_IDLE_TIMEOUT=60
IMAP_CAPABILITY_TLS="$IMAP_CAPABILITY AUTH=PLAIN"
IMAP_CAPABILITY_TLS_ORIG="$IMAP_CAPABILITY_ORIG AUTH=PLAIN"
IMAP_DISABLETHREADSORT=0
IMAP_CHECK_ALL_FOLDERS=0
IMAP_OBSOLETE_CLIENT=0
IMAP_ULIMITD=65536
IMAP_USELOCKS=1
IMAP_SHAREDINDEXFILE=/usr/local/etc/courier-imap/shared/index
IMAP_ENHANCEDIDLE=0
IMAP_TRASHFOLDERNAME=Trash
IMAP_EMPTYTRASH=Trash:7
IMAP_MOVE_EXPUNGE_TO_TRASH=0
SENDMAIL=/usr/bin/sendmail
HEADERFROM=X-IMAP-Sender
IMAPDSTART=NO
MAILDIRPATH=.maildir/
### ENDE ###

### pop3d ###
PIDFILE=/var/run/pop3d.pid
MAXDAEMONS=40
MAXPERIP=4
AUTHMODULES="authdaemon"
AUTHMODULES_ORIG="authdaemon"
DEBUG_LOGIN=0
POP3AUTH="LOGIN"
POP3AUTH_ORIG="LOGIN CRAM-MD5 CRAM-SHA1"
POP3AUTH_TLS="LOGIN PLAIN"
POP3AUTH_TLS_ORIG="LOGIN PLAIN"
PORT=110
ADDRESS=0
TCPDOPTS="-nodnslookup -noidentlookup"
POP3DSTART=NO
MAILDIRPATH=.maildir/
### ENDE ###

### mail.rc ###
set append dot save ask crt
ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via
### ENDE ###

### mailer.conf ###
sendmail	/usr/local/sbin/sendmail
send-mail	/usr/local/sbin/sendmail
mailq		/usr/local/sbin/sendmail
newaliases	/usr/local/sbin/sendmail
### ENDE ###

### pam.conf ###
login	auth	sufficient	pam_skey.so
login	auth	sufficient	pam_opie.so			no_fake_prompts
login	auth	requisite	pam_cleartext_pass_ok.so
login	auth	required	pam_unix.so			try_first_pass
login	account	required	pam_unix.so
login	password required	pam_permit.so
login	session	required	pam_permit.so

sshd	auth	sufficient	pam_skey.so
sshd	auth	sufficient	pam_opie.so			no_fake_prompts
sshd	auth	required	pam_unix.so			try_first_pass
sshd	account	required	pam_unix.so
sshd	password required	pam_permit.so
sshd	session	required	pam_permit.so

telnetd	auth	required	pam_unix.so			try_first_pass

xserver	auth	required	pam_permit.so

xdm	auth	required	pam_unix.so
xdm	account	required	pam_unix.so			try_first_pass
xdm	session	required	pam_deny.so
xdm	password required	pam_deny.so

gdm	auth	required	pam_unix.so
gdm	account	required	pam_unix.so			try_first_pass
gdm	session	required	pam_permit.so
gdm	password required	pam_deny.so

other	auth	sufficient	pam_skey.so
other	auth	required	pam_unix.so			try_first_pass
other	account	required	pam_unix.so			try_first_pass

# postfix, courier-imap
#smtp	auth	sufficient	pam_mysql.so			host=localhost user=postfix passwd=postfix db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=0 sqllog=0
#smtp	account	required	pam_mysql.so			host=localhost user=postfix passwd=postfix db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=0 sqllog=0
#smtp	account	sufficient	pam_unix.so
#smtp	account	required	pam_mysql.so			user=postfix passwd=postfix db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=0
#smtp	session	required	pam_permit.so
imap    auth    required	pam_mysql.so			host=localhost user=postfix passwd=postfix db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=0
imap    account required	pam_unix.so			try_first_pass
imap    session required	pam_permit.so
pop3	auth	required	pam_unix.so			host=localhost user=postfix passwd=postfix db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1

# Proftpd
ftpd	auth	required	pam_unix.so			try_first_pass
ftpd	account	required	pam_unix.so			try_first_pass
ftpd	session	required	pam_permit.so
### ENDE ###

### MYSQL Strukturen ###

#
# Tabellenstruktur für Tabelle `admin`
#

DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `username` varchar(255) NOT NULL default '',
  `password` varchar(255) NOT NULL default '',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
  `active` tinyint(4) NOT NULL default '1',
  PRIMARY KEY  (`username`),
  KEY `username` (`username`)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Admins';

#
# Tabellenstruktur für Tabelle `alias`
#

DROP TABLE IF EXISTS `alias`;
CREATE TABLE `alias` (
  `address` varchar(255) NOT NULL default '',
  `goto` text NOT NULL,
  `domain` varchar(255) NOT NULL default '',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
  `active` tinyint(4) NOT NULL default '1',
  PRIMARY KEY  (`address`),
  KEY `address` (`address`)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Aliases';

#
# Tabellenstruktur für Tabelle `domain`
#

DROP TABLE IF EXISTS `domain`;
CREATE TABLE `domain` (
  `domain` varchar(255) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  `aliases` int(10) NOT NULL default '-1',
  `mailboxes` int(10) NOT NULL default '-1',
  `maxquota` int(10) NOT NULL default '-1',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
  `active` tinyint(4) NOT NULL default '1',
  PRIMARY KEY  (`domain`),
  KEY `domain` (`domain`)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Domains';

#
# Tabellenstruktur für Tabelle `domain_admins`
#

DROP TABLE IF EXISTS `domain_admins`;
CREATE TABLE `domain_admins` (
  `username` varchar(255) NOT NULL default '',
  `domain` varchar(255) NOT NULL default '',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `active` tinyint(4) NOT NULL default '1',
  KEY `username` (`username`)
) TYPE=MyISAM COMMENT='Postfix Admin - Domain Admins';

#
# Tabellenstruktur für Tabelle `log`
#

DROP TABLE IF EXISTS `log`;
CREATE TABLE `log` (
  `timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
  `username` varchar(255) NOT NULL default '',
  `domain` varchar(255) NOT NULL default '',
  `action` varchar(255) NOT NULL default '',
  `data` varchar(255) NOT NULL default '',
  KEY `timestamp` (`timestamp`)
) TYPE=MyISAM COMMENT='Postfix Admin - Log';

#
# Tabellenstruktur für Tabelle `mailbox`
#

DROP TABLE IF EXISTS `mailbox`;
CREATE TABLE `mailbox` (
  `username` varchar(255) NOT NULL default '',
  `password` varchar(255) NOT NULL default '',
  `name` varchar(255) NOT NULL default '',
  `maildir` varchar(255) NOT NULL default '',
  `quota` int(10) NOT NULL default '-1',
  `domain` varchar(255) NOT NULL default '',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
  `active` tinyint(4) NOT NULL default '1',
  PRIMARY KEY  (`username`),
  KEY `username` (`username`)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Mailboxes';

#
# Tabellenstruktur für Tabelle `vacation`
#

DROP TABLE IF EXISTS `vacation`;
CREATE TABLE `vacation` (
  `email` varchar(255) NOT NULL default '',
  `subject` varchar(255) NOT NULL default '',
  `body` text NOT NULL,
  `cache` text NOT NULL,
  `domain` varchar(255) NOT NULL default '',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `active` tinyint(4) NOT NULL default '1',
  PRIMARY KEY  (`email`),
  KEY `email` (`email`)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Vacation';

### ENDE Stukturen ###

km1601# cd /var/state/saslauthd
km1601# ls -ls
total 2
0 srwxrwxrwx  1 root  mail  0 Aug 10 21:08 mux
0 -rw-------  1 root  mail  0 Aug 10 21:08 mux.accept
2 -rw-------  1 root  mail  6 Aug 10 20:40 saslauthd.pid
0 --w-------  1 root  mail  0 Aug 10 21:08 saslauthd.pid.lock

km1601# postconf -m
static
sdbm
cidr
pcre
regexp
environ
mysql
proxy
ldap
btree
unix
hash

/usr/local/sbin/saslauthd -v
saslauthd 2.1.19
authentication mechanisms: sasldb getpwent pam rimap

ldd /usr/local/libexec/postfix/smtpd
/usr/local/libexec/postfix/smtpd:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x280b0000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x280c4000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x280ce000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280e7000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x28116000)
        libm.so.2 => /usr/lib/libm.so.2 (0x2820d000)
        libz.so.2 => /usr/lib/libz.so.2 (0x28228000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x28235000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28260000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x2826b000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28276000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x2830f000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x2833d000)

ldd /usr/local/sbin/saslauthd
/usr/local/sbin/saslauthd:
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x2806f000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x28088000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28092000)

ldd /usr/local/sbin/courierlogger
/usr/local/sbin/courierlogger:
        libc.so.4 => /usr/lib/libc.so.4 (0x28068000)

ldd /usr/local/sbin/imaplogin
/usr/local/sbin/imaplogin:
        libc.so.4 => /usr/lib/libc.so.4 (0x2816a000)

ldd /usr/local/sbin/pop3login
/usr/local/sbin/pop3login:
        libc.so.4 => /usr/lib/libc.so.4 (0x28168000)

ldd /usr/local/sbin/postcat
/usr/local/sbin/postcat:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28074000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x28088000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28092000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280ab000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280da000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281d1000)
        libz.so.2 => /usr/lib/libz.so.2 (0x281ec000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x281f9000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28224000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x2822f000)
        libc.so.4 => /usr/lib/libc.so.4 (0x2823a000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282d3000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x28301000)

ldd /usr/local/sbin/postconf
/usr/local/sbin/postconf:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28091000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x280a5000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x280af000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280c8000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280f7000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281ee000)
        libz.so.2 => /usr/lib/libz.so.2 (0x28209000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x28216000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28241000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x2824c000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28257000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282f0000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x2831e000)

ldd /usr/local/sbin/postdrop
/usr/local/sbin/postdrop:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28078000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x2808c000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28096000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280af000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280de000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281d5000)
        libz.so.2 => /usr/lib/libz.so.2 (0x281f0000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x281fd000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28228000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28233000)
        libc.so.4 => /usr/lib/libc.so.4 (0x2823e000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282d7000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x28305000)

ldd /usr/local/sbin/postfix
/usr/local/sbin/postfix:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28072000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x28086000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28090000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280a9000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280d8000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281cf000)
        libz.so.2 => /usr/lib/libz.so.2 (0x281ea000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x281f7000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28222000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x2822d000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28238000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282d1000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x282ff000)

ldd /usr/local/sbin/postkick
/usr/local/sbin/postkick:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28073000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x28087000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28091000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280aa000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280d9000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281d0000)
        libz.so.2 => /usr/lib/libz.so.2 (0x281eb000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x281f8000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28223000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x2822e000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28239000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282d2000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x28300000)

ldd /usr/local/sbin/postlock
/usr/local/sbin/postlock:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28073000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x28087000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28091000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280aa000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280d9000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281d0000)
        libz.so.2 => /usr/lib/libz.so.2 (0x281eb000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x281f8000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28223000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x2822e000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28239000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282d2000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x28300000)

ldd /usr/local/sbin/postlog
/usr/local/sbin/postlog:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28072000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x28086000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28090000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280a9000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280d8000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281cf000)
        libz.so.2 => /usr/lib/libz.so.2 (0x281ea000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x281f7000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28222000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x2822d000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28238000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282d1000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x282ff000)

ldd /usr/local/sbin/postmap
/usr/local/sbin/postmap:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x2808e000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x280a2000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x280ac000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280c5000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280f4000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281eb000)
        libz.so.2 => /usr/lib/libz.so.2 (0x28206000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x28213000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x2823e000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28249000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28254000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282ed000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x2831b000)

ldd /usr/local/sbin/postqueue
/usr/local/sbin/postqueue:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x2807c000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x28090000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x2809a000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280b3000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280e2000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281d9000)
        libz.so.2 => /usr/lib/libz.so.2 (0x281f4000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x28201000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x2822c000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28237000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28242000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282db000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x28309000)

ldd /usr/local/sbin/postsuper
/usr/local/sbin/postsuper:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28075000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x28089000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28093000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280ac000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280db000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281d2000)
        libz.so.2 => /usr/lib/libz.so.2 (0x281ed000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x281fa000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28225000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28230000)
        libc.so.4 => /usr/lib/libc.so.4 (0x2823b000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282d4000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x28302000)

ldd /usr/local/sbin/sendmail
/usr/local/sbin/sendmail:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x2807c000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x28090000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x2809a000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280b3000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280e2000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281d9000)
        libz.so.2 => /usr/lib/libz.so.2 (0x281f4000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x28201000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x2822c000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28237000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28242000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x282db000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x28309000)

POP3+IMAP sind ok, das geht ohne Probleme. SMTP Mailversand an Empfänger, welche auf dem selben Server Accounts haben werden ordnungsgemäß zugestellt. Beim Mailversandt mittels SMTP Auth. zu einem fremden Account (ein Account der nicht auf dem Server selber vorhanden ist sondern auf einem externen anderen) schlägt jedoch fehl.

Ausgabe im maillog:
Code:
Aug 17 15:58:55 km1601 postfix/smtpd[45320]: starting TLS engine
Aug 17 15:58:57 km1601 postfix/smtpd[45320]: connect from p********.dip0.t-ipconnect.de[80.***.80.**]
Aug 17 15:58:57 km1601 postfix/smtpd[45320]: NOQUEUE: reject: RCPT from p********.dip0.t-ipconnect.de[80.***.80.**]: 554 <extaccount@fremdedomain.de>: Relay access denied; from=<test@eigenedomain.de> to=<extaccount@fremdedomain.de> proto=ESMTP helo=<eigenedomain.de>
Aug 17 15:58:58 km1601 postfix/smtpd[45320]: disconnect from p********.dip0.t-ipconnect.de[80.***.80.**]

Ausgabe mysql.log
Code:
040817 15:58:57    2213 Connect     postfix@localhost on postfix
                   2213 Query       select goto from alias where address = 'eigenedomain.de'
                   2214 Connect     postfix@localhost on postfix
                   2214 Query       select description from domain where domain = 'eigenedomain.de'
                   2213 Query       select goto from alias where address = 'fremdedomain.de'
                   2214 Query       select description from domain where domain = 'fremdedomain.de'
040817 15:59:57    2213 Quit       
                   2214 Quit

Ausgabe sockstat -4 (Ausschnitt)
Code:
root     master   35977   12 tcp4   *:25                  *:*                  
root     couriert 35321    6 tcp4   *:110                 *:*                  
root     couriert 35292    6 tcp4   *:143                 *:*

Code:
Test mit Telnet:
----------------
# telnet km1601.keymachine.de 25
Trying 62.141.54.110...
Connected to km1601.keymachine.de.
Escape character is '^]'.
220 km1601.keymachine.de ESMTP
EHLO km1601.keymachine.de
250-km1601.keymachine.de
250-PIPELINING
250-SIZE 15728640
250-ETRN
250-STARTTLS
250 8BITMIME
AUTH PLAIN a2RlbnQAa2RlbnQAcnVtcGxlc3RpbHRza2lu
503 Error: authentication not enabled
quit
221 Bye
Connection closed by foreign host.

Sieht also ganz danach aus das die SASL2 Unterstützung nicht tut.

Gruß vom verzweifelten Bären
 
Zuletzt bearbeitet:
also bei mir sieht die smtpd.conf etwas anders aus:

sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sql
sasl_sql_engine: mysql
sasl_mech_list: login plain
sasl_sql_hostname: localhost
sasl_sql_user: XXX
sasl_sql_passwd: XXX
sasl_sql_database: XXX
sasl_sql_verbose: yes
sasl_sql_statement: SELECT....

ich hatte vorher auch genau das selbe (oder zumindest ein sehr ähnliches) problem. mir hat die änderung dieser datei wie oben dann den gewünschten erfolg gebracht

edit: ich sehe grade das auth bei dir nicht aktiviert zu seien scheint. ich nutze auch sasl2, gebe aber trotzdem nur smtpd_sasl_auth_enable = yes an. ich wüsste auch nicht das es den von dir verwendeten parameter smtpd_sasl2_auth_enable gibt.
 
Zuletzt bearbeitet:
wysiib schrieb:
also bei mir sieht die smtpd.conf etwas anders aus:

sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sql
sasl_sql_engine: mysql
sasl_mech_list: login plain
sasl_sql_hostname: localhost
sasl_sql_user: XXX
sasl_sql_passwd: XXX
sasl_sql_database: XXX
sasl_sql_verbose: yes
sasl_sql_statement: SELECT....

ich hatte vorher auch genau das selbe (oder zumindest ein sehr ähnliches) problem. mir hat die änderung dieser datei wie oben dann den gewünschten erfolg gebracht

edit: ich sehe grade das auth bei dir nicht aktiviert zu seien scheint. ich nutze auch sasl2, gebe aber trotzdem nur smtpd_sasl_auth_enable = yes an. ich wüsste auch nicht das es den von dir verwendeten parameter smtpd_sasl2_auth_enable gibt.

Hallo wysiib,

ich habe nun mal folgendes versucht:

smtpd_sasl_auth_enable = yes in der main.cf gesetzt

und die /usr/local/lib/sasl2/smtpd.conf geändert.
Code:
### smtpd.conf 1. Versuch ###
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sql
sasl_sql_engine: mysql
sasl_mech_list: login plain
sasl_sql_hostname: localhost
sasl_sql_user: postfix
sasl_sql_passwd: postfix
sasl_sql_database: postfix
sasl_sql_verbose: yes
sasl_sql_statement: SELECT password FROM mailbox WHERE username = '%u@%r'
### Ende ###

### smtpd.conf 2. Versuch ###
sasl2_pwcheck_method: auxprop
sasl2_auxprop_plugin: sql
sasl2_sql_engine: mysql
sasl2_mech_list: login plain
sasl2_sql_hostname: localhost
sasl2_sql_user: postfix
sasl2_sql_passwd: postfix
sasl2_sql_database: postfix
sasl2_sql_verbose: yes
sasl2_sql_statement: SELECT password FROM mailbox WHERE username = '%u@%r'
### Ende ###

Ergebnis ist das gleiche wie vorhin, nur zusätzlich kommt nun noch folgende Meldung in der Maillog:
Code:
Aug 17 16:35:23 km1601 postfix/smtpd[45933]: starting TLS engine
Aug 17 16:35:23 km1601 postfix/master[45842]: warning: process /usr/local/libexec/postfix/smtpd pid 45933 killed by signal 10
Aug 17 16:35:23 km1601 postfix/master[45842]: warning: /usr/local/libexec/postfix/smtpd: bad command startup -- throttling

Gruß Bär
 
xqq schrieb:

Hallo xqq,

ganz einfach weil SASLv1 ständig mit der Mysql Version 3 rummachen wollte, ich aber die 4.0.20er haben wollte. (von den deps.) und mod_php4 mittels OpenLDAP Deps. sich in die Quere kam.

Gruß Bär
 
nein ich meine das "generell" wieso verwendest du SASL, das braucht doch kein Mensch, verwende lieber TLS das reicht vollkommen.
 
xqq schrieb:
nein ich meine das "generell" wieso verwendest du SASL, das braucht doch kein Mensch, verwende lieber TLS das reicht vollkommen.

Aus dem Grund, da die Clients ewig röden bei der Verschlüsslung über TLS.

Code:
Aug 17 17:00:20 km1601 postfix/smtpd[46271]: starting TLS engine
Aug 17 17:00:20 km1601 postfix/smtpd[46271]: connect from p*.dip0.t-ipconnect.de[80.***.80.**]
Aug 17 17:05:20 km1601 postfix/smtpd[46271]: timeout after EHLO from o*.dip0.t-ipconnect.de[80.***.80.**]
Aug 17 17:05:20 km1601 postfix/smtpd[46271]: disconnect from p*.dip0.t-ipconnect.de[80.***.80.**]

Die CPU Usage hängt ewig bei 100% und bevor die mit "rumrödeln" fertig sind ist schon der Timeout erreicht. Vermutlich sind die Clients zu "leistungsarm" um innerhalb des Timeouts erfolgreich zu kommunizieren.

Gruß Bär
 
Moin,

hast du auch sasl in Postfix einkompiliert? Im anderen Thread ist zu sehen, dass das libsasl nicht in der Ausgabe vom ldd auf /usr/local/libexec/postfix/smtpd auftaucht. Bei mir sieht das so aus:

[root@peterle root# ldd /usr/local/libexec/postfix/smtpd
/usr/local/libexec/postfix/smtpd:
libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x280a2000)
libpam.so.1 => /usr/lib/libpam.so.1 (0x280b6000)
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x280c0000)
libssl.so.3 => /usr/lib/libssl.so.3 (0x280d9000)
libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x28108000)
libdb-4.2.so.2 => /usr/local/lib/libdb-4.2.so.2 (0x281ff000)
libldap.so.2 => /usr/local/lib/libldap.so.2 (0x282bd000)
liblber.so.2 => /usr/local/lib/liblber.so.2 (0x282e8000)
libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x282f3000)
libc.so.4 => /usr/lib/libc.so.4 (0x282fe000)
libssl.so.3 => /usr/local/lib/libssl.so.3 (0x28397000)
libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x283c5000)
[root@peterle root#

Bis denne

Kalle
 
änder mal bitte in der master.cf in der ersten zeile, das letzte argument von "smtpd" auf "smtpd -v". dann sollte das logfile etwas ausführlicher werden. dann bitte nochmals das log hier rein schreiben
 
Kalle schrieb:
Moin,

hast du auch sasl in Postfix einkompiliert? Im anderen Thread ist zu sehen, dass das libsasl nicht in der Ausgabe vom ldd auf /usr/local/libexec/postfix/smtpd auftaucht. Bei mir sieht das so aus:

[root@peterle root# ldd /usr/local/libexec/postfix/smtpd
/usr/local/libexec/postfix/smtpd:
libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x280a2000)
libpam.so.1 => /usr/lib/libpam.so.1 (0x280b6000)
libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x280c0000)
libssl.so.3 => /usr/lib/libssl.so.3 (0x280d9000)
libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x28108000)
libdb-4.2.so.2 => /usr/local/lib/libdb-4.2.so.2 (0x281ff000)
libldap.so.2 => /usr/local/lib/libldap.so.2 (0x282bd000)
liblber.so.2 => /usr/local/lib/liblber.so.2 (0x282e8000)
libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x282f3000)
libc.so.4 => /usr/lib/libc.so.4 (0x282fe000)
libssl.so.3 => /usr/local/lib/libssl.so.3 (0x28397000)
libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x283c5000)
[root@peterle root#

Bis denne

Kalle

Hallo Kalle, ja hab ich.
Code:
ldd /usr/local/libexec/postfix/smtpd
/usr/local/libexec/postfix/smtpd:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x280b0000)
        libpam.so.1 => /usr/lib/libpam.so.1 (0x280c4000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x280ce000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280e7000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x28116000)
        libm.so.2 => /usr/lib/libm.so.2 (0x2820d000)
        libz.so.2 => /usr/lib/libz.so.2 (0x28228000)
        libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x28235000)
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x28260000)
        libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x2826b000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28276000)
        libssl.so.3 => /usr/local/lib/libssl.so.3 (0x2830f000)
        libcrypto.so.3 => /usr/local/lib/libcrypto.so.3 (0x2833d000)
 
wysiib schrieb:
änder mal bitte in der master.cf in der ersten zeile, das letzte argument von "smtpd" auf "smtpd -v". dann sollte das logfile etwas ausführlicher werden. dann bitte nochmals das log hier rein schreiben

Hallo wysiib, hab ich getan, anbei:

Code:
Aug 17 19:36:08 km1601 postfix/postfix-script: stopping the Postfix mail system
Aug 17 19:36:08 km1601 postfix/master[47887]: terminating on signal 15
Aug 17 19:36:47 km1601 postfix/postfix-script: starting the Postfix mail system
Aug 17 19:36:47 km1601 postfix/master[47952]: daemon started -- version 2.1.4
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: name_mask: host
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: inet_addr_local: configured 7 IPv4 addresses
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: inet_addr_local: configured 3 IPv6 addresses
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: mynetworks: 62.141.54.110/32 62.141.55.110/32 62.141.58.243/32 62.141.58.244/32 62.141.58.245/32 62.141.58.246/32 127.0.0.1/32 [fe80::2e0:4cff:feab:330b%rl0]/128 [::1]/128 [fe80::1%lo0]/128
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: mynetworks ~? debug_peer_list
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: mynetworks ~? fast_flush_domains
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: mynetworks ~? mynetworks
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: relay_domains ~? debug_peer_list
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: relay_domains ~? fast_flush_domains
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: relay_domains ~? mynetworks
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: relay_domains ~? permit_mx_backup_networks
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: relay_domains ~? qmqpd_authorized_clients
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: relay_domains ~? relay_domains
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: permit_mx_backup_networks ~? debug_peer_list
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: permit_mx_backup_networks ~? fast_flush_domains
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: permit_mx_backup_networks ~? mynetworks
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: permit_mx_backup_networks ~? permit_mx_backup_networks
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf: user = postfix
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf: password = postfix
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf: dbname = postfix
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf: table = alias
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf: select_field = goto
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf: where_field = address
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf: additional_conditions =
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf: hosts = localhost
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: mysqlname_parse: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf: adding host 'localhost' to list of mysql server hosts
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: dict_open: mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf: user = postfix
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf: password = postfix
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf: dbname = postfix
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf: table = mailbox
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf: select_field = maildir
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf: where_field = username
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf: additional_conditions =
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf: hosts = localhost
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: mysqlname_parse: /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf: adding host 'localhost' to list of mysql server hosts
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: dict_open: mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: smtpd_access_maps ~? debug_peer_list
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: smtpd_access_maps ~? fast_flush_domains
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: smtpd_access_maps ~? mynetworks
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: smtpd_access_maps ~? permit_mx_backup_networks
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: smtpd_access_maps ~? qmqpd_authorized_clients
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: smtpd_access_maps ~? relay_domains
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: smtpd_access_maps ~? smtpd_access_maps
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: smtpd_sasl_initialize: SASL config file is smtpd.conf
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: starting TLS engine
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: fast_flush_domains ~? debug_peer_list
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: match_string: fast_flush_domains ~? fast_flush_domains
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: watchdog_create: 0x80ab188 18000
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: watchdog_stop: 0x80ab188
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: watchdog_start: 0x80ab188
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: connection established
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: master_notify: status 0
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: name_mask: resource
Aug 17 19:36:51 km1601 postfix/smtpd[47955]: name_mask: software
Aug 17 19:36:51 km1601 postfix/master[47952]: warning: process /usr/local/libexec/postfix/smtpd pid 47955 killed by signal 10
Aug 17 19:36:51 km1601 postfix/master[47952]: warning: /usr/local/libexec/postfix/smtpd: bad command startup -- throttling
Aug 17 19:36:56 km1601 postfix/postfix-script: stopping the Postfix mail system
Aug 17 19:36:56 km1601 postfix/master[47952]: terminating on signal 15

Gruß Bummibärle
 
hmmm also im log finde ich nichts warum er nicht starten kann. hast du mal mit postfix check geprüft ob deine config dateien in ordnung sind?
 
wysiib schrieb:
hmmm also im log finde ich nichts warum er nicht starten kann. hast du mal mit postfix check geprüft ob deine config dateien in ordnung sind?

"postfix check" bringt nichts, sprich scheint ok zu sein alles - SMTP Auth über MySQL tut leider trotzdem nicht ;'(

Gruß Bummibärle
 
Zuletzt bearbeitet:
Hallo Forum,

ich hab mir die Logfiles nochmals vorgenommen, ich kann leider den Fehler immer noch nicht finden. Hat den niemand mehr eine Idee oder den Ansatz eines blosen Hauchs einer Idee wo ich noch suchen könnt ?

*stark verzweifelt und nache an Nevenzusammenbruch* :zitter:

Gruß Bummibaer
 
Mich hat es scho tage gekostet,das bei perl5.8 hier der crypto nicht richtig gerechnet wird.
Der Hauch --- mach den make test oder testet nur das modul
 
hallo,
bei mir läuft postfix2 und sasl2 mit mysql.
pam hatte ich auch schon am rennnen.

Ist das bei dir vorhanden.??

Code:
test# ls -al /usr/local/lib/sasl2/libsql*
-rw-r--r--  1 root  wheel  17680 Sep  9 14:27 /usr/local/lib/sasl2/libsql.a
lrwxr-xr-x  1 root  wheel     11 Sep  9 14:27 /usr/local/lib/sasl2/libsql.so ->
libsql.so.2
-rwxr-xr-x  1 root  wheel  21356 Sep  9 14:27 /usr/local/lib/sasl2/libsql.so.2

gruss k33n.
 
Mmm

k33n schrieb:
hallo,
bei mir läuft postfix2 und sasl2 mit mysql.
pam hatte ich auch schon am rennnen.

Ist das bei dir vorhanden.??

Code:
test# ls -al /usr/local/lib/sasl2/libsql*
-rw-r--r--  1 root  wheel  17680 Sep  9 14:27 /usr/local/lib/sasl2/libsql.a
lrwxr-xr-x  1 root  wheel     11 Sep  9 14:27 /usr/local/lib/sasl2/libsql.so ->
libsql.so.2
-rwxr-xr-x  1 root  wheel  21356 Sep  9 14:27 /usr/local/lib/sasl2/libsql.so.2

gruss k33n.

Hallo,

habe ähnliche Probleme...:-( Bei mir gibt es obige Dateien nicht...

Code:
sydney# cd /usr/local/lib/sasl2/
sydney# ls
Sendmail.conf           libgssapiv2.a           libotp.so
libanonymous.a          libgssapiv2.so          libotp.so.2
libanonymous.so         libgssapiv2.so.2        libplain.a
libanonymous.so.2       liblogin.a              libplain.so
libcrammd5.a            liblogin.so             libplain.so.2
libcrammd5.so           liblogin.so.2           libsasldb.a
libcrammd5.so.2         libntlm.a               libsasldb.so
libdigestmd5.a          libntlm.so              libsasldb.so.2
libdigestmd5.so         libntlm.so.2            smtpd.conf
libdigestmd5.so.2       libotp.a

Was heißt das? Was ist falsch?

Viele Grüße,
Vanessa
 
jetzt mal ehrlich wozu braucht ihr SASL? ich seh keinen Vorteil wenn ihr das verwendet, TLS und CRAM-MD5 sollte Postfix doch selbst können.

edit: hoppala ich seh grad die frage hab ich schon einmal gestellt, aber meine meinung bleibt :), ihr tut euch da was unnötig an.
 
xqq schrieb:
jetzt mal ehrlich wozu braucht ihr SASL? ich seh keinen Vorteil wenn ihr das verwendet, TLS und CRAM-MD5 sollte Postfix doch selbst können.

edit: hoppala ich seh grad die frage hab ich schon einmal gestellt, aber meine meinung bleibt :), ihr tut euch da was unnötig an.

TLS is als broken markiert ....
 
vanedler schrieb:
Hallo,

habe ähnliche Probleme...:-( Bei mir gibt es obige Dateien nicht...

Code:
sydney# cd /usr/local/lib/sasl2/
sydney# ls
Sendmail.conf           libgssapiv2.a           libotp.so
libanonymous.a          libgssapiv2.so          libotp.so.2
libanonymous.so         libgssapiv2.so.2        libplain.a
libanonymous.so.2       liblogin.a              libplain.so
libcrammd5.a            liblogin.so             libplain.so.2
libcrammd5.so           liblogin.so.2           libsasldb.a
libcrammd5.so.2         libntlm.a               libsasldb.so
libdigestmd5.a          libntlm.so              libsasldb.so.2
libdigestmd5.so         libntlm.so.2            smtpd.conf
libdigestmd5.so.2       libotp.a

Was heißt das? Was ist falsch?

Viele Grüße,
Vanessa

dann hast du wohl ohne 'WITH_MYSQL=1' kompiliert denke ich
 
doch doch

wysiib schrieb:
dann hast du wohl ohne 'WITH_MYSQL=1' kompiliert denke ich

Hallo,

habe das so gemacht:
Code:
# cd /usr/ports/mail/postfix
# make install clean

Es kommt ja dann der Abfragebildschirm, bei dem gefragt wird, wie kompeliert werden soll. Ich habe das hier aus der Liste angeklickt:

----> Build with: PCRE, SASL2, MySQL, LDAP

Sollte also mit MySQL sein oder nicht?
 
vanedler schrieb:
Hallo,

habe das so gemacht:
Code:
# cd /usr/ports/mail/postfix
# make install clean

Es kommt ja dann der Abfragebildschirm, bei dem gefragt wird, wie kompeliert werden soll. Ich habe das hier aus der Liste angeklickt:

----> Build with: PCRE, SASL2, MySQL, LDAP

Sollte also mit MySQL sein oder nicht?

jein. ich meinte das der sasl2 port ohne die option kompiliert wurde. sonst solltest du diese lib eigentlich dort haben
 
Grübel

wysiib schrieb:
jein. ich meinte das der sasl2 port ohne die option kompiliert wurde. sonst solltest du diese lib eigentlich dort haben

Ach Sasl2 meinst du... das war so:

Code:
### Cyrus Authentifizierung installieren ###

Cyrus SASL2 Install

# cd /usr/ports/security/cyrus-sasl2
# make --WITH_MYSQL --WITHOUT_PGSQL --WITH_DEV_URANDOM --WITHOUT_OTP --WITHOUT_CRAM --WITHOUT_DIGEST --WITHOUT_NTLM
# make install clean

Cyrus SASL2 Authd Install

# cd /usr/ports/security/cyrus-sasl2-saslauthd
# make install clean

# edit /etc/rc.conf
# saslauthd_enable="YES"

Was meinst du?
 
soweit so gut...

Hallo!

Ich habe jetzt herausgefunden, an was es gelegen hat. Beim Kompelieren heißt es nicht --WITH* sonder -DWITH. Also:

Code:
# cd /usr/ports/security/cyrus-sasl2
# make -DWITH_MYSQL -DWITHOUT_PGSQL -DWITH_DEV_URANDOM -DWITHOUT_OTP -DWITHOUT_CRAM -DWITHOUT_DIGEST -DWITHOUT_NTLM
# make install clean

Jetzt habe ich die o.g. Dateien. Jetzt läuft der Mailserver, trotzdem stimmt irgendetwas nicht, glaube ich. Bis jetzt habe ich neue Mailadressen mit Webmin (Virtualmin) eingerichtet. Macht er auch. Neue Mailadressen werden dann in Virtualmin angezeigt. In der Datenbank für postfix wird jedoch keine neue Mailadresse angezeigt. Ich vermute, dass Webmin das nicht kann. Ich habe dann die Datenbank per Hand gefüllt. Die Verbindung kommt zustande, bei der Authentifizierung sagt Outlook "Password refused". Also klappt das nicht, mit der Authentifizierung. Ich würde gerne Wissen, wie man neue Mailadressen per bash einrichtet. Hat da jemand einen Tipp?
Ab liebsten würde ich das sowieso später per bash und cron machen. Vielen Dank im voraus.

Viele Grüße,
Vanessa
 
trag mal folgendes in dein mysqld start script ein.

/usr/local/bin/safe_mysqld --log=/tmp/mysqld.debug --user=mysql --safe-show-database > /dev/null &

damit aktivierst du das logging des mysqld und siehst, ob sasl überhaupt ne anfrage an den mysql stellt.

k33n
 
Zurück
Oben