|
|
postfix + saslauthd
[thread]13275[/thread]
hide all
open all
-

+21 replies
-
User since 2003-08-04
6912
articles
|
Hallo, nach langem hin und her hab ich es endlich irgendwie geschafft, postfix und courir mit mysql und saslauthd zum laufen zu bekommen.
postfix hackt aber noch ein wenig
wenn ich über
testsaslauthd -u foo@domain.ext -p bar -s smtp bekomm ich ein 0: OK "Success.
so, jetzt smtp getestet:
im auth.log steht:
auth failure: [user=foo] [service=smtp] [realm=domain.ext] [mech=pam] [reason=PAM auth error]
realm hat mich stutzen lassen
hab dann mal bei testsaslauth einen falsches passwort probiert, dann bekomm ich
auth failure: [user=foo@domain.ext] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
testsaslauthd setzt also keinen realm (hab es ja auch nicht über argument gesagt)
nur wie schaff ich es nun, dass das auch smtp auth kapiert?
|
|
|
|
|
|
-

+2 replies
-
|
GwenDragon
|
2009-03-25 07:42 |
|
|
|
User since 2005-01-17
5585
articles
|
Hmm, was steht denn in /etc/pam.d/smtp und /etc/postfix/main.cf drin?
Was sagt denn /var/log/auth.log ?
Last edited: 2009-03-25 08:23:29 +01:00
|
Packagebeilage:
Perl-Beispiele können bei Anfängern und Perl-Evangelisten üble Irritationen verursachen und Damian Conway zur Rettung des »Guten Perl-Programmierstils« auf den Plan rufen!
Ich gebe niemals Perl-Code an Psychopathen weiter. Die bekommen von mir BASIC.
Germanistikfreaks und grammatikalisch Zwanghafte verweise ich an Hans weiter.
|
|
|
|
-
User since 2003-08-04
6912
articles
|
2009-03-25T06:42:53
GwenDragonHmm, was steht denn in /etc/pam.d/smtp und /etc/postfix/main.cf drin?
| Code: |
|
cat /etc/pam.d/smtp auth required pam_mysql.so user=postfix passwd=uhu \ host=localhost \ db=postfix \ table=mailbox \ usercolumn=username \ passwdcolumn=password \ crypt=1 account required pam_mysql.so user=postfix passwd=uhu \ host=localhost \ db=postfix \ table=mailbox \ usercolumn=username \ passwdcolumn=password \ crypt=1
|
| Code: |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
cat /etc/postfix/main.cf # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_gid_maps = static:1001 #hier geben wir das Verzeichnis an in dem wir die emails ablegen wollen virtual_mailbox_base = /email virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf virtual_mailbox_limit = 512000000 virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 1001 virtual_transport = virtual virtual_uid_maps = static:1001 smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no #content_filter = amavis:[127.0.0.1]:10024 # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=no smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. myhostname = domain.exe alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = mail.domain.ext,localhost, localhost.locald omain, localhost relayhost = mynetworks = 127.0.0.0/8 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = mail.domain.ext broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, rej ect smtpd_recipient_restrictions = permit_mynetworks, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname, reject_rbl_client list.dsbl.org, reject_rbl_client bl.spamcop.net, reject_rbl_client zen.spamhaus.org, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client whois.rfc-ignorant.org, reject_rbl_client ix.dnsbl.manitu.org, check_policy_service inet:127.0.0.1:60000 smtpd_sasl_security_options = noanonymous
|
auth.log siehe oben
Last edited: 2009-03-25 09:47:42 +01:00
|
|
|
|
|
|
-

+2 replies
-
|
GwenDragon
|
2009-03-25 09:52 |
|
|
|
User since 2005-01-17
5585
articles
|
Und in /etc/postfix/sasl/smtpd.conf?
|
Packagebeilage:
Perl-Beispiele können bei Anfängern und Perl-Evangelisten üble Irritationen verursachen und Damian Conway zur Rettung des »Guten Perl-Programmierstils« auf den Plan rufen!
Ich gebe niemals Perl-Code an Psychopathen weiter. Die bekommen von mir BASIC.
Germanistikfreaks und grammatikalisch Zwanghafte verweise ich an Hans weiter.
|
|
|
|
-
User since 2003-08-04
6912
articles
|
| Code: |
|
pwcheck_method: saslauthd mech_list: PLAIN LOGIN saslauthd_path: /var/run/saslauthd/mux log_level: 3
|
|
|
|
|
|
|
-

+6 replies
-
|
GwenDragon
|
2009-03-25 10:08 |
|
|
|
User since 2005-01-17
5585
articles
|
Ich rätsele auch.
Als Realm wird normalerweise das was in smtpd_sasl_local_domain steht, also mail.domain.ext verwendet.
Wenn du mal den loglevel erhöhst, vielleicht zeigt das Log dann das Problem.
Was sagt denn die Ausgabe von saslfinger?
|
Packagebeilage:
Perl-Beispiele können bei Anfängern und Perl-Evangelisten üble Irritationen verursachen und Damian Conway zur Rettung des »Guten Perl-Programmierstils« auf den Plan rufen!
Ich gebe niemals Perl-Code an Psychopathen weiter. Die bekommen von mir BASIC.
Germanistikfreaks und grammatikalisch Zwanghafte verweise ich an Hans weiter.
|
|
|
|
-

+5 replies
-
User since 2003-08-04
6912
articles
|
2009-03-25T09:08:02
GwenDragonWas sagt denn die Ausgabe von saslfinger?
hab ich nicht? in welchem paket ist das?
werde nachher mal loglevel hochdrehen.
|
|
|
|
|
|
-

+7 replies
-
User since 2003-08-04
6912
articles
|
ich hab jetzt noch weitere tests gemacht:
testsaslauthd -u foo@domain.ext -r domain.ext -p bar -s smtp
liefert mir auch ein 0: OK "Success."
es ist also der falsche username; der realm scheint doch völlig egal.
kann auch -r hutzel sagen, und kann mich mit stimmigen password mit testsaslauthd authentifizieren
|
|
|
|
|
|
-

+2 replies
-
User since 2003-08-04
6912
articles
|
|
ah, man muss saslauthd mit parameter -r starten :D
|
|
|
|
|
|
-
|
guest cry
|
2010-01-23 22:14 |
|
|
|
|
|
|
An dieser Stelle ein ganz fettes DANKE für den Hinweis mit dem -r :)
|
|
|
|
-
User since 2003-08-04
6912
articles
|
um das zu kompletieren, musste auch noch
smtpd_helo_restrictions = ...
permit_sasl_authenticated,
...
in main.cf setzen
|
|
|
|
|
|
View all threads created 2009-03-25.
|