[Postfixbuch-users] Nochmals: OpenRelay-Konfiguration mit Postfix verhindern

Christoph Haas chhaas.stuttgart at gmx.de
Fr Jan 28 11:09:58 CET 2005


Hallo Ralf Hildebrandt,

zunaechst einmal vielen Dank fuer die schnelle Hilfe! Das OpenRelay auf der
Viruswall scheint mit den Eintraegen abgestellt werden zu koennen ... jedoch
koennen dann auch meine internen Mailserver keine Mails mehr relayen :-<< 

Auszug aus /var/log/mail des internen Mailservers:
--- snip ---
Jan 27 10:44:41 mail postfix/smtpd[8508]: 8682287FCD:
client=unknown[172.16.130.1], sasl_method=LOGIN, sasl_username=haasc
Jan 27 10:44:41 mail postfix/qmgr[28022]: 8682287FCD:
from=<christoph.haas at meinedomain.de>, size=1254, nrcpt=1 (queue active)
Jan 27 10:44:42 mail postfix/smtp[8511]: 8682287FCD:
to=<chhaas.stuttgart at gmx.de>,
relay=viruswall.meinedomain.de[xxx.xxx.xxx.xxx], delay=1,
status=bounced (host viruswall.meinedomain.de[xxx.xxx.xxx.xxx] said: 554
<chhaas.stuttgart at gmx.de>: Relay access denied)
Jan 27 10:44:43 mail postfix/lmtp[8514]: D7D2B87FE1:
to=<haasc at meinedomain.de>,
relay=public/lmtp[public/lmtp], delay=1, status=sent (250 2.1.5 Ok)
--- snap ---
# xxx.xxx.xxx.xxx steht fuer die oeffentliche IP-Adresse des Viruswalls


Auszug aus /var/log/mail der Viruswall:
--- snip ---
Jan 27 10:42:43 viruswall postfix/smtpd[10760]: NOQUEUE: reject: RCPT from
unknown[127.0.0.1]: 554 <chhaas.stuttgart at gmx.de>: Relay access denied;
from=<christoph.haas at meinedomain.de> to=<chhaas.stuttgart at gmx.de>
proto=ESMTP
helo=<fw13.meinedomain.de>
--- snap ---
# fw13 ist ein Interface der Firewall

Auf dieser Maschine laeuft ein Trend Micro InterScan Viruswall (ISVW).
Derzeit nimmt  der ISVW auf Port 25 die SMTP-Verbindungen entgegen und
leitet sie dann auf Port 10026 Postfix zu:

Auszug aus /etc/postfix/master.cf:
----------------------------------
#smtp      inet  n       -       n       -       -       smtpd
127.0.0.1:10026 inet    n       -       -       -       -       smtpd -o
content_filter= -o local_recipient_maps= -o myhostname=localhost

Ausgabe von 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_destination_concurrency_limit = 20
default_privs = nobody
defer_transports =
disable_dns_lookups = no
inet_interfaces = all
local_destination_concurrency_limit = 2
local_recipient_maps =
mail_name = UKBW MX-Server
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains = $mydomain
masquerade_exceptions = root
message_size_limit = 30000000
mydestination = $mydomain, $myhostname, localhost.$mydomain, $local_domains
mydomain = meinedomain.de
myhostname = viruswall.meinedomain.de
mynetworks = yyy.yyy.yyy.yyy, zzz.zzz.zzz.zzz, 172.16.130.2, 172.18.1.2
# yyy.yyy.yyy.yyy und zzz.zzz.zzz.zzz stehen fuer oeffentliche IP-Adressen
eines Mail- und eines Webservers mit Mailfunktionalitaet
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relay_domains = meinedomain.de
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
smtp_sasl_auth_enable = no
smtp_tls_loglevel = 0
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = sdbm:/etc/postfix/smtp_scache
smtp_use_tls = no
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_restrictions =
smtpd_helo_required = yes
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination,
reject_unknown_recipient_domain
smtpd_sasl_auth_enable = no
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_tls_ask_ccert = yes
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = sdbm:/etc/postfix/smtpd_scache
smtpd_use_tls = no
strict_rfc821_envelopes = no
tls_daemon_random_source = dev:/dev/urandom
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 450

Einzige Abhilfe um temporaer wieder einen Mailversand zu ermoeglichen, und
dann sofort wieder OpenRelay zu sein, bei "mynetworks" die IP-Adresse von
localhost [127.0.0.1] hinzuzufuegen) ... =:-<<

Wenn die Viruswall gemaess der Anleitung unter
http://sbserv.stahl.bau.tu-bs.de/~hildeb/postfix/postfix_viruswall.shtml so
konfiguriert wird, dass Postfix auf Port 25 die Mails empfaengt, sie dann
per content_filter an ISVW auf Port 10025 weiterleitet, diese dann wiederum
auf Port 10026 die gepruefte Mail wieder an Postfix ohne content_filter
weiterleitet, ist die Viruswall sofort wieder ein OpenRelay, aber die
internen Mailserver duerfen trotzdem nicht relayen!

Dabei will ich doch nur, dass vom Internet nur Mails an meine Domains
"meinedomain.de" und "auchmeinedomain.de" zugelassen werden, die internen
Mailserver jedoch Mails an jede Domain versenden koennen ...

Ich benoetige dringend einen kompententen Rat ... Frustriert und ratlos
Christoph.

-- 
10 GB Mailbox, 100 FreeSMS http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++



Mehr Informationen über die Mailingliste Postfixbuch-users