[Postfixbuch-users] grundlegende Verständnisfragen und mehr...

Andi Voss andi at andis.mine.nu
So Dez 19 18:46:20 CET 2004


Christian Schoepplein schrieb:
> On So, Dez 19, 2004 at 03:06:11 +0000, Andi Voss wrote:
> 
>>Christian Schoepplein schrieb:
>>
>>>On So, Dez 19, 2004 at 01:52:30 +0000, Andi Voss wrote:
>>>
>>>>3.) Postfix zum versenden einen anderen Host angeben.
>>>>Das hab ich bisher gemacht, doch Postfix liefert immer schön selber aus 
>>>>und beachtet diesen Eintrag überhaupt nicht.
>>>>In main.cf:
>>>>smtp_sasl_auth_enable = yes
>>>>smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
>>>>
>>>>Inhalt von sasl_passwd:
>>>>host.domain.de	user:passwd
>>>>
>>>>postmap /etc/postfix/sasl_passwd
>>>>
>>>>Fehlt noch irgendein Eintrag damit Postfix den anderen Host zum 
>>>>Versenden verwendet?
>>>
>>>
>>>Ja. In main.cf:
>>>
>>>relayhost = der.server.aus.sassel_passwd
>>>
>>>Der Name des Relayhost muss genau mit dem Eintrag in sasl_passwd 
>>>übereinstimmen, sonst gehts nicht.
> 
> 
> [...]
> 
> 
>>also das mit dem relayhost hat zwar nicht übereingestimmt, aber gehen 
>>tut es jetzt immer noch nicht.
>>Die Einträge dafür werden einfach komplett übergangen.
>>Ist die Reihenfolge wichtig, wo die Variablen belegt werden - 
>>wahrscheinlich nur wichtig bei den restriction Regeln ?
> 
> 
> Die Reihenfolge ist egal. Der relayhost muss in der main.cf stehen und 
> in sasl_passwd muss genau für diesen Host ein Eintrag stehen.
> 
> Hast du evtl. ein postmap auf die sasl_passwd vergessen?
> Hast du postfix reloaded, nachdem du die Änderungen vorgenommen hast?
> 
> Ansonsten zeig doch mal bitte 
> 
> postconf -n 
> 
> und Logs.
> 
> Ciao,
> Schöpp
> 

Hi und Danke schomal für Eure Hilfe,

postmap hab ich nach anlegen der sasl_passwd ausgeführt und die 
sasl_passwd.db ist auch vorhanden.
Postfix ist auch immer schön reloaded/restartet worden.

Hier die Ausgabe von postconf -n :

alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin/
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 10
default_database_type = hash
html_directory = /usr/doc/postfix-2.1.5/html
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = andis.mine.nu
myhostname = milhouse.andis.mine.nu
mynetworks = 192.168.0.0/24, 127.0.0.0/8
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/doc/postfix-2.1.5/README_FILES
relay_domains = $mydestination
relayhost = host.domain.de
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/postfix/CAcert.pem
smtp_tls_cert_file = /etc/postfix/cert.pem
smtp_tls_key_file = /etc/postfix/key.pem
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_recipient_restrictions = reject_unknown_sender_domain, 
reject_non_fqdn_sender, check_client_access hash:/etc/postfix/access, 
  check_sender_access hash:/etc/postfix/access,   check_recipient_access 
hash:/etc/postfix/access,        permit_sasl_authenticated, 
reject_unauth_destination,      permit_mx_backup,       permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = andis.mine.nu
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/CAcert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/cert.pem
smtpd_tls_key_file = /etc/postfix/key.pem
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = $virtual_maps

Habe gerade einen Fehler gefunden...habe immer an eine lokale Adresse 
gesendet, da will Postfix natürlich nicht den Umweg über das Inet gehen 
- klar.
Also Postfix übergeht "nicht mehr" die Einträge in der main.cf, aber es 
kommt nun folgender Fehler:
Ein Logeintrag für eine gesendete Mail aus /var/log/maillog:

Dec 19 17:11:04 milhouse postfix/smtpd[966]: connect from 
unknown[192.168.0.2]
Dec 19 17:11:06 milhouse postfix/smtpd[966]: 6B04937577A: 
client=unknown[192.168.0.2], sasl_method=PLAIN, 
sasl_username=andi at andis.mine.nu
Dec 19 17:11:06 milhouse postfix/cleanup[969]: 6B04937577A: 
message-id=<41C5B541.8060004 at wiebke-hebamme.de>
Dec 19 17:11:06 milhouse postfix/qmgr[880]: 6B04937577A: 
from=<xxx at wiebke-hebamme.de>, size=607, nrcpt=1 (queue active)
Dec 19 17:11:06 milhouse postfix/smtpd[966]: disconnect from 
unknown[192.168.0.2]
Dec 19 17:11:06 milhouse spamd[860]: connection from localhost 
[127.0.0.1] at port 32771
Dec 19 17:11:06 milhouse spamd[860]: info: setuid to nobody succeeded
Dec 19 17:11:06 milhouse spamd[860]: processing message 
<41C5B541.8060004 at wiebke-hebamme.de> for nobody:99.
Dec 19 17:11:06 milhouse spamd[860]: clean message (-2.8/2.0) for 
nobody:99 in 0.2 seconds, 587 bytes.
Dec 19 17:11:06 milhouse spamd[860]: result: . -2 - ALL_TRUSTED 
scantime=0.2,size=587,mid=<41C5B541.8060004 at wiebke-hebamme.de>,autolearn=failed
Dec 19 17:11:06 milhouse postfix/pickup[879]: AFAAD37577C: uid=99 
from=<xxx at wiebke-hebamme.de>
Dec 19 17:11:06 milhouse postfix/cleanup[969]: AFAAD37577C: 
message-id=<41C5B541.8060004 at wiebke-hebamme.de>
Dec 19 17:11:06 milhouse postfix/pipe[970]: 6B04937577A: 
to=<xxx at freenet.de>, relay=spamassassin, delay=0, status=sent 
(milhouse.andis.mine.nu)
Dec 19 17:11:06 milhouse postfix/qmgr[880]: 6B04937577A: removed
Dec 19 17:11:06 milhouse postfix/qmgr[880]: AFAAD37577C: 
from=<xxx at wiebke-hebamme.de>, size=924, nrcpt=1 (queue active)
Dec 19 17:11:07 milhouse postfix/smtpd[978]: connect from 
localhost[127.0.0.1]
Dec 19 17:11:07 milhouse postfix/smtpd[978]: NOQUEUE: reject: RCPT from 
localhost[127.0.0.1]: 554 <xxx at freenet.de>: Relay access denied; from=<
Dec 19 17:11:07 milhouse postfix/smtpd[978]: disconnect from 
localhost[127.0.0.1]
Dec 19 17:11:07 milhouse postfix/smtp[974]: AFAAD37577C: 
to=<xxx at freenet.de>, relay=127.0.0.1[127.0.0.1], delay=1, status=bounced 
(host 127.0.0
Dec 19 17:11:07 milhouse postfix/cleanup[969]: D6E5937577A: 
message-id=<20041219161107.D6E5937577A at milhouse.andis.mine.nu>
Dec 19 17:11:07 milhouse postfix/qmgr[880]: D6E5937577A: from=<>, 
size=2856, nrcpt=1 (queue active)
Dec 19 17:11:07 milhouse postfix/qmgr[880]: AFAAD37577C: removed
Dec 19 17:11:08 milhouse postfix/smtp[980]: warning: SASL authentication 
failure: No worthy mechs found
Dec 19 17:11:08 milhouse postfix/smtp[980]: D6E5937577A: 
to=<xxx at wiebke-hebamme.de>, relay=host.domain.de[12.34.56.78], delay=1, 
status=defer

Also die letzten beiden Zeilen:
Dec 19 17:11:08 milhouse postfix/smtp[980]: warning: SASL authentication 
failure: No worthy mechs found
Dec 19 17:11:08 milhouse postfix/smtp[980]: D6E5937577A: 
to=<xxx at wiebke-hebamme.de>, relay=host.domain.de[12.34.56.78], delay=1, 
status=defer

An dem host.domain.de kommt in den Logs nichts an, also ist der Fehler 
noch auf meinem Host.
Habe cyrus_sasl-2.1.20 aus den Quellen mit
./configure --enable-plain --enable-login –enable-digest --disable-krb4 
--with-openssl=/usr/local/openssl
compiliert.

Postfix ist übrigens 2.1.5 auf einem Slackware 10.0 System.
Postfix-tls ist auch mit drin und funktioniert einwandfrei bisher.

Normales SASL authentifizieren geht einwandfrei - Inhalt smtpd.conf:
pwckeck_method: auxprop
mech_list: plain login digest-md5

saslfinger -c gibt dies hier aus:

root at milhouse:/etc/rc.d# saslfinger -c
saslfinger - postfix Cyrus sasl configuration Son Dez 19 17:41:31 CET 2004
version: 0.9.8
mode: client-side SMTP AUTH

-- basics --
Postfix: 2.1.5
System:
Welcome to \s \r (\l)

-- smtp is linked to --
         libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x4001c000)

-- active SMTP AUTH and TLS parameters for smtp --
relayhost = host.domain.de
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/postfix/CAcert.pem
smtp_tls_cert_file = /etc/postfix/cert.pem
smtp_tls_key_file = /etc/postfix/key.pem
smtp_use_tls = yes


-- listing of /usr/lib/sasl2 --
insgesamt 3832
drwxr-xr-x   2 root root   4096 2004-12-18 19:35 .
drwxr-xr-x  36 root root  16384 2004-12-18 19:30 ..
-rwxr-xr-x   1 root root    686 2004-12-18 19:24 libanonymous.la
-rwxr-xr-x   1 root root  89709 2004-12-18 19:24 libanonymous.so
-rwxr-xr-x   1 root root  89709 2004-12-18 19:24 libanonymous.so.2
-rwxr-xr-x   1 root root  89709 2004-12-18 19:24 libanonymous.so.2.0.20
-rwxr-xr-x   1 root root    699 2004-12-18 19:30 libcrammd5.la
-rwxr-xr-x   1 root root  93097 2004-12-18 19:30 libcrammd5.so
-rwxr-xr-x   1 root root  93097 2004-12-18 19:30 libcrammd5.so.2
-rwxr-xr-x   1 root root  93097 2004-12-18 19:30 libcrammd5.so.2.0.20
-rwxr-xr-x   1 root root    729 2004-12-18 19:30 libdigestmd5.la
-rwxr-xr-x   1 root root 232131 2004-12-18 19:30 libdigestmd5.so
-rwxr-xr-x   1 root root 232131 2004-12-18 19:30 libdigestmd5.so.2
-rwxr-xr-x   1 root root 232131 2004-12-18 19:30 libdigestmd5.so.2.0.20
-rwxr-xr-x   1 root root    695 2004-12-18 19:30 liblogin.la
-rwxr-xr-x   1 root root  88813 2004-12-18 19:30 liblogin.so
-rwxr-xr-x   1 root root  88813 2004-12-18 19:30 liblogin.so.2
-rwxr-xr-x   1 root root  88813 2004-12-18 19:30 liblogin.so.2.0.20
-rwxr-xr-x   1 root root    684 2004-12-18 19:30 libotp.la
-rwxr-xr-x   1 root root 534565 2004-12-18 19:30 libotp.so
-rwxr-xr-x   1 root root 534565 2004-12-18 19:30 libotp.so.2
-rwxr-xr-x   1 root root 534565 2004-12-18 19:30 libotp.so.2.0.20
-rwxr-xr-x   1 root root    695 2004-12-18 19:30 libplain.la
-rwxr-xr-x   1 root root  89139 2004-12-18 19:30 libplain.so
-rwxr-xr-x   1 root root  89139 2004-12-18 19:30 libplain.so.2
-rwxr-xr-x   1 root root  89139 2004-12-18 19:30 libplain.so.2.0.20
-rwxr-xr-x   1 root root    709 2004-12-18 19:30 libsasldb.la
-rwxr-xr-x   1 root root 125491 2004-12-18 19:30 libsasldb.so
-rwxr-xr-x   1 root root 125491 2004-12-18 19:30 libsasldb.so.2
-rwxr-xr-x   1 root root 125491 2004-12-18 19:30 libsasldb.so.2.0.20
-rw-r--r--   1 root root     57 2004-12-18 19:35 smtpd.conf


-- permissions for /etc/postfix/sasl_passwd --
-rw-r--r--  1 root root 32 2004-12-19 17:34 /etc/postfix/sasl_passwd

-- permissions for /etc/postfix/sasl_passwd.db --
-rw-r--r--  1 root root 12288 2004-12-19 17:34 /etc/postfix/sasl_passwd.db

/etc/postfix/sasl_passwd.db is up to date.

-- mechanisms on host.domain.de --


Nach mechanisms on host.domain.de kommt nix mehr...wo muss ich die 
mechanisms eintragen die benutzt werden sollen?


Hoffe diese Angabe bringen die benötigten Infos.
Danke Gruss Andi







Mehr Informationen über die Mailingliste Postfixbuch-users