URL: https://www.overclockers.at/linux/postfix_und_smtp_auth_212163/page_1 - zur Vollversion wechseln!
Hallo,
nachdem ich auch von draußen über meinen Mailserver versenden möchte ohne einen ssh Tunnel aufzubauen möchte ich mit SMTP Auth sicher gehen, dass dieser nicht abused wird.
Ich hab mich an diesem Howto orientiert, jedoch bekomm ichs einfach nicht zum laufen:
Code:220 mein.server ESMTP Mailserver ehlo domain.at 250-mail.mein.server 250-PIPELINING 250-SIZE 52425373 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN auth plain base64-passwort 235 2.7.0 Authentication successful mail from:<ich@mein.server> 250 2.1.0 Ok rcpt to:<ich@anderer.server> 554 5.7.1 <ich@anderer.server>: Relay access denied
Code:smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no myhostname = mail.mein.server mydomain = mein.server alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = $myhostname, localhost.$mydomain, $mydomain smtpd_banner = $myhostname ESMTP Mailserver message_size_limit = 52425373 smtpd_helo_required = yes smtpd_helo_restrictions = reject_invalid_hostname smtpd_recipient_restricions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_recipient_domain smtpd_sender_restricions = reject_unknown_address smtpd_client_restrictions = reject_invalid_hostname strict_rfc821_envelopes = yes home_mailbox = mail/ #mailbox_command = /var/mail/$USER/inbox mail_spool_directory = /var/mail/ #TLS smtpd_tls_cert_file = /etc/postfix/mail.cert smtpd_tls_key_file = /etc/postfix/mail.key smtpd_use_tls = yes smtpd_enforce_tls = no smtpd_tls_auth_only = no #SASL smtpd_sasl_auth_enable = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = mein.server smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd relayhost = relay.ander.server mynetworks = 127.0.0.0/8 192.168.1.0/24 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all
Code:broken_sasl_auth_clients = no cyrus_sasl_config_path = lmtp_sasl_auth_cache_name = lmtp_sasl_auth_cache_time = 90d lmtp_sasl_auth_enable = no lmtp_sasl_auth_soft_bounce = yes lmtp_sasl_mechanism_filter = lmtp_sasl_password_maps = lmtp_sasl_path = lmtp_sasl_security_options = noplaintext, noanonymous lmtp_sasl_tls_security_options = $lmtp_sasl_security_options lmtp_sasl_tls_verified_security_options = $lmtp_sasl_tls_security_options lmtp_sasl_type = cyrus proxy_write_maps = $smtp_sasl_auth_cache_name $lmtp_sasl_auth_cache_name send_cyrus_sasl_authzid = no smtp_sasl_auth_cache_name = smtp_sasl_auth_cache_time = 90d smtp_sasl_auth_enable = no smtp_sasl_auth_soft_bounce = yes smtp_sasl_mechanism_filter = smtp_sasl_password_maps = smtp_sasl_path = smtp_sasl_security_options = noplaintext, noanonymous smtp_sasl_tls_security_options = $smtp_sasl_security_options smtp_sasl_tls_verified_security_options = $smtp_sasl_tls_security_options smtp_sasl_type = cyrus smtpd_sasl_auth_enable = no smtpd_sasl_authenticated_header = no smtpd_sasl_exceptions_networks = smtpd_sasl_local_domain = smtpd_sasl_path = smtpd smtpd_sasl_security_options = noanonymous smtpd_sasl_tls_security_options = $smtpd_sasl_security_options smtpd_sasl_type = cyrus
An ziemlich genau dem gleichen Problem feile ich gerade auch, nur dass ich nicht von draußen sondern von PHP weg schicken will.
Dieses Sendmail ist ein konfigurativer Alptraum
ich bin zwar kein Linux Expert aber bei "posconf -m | egrep sasl" steht:
34: smtpd_sasl_type = cyrus
des deutet darauf hin das bei dovecot oder main.cf ein fehler drin ist.
Mir kommt der Eintrag in zeile 41 in der main.cf falsch vor:
41: smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
Da du, meines verständnis nach ,den Verweis auf die Passwortdatenbank in der dovecot.conf vornehmen musst.
Wie des jetzt genau funktioniert weis ich selber nicht sry
edit:
hab jetzt des Howto gefunden wo die Konfiguration von dovecot beschrieben wird:
link
hoffe du kannst damit was anfangen
Ist dein Dovecot SASL Provider denn sicherrichtig konfiguriert (wogegen willst du authen? PAM? Passdb? Ganz was anderes?)? Was sagen die Logfiles (postfix und dovecot)?
Ich hab die Postfix Konfigurationsgrammatik jetzt nicht so gut im Kopf, aber ich wuerde an deiner Stelle auch mal die Kommata aus dem Wert fuer smtpd_recipient_restricions killen.
@Jediknight: smtp_sasl_password_maps - "smtp" (nicht smtpd") am Anfang der Direktive bedeutet, dass es sich dabei um eine fuer den Postfix SMTP Client, nicht Server, handelt. Das sollte schon passen, wenn es vielleicht einen Smarthost gibt, ueber den die Postfix-Instanz ggf. selbst relayen soll.
@Obermotz: Kann ich bestaetigen. Viel Glueck/Vergnuegen!
@COLOSSUS ohh thx hab des in der eile überlesen
laut Offizeller doku müssten die komma in smtpd_recipient_restrictions passen.
link
des einzige was mir jetzt aufgefallen ist, weils da Colossus fett hervorgehoben hat, ist das in:
smtpd_recipient_restrictions (das "t" fehlt)
ein Fehler ist der auch in der geposteten main.cf drinnen ist.
Zitat von Jediknightsmtpd_recipient_restrictions (das "t" fehlt)
Zitat von COLOSSUSTja, das ist natuerlich ein Argument!(Ich bin mir sicher, dass Postfix dich im Logfile auf unbekannte/falsche Direktiven in seiner Konfiguration hinweist.)
Code:fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025