• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Postfix Verständnis (smtp - smtpd)

Status
Für weitere Antworten geschlossen.

Markus_G

Newbie
:?: Hallo ich habe da ein Problem mit dem Verständnis von Postfix.

Mein interner mail-Server 192.168.1.254 soll für die Nutzer/Clients wie folgt arbeiten:

über main.cf - interne mails sollen nur über localen mail-Server (192.168.1.254) verteilt werden (smtpd-von Postfix ?). Die mails nach draußen z.B. ...@web.de, ...@restderwerl.(was es so gibt) sollen über meinen Provider 1und1 (smtp.1und1.de) gehen. Ich dachte das geht mit (smpt-von Postfix?)

Nun habe ich folgende Lage. Auf meinem mail-Sever (cyrus für imap und Postfix) kann ich z.B. über kmail, als Nutzer, dort Einstellung smtp als 192.168.1.254 sowohl mails an localuser@meine-local (also meine eingerichteten Nutzer) schicken wie auch an ...@restderwelt.(was es so gibt). Das funktioniert alles soweit. Nur habe ich festgestellt, das die local-mails auch irgend wie über smtp.1und1.de laufen. (Grund: /etc/postfix/main.cf ... relayhost = smtp.1und1.de ?)

Wenn ich an einem anderen Rechner z.B. im kmail als smtp Server 192.168.1.254 eintrage, kann ich keine mails an ...@restderwelt.(was es so gibt) schicken. Mail Server antwortet RELAY ACCESS DENIED. Was mir auch logisch ist, wenn smptd arbeitet. Mails an localuser@meine-local funktioniert. Auch über telnet verhält es sich so.

Was mache ich falsch bei der Einstellung für eine derartige mail-Serverkonfiguration? :shock:
 

oc2pus

Ultimate Guru
# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for.
#
# These domains are routed to the delivery agent specified with the
# local_transport parameter setting. By default, that is the UNIX
# compatible delivery agent that lookups all recipients in /etc/passwd
# and /etc/aliases or their equivalent.
#
# The default is $myhostname + localhost.$mydomain. On a mail domain
# gateway, you should also include $mydomain.
#
# Do not specify the names of virtual domains - those domains are
# specified elsewhere (see VIRTUAL_README).
#
# Do not specify the names of domains that this machine is backup MX
# host for. Specify those names via the relay_domains settings for
# the SMTP server, or use permit_mx_backup if you are lazy (see
# STANDARD_CONFIGURATION_README).
#
# The local machine is always the final destination for mail addressed
# to user@[the.net.work.address] of an interface that the mail system
# receives mail on (see the inet_interfaces parameter).
#
# Specify a list of host or domain names, /file/name or type:table
# patterns, separated by commas and/or whitespace. A /file/name
# pattern is replaced by its contents; a type:table is matched when
# a name matches a lookup key (the right-hand side is ignored).
# Continue long lines by starting the next line with whitespace.
#
# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
#
#mydestination = $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain

mit diesem Parameter bestimmst du was dein postfix als "lokal" betrachtet ...
 
OP
M

Markus_G

Newbie
Hallo,

ich habe die Erweiterungen aus mydestination eingefügt. Das Problem besteht aber immer noch. Ich kann direkt ...@(was es so gibt) nicht versenden. Diese Meldung bekomme ich:

Das Versenden ist fehlgeschlagen:
Mailversand fehlgeschlagen, da die folgende Empfängeradresse vom Server abgelehnt wurde:
...@....de (Meldung des Servers: <...@....de>: Recipient address rejected: Relay access denied)
Die Nachricht verbleibt im Postausgang, bis Sie entweder das Problem beseitigt haben (z. B. falsche Adresse) oder die Nachricht aus dem Postausgang entfernen.
Das folgende Transportprotokoll wurde benutzt:




meine main.cf lautet wie folgt:




#soft_bounce = no
# LOCAL PATHNAME INFORMATION
#
queue_directory = /var/spool/postfix
#
command_directory = /usr/sbin
#
daemon_directory = /usr/lib/postfix
# QUEUE AND PROCESS OWNERSHIP
#
mail_owner = postfix
#
#default_privs = nobody
# INTERNET HOST AND DOMAIN NAMES
#
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
#
#mydomain = domain.tld
# SENDING MAIL
#
# user@that.users.mailhost.
#

#myorigin = $myhostname
#myorigin = $mydomain
# RECEIVING MAIL
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4
#
#mydestination = $myhostname, localhost.$mydomain
#mydestination = $myhostname, localhost.$mydomain $mydomain
#mydestination = $myhostname, localhost.$mydomain, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain
# REJECTING MAIL FOR UNKNOWN LOCAL USERS
#
# local_recipient_maps = (i.e. empty).
#
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =
#
#unknown_local_recipient_reject_code = 550
unknown_local_recipient_reject_code = 450
#
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
#
#mynetworks = 168.100.189.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
#
#relay_domains = $mydestination
#
#relayhost = $mydomain
#relayhost = gateway.my.domain
#relayhost = uucphost
#relayhost = [an.ip.add.ress]
#
#relay_recipient_maps = hash:/etc/postfix/relay_recipients
# INPUT RATE CONTROL
#
#in_flow_delay = 1s
# ADDRESS REWRITING
#
#alias_maps = dbm:/etc/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
#
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
# ADDRESS EXTENSIONS (e.g., user+foo)
#
#recipient_delimiter = +
# DELIVERY TO MAILBOX
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
#
#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail
#
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"
#
#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus
#
#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =
#
#luser_relay = $user@other.host
#luser_relay = $local@other.host
#luser_relay = admin+$local
#
#header_checks = regexp:/etc/postfix/header_checks
#
#fast_flush_domains = $relay_domains
#fast_flush_domains =
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 10
#
debug_peer_level = 2
#
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain
#
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
#
sendmail_path = /usr/sbin/sendmail
#
newaliases_path = /usr/bin/newaliases
#
mailq_path = /usr/bin/mailq
#
setgid_group = maildrop
#
manpage_directory = /usr/share/man
#
sample_directory = /usr/share/doc/packages/postfix/samples
#
readme_directory = /usr/share/doc/packages/postfix/README_FILES
mynetworks = 192.168.1.0/28, 127.0.0.0/8
myhostname = linux-ibl.e-golbs
mydomain = e-golbs
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_maps = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
default_privs = nobody
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
program_directory = /usr/lib/postfix
inet_interfaces = all
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain
defer_transports =
disable_dns_lookups = no
relayhost = smtp.1und1.de
relay_domains = $mydestination
content_filter = vscan:
mailbox_command =
mailbox_transport = cyrus
fallback_transport = cyrus
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10
default_peer_level = 2
myorigin = $myhostname
default_transport = smtp
luser_relay = info@e-golbs.info
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains
smtpd_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 51200000
message_size_limit = 10240000


Ich weiss einfach nicht woran ich schrauben soll. Die local verschickten mails bekomme ich über pop.1und1.de zurück. Besten Dank für die Hilfe.

:shock:
 

oc2pus

Ultimate Guru
myorigin = $myhostname <==

# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites. If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
myorigin = $mydomain
 
OP
M

Markus_G

Newbie
3 :p Hallo,

leider konnte ich mit dem letzten Beitrag nichts anfangen.

Ich habe das Problem von Postfix Verständnis (smtp - smtpd) jetzt erst einmal teilweise gelöst.

Nun weiss ich nur noch nicht wie ich Postfix mitteilen soll, dass die "internen mails" nicht an smtp.1und1.de geleitet werden sollen. Was kann ich da tun? 3 :p
 
Status
Für weitere Antworten geschlossen.
Oben