postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Postfix, QMail, Sendmail, Dovecot, Cyrus, Courier, Anti-Spam
wwd1
Posts: 6
Joined: 2006-09-09 11:09
Location: Bonn
 

postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by wwd1 »

Hallo,

auf die Gefahr hin, dass das hier längst geklärt wurde, ich es aber nicht gefunden habe:

Ich habe postfix mit smtp_aut mit mehreren Domains auf suse10.1 laufen. Geht alles. Nur wenn ich Email für diese localen Domains einliefere, werde ich auch nach dem Passwort gefragt...

Frage:
Wie konfiguriere ich postfix, dass er smtp_auth nur für relay-Funktion verwendet, nicht aber für Domains, die auf dem lokalen Rechner liegen? Sonst kann mir kann ja keiner ne Mail schicken ...

Kurze Erwähnung der Konfigurationsanweisung sollte reichen.

Grüße und Danke
Andreas
adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by adjustman »

postconf -n bitte und die master.cf OHNE Kommentare
wwd1
Posts: 6
Joined: 2006-09-09 11:09
Location: Bonn
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by wwd1 »

postconf -n bitte und die master.cf OHNE Kommentare
Rechner steht direkt im Internet und soll selbständig Emails zustellen. Also nichts mit Smarthost oder so ....

Es gibt noch virtualtables von confixx, die in der main.cf aufgeführt sind, hier aber nicht erscheinen....(?)

Tausend Dank nochmal fürs reinschauen

Code: Select all

router:~ # postconf -n
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter =
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_privs = nobody
defer_transports =
disable_dns_lookups = no
html_directory = /usr/share/doc/packages/postfix/html
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = /usr/bin/procmail
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $myhostname, localhost.$mydomain
myhostname = localhost
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = hash:/etc/postfix/access
strict_rfc821_envelopes = no
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550

master.cf

Code: Select all

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
#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       nqmgr
#tlsmgr   fifo  -       -       n       300     1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
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


cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/usr/lib/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
vscan     unix  -       n       n       -       10       pipe
  user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
procmail  unix  -       n       n       -       -       pipe
  flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
relay     unix  -       -       n       -       -       smtp
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
anvil     unix  -       -       n       -       1       anvil
adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by adjustman »

wwd1 wrote:Es gibt noch virtualtables von confixx, die in der main.cf aufgeführt sind, hier aber nicht erscheinen....(?)
das ist nicht gut. Zeig mal den Abschnitt der main.cf.
Welche Version von Postfix? postconf mail_version?
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by Roger Wilco »

wwd1 wrote:auf die Gefahr hin, dass das hier längst geklärt wurde
Nicht nur hier, auch in der Dokumentation von Postfix. ;)
wwd1 wrote:Geht alles. Nur wenn ich Email für diese localen Domains einliefere, werde ich auch nach dem Passwort gefragt...
mydestination und virtual_*_domains sind deine Freunde.
adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by adjustman »

wwd1 wrote:

Code: Select all

mydestination = $myhostname, localhost.$mydomain
myhostname = localhost
Siehst du das? FQDN fehlt
Und $mynetworks
wwd1
Posts: 6
Joined: 2006-09-09 11:09
Location: Bonn
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by wwd1 »

Hallo,

danke für die promten Antworten.

1. virtualtables von confixx: Sie erscheinen nicht bei der Ausgabe von postconf -n, trotzdem werden diese aliases und domains korrekt bearbeitet.

2. Es geht darum, das NIEMAND, egal von wo, diesen Mailserver zum Relayen verwenden darf,
aber JEDER alles darf, sofern er sich mit smtp-auth authentifiziert.
Nur mail für locale Domains zustellen, soll natürlich ohne passwort gehen.
Wenn ich smtp-auth abschalte, arbeitet er als offener relay.

mydestinatin : ausschließlich localhost, alles andere ist Internet. Es gibt kein privates Netz.

myhostname : natürlich FQDN, hatte ich für den Post hier auf localhost gesetzt. Daran kann es aber nicht liegen

Die konfigurations-Dateien habe ich von einem Rootserver von 1und1 kopiert, den die mir unangekündigt abgeschaltet haben. Jetzt versuche ich es krampfhaft neu aufzusetzen, mit SuSE10.1 und anderen IPs.
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by Roger Wilco »

wwd1 wrote:mydestinatin : ausschließlich localhost, alles andere ist Internet. Es gibt kein privates Netz.
Lies bitte nochmals die Dokumentation zu dieser Option und überdenke die zitierte Aussage.
Im ersten Post hast du bemängelt, dass auch für lokale Domains das Einliefern ohne Authentifizierung abgelehnt wird...
wwd1
Posts: 6
Joined: 2006-09-09 11:09
Location: Bonn
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by wwd1 »

es geht darum, dass smtp-auth nur dann nach den Zugangsdaten fragen soll, wenn eine email für eine nicht local betreute Domain eingeliefert werden soll.

Ansonsten ist der Mailserfer funktionierend konfiguriert, stellt also mails auch local zu, wenn domains local gehostet sind.

mydestination zu verändern, hat nichts gebracht und würde im übrigen auch von der Konfiguration abweichen, welche ja auf dem alten server funktioniert hat
wwd1
Posts: 6
Joined: 2006-09-09 11:09
Location: Bonn
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by wwd1 »

Ich hab dann mal sendmail installiert, das funzt jetzt problemlos ...
wwd1
Posts: 6
Joined: 2006-09-09 11:09
Location: Bonn
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by wwd1 »

Danke nochmal für die Hinweise, in die Doku zu schauen
adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: postfix - smtp_auth - aber nur für relay! Wie config für locale Zustellung

Post by adjustman »

wwd1 wrote:Ich hab dann mal sendmail installiert, das funzt jetzt problemlos ...
wie jetzt? Kein Postfix mehr?