Postfix - unknown service: smtp/tcp & cannot find your hostname

NacKteOmA

New Member
Huhu ich hoffe mir kannt jemand weiter helfen. Das Wochende schlage ich mich schon mit meinen Mailserver rum der einfach nicht mehr laufen will :(

System: Debian Squeeze (6) mit Froxlor + Courier/Postfix + Amavis (ClamAV & Spamassain's etc)

Courier läuft problemlos, Mails die lokal laufen werden zugestellt und können abgeholt werden (POP/IMAP).

Problem macht die Kommunikation nach außen mit SMTP.

E-Mail Versand - Logs

Code:
postfix/cleanup[9257]: 900ED134638: message-id=<51F571C5.6010602@domain1.de>
postfix/qmgr[31272]: 900ED134638: from=<Info@domain1.de>, size=1100, nrcpt=1 (queue active)
postfix/smtp[9266]: fatal: unknown service: smtp/tcp
amavis[8829]: (08829-01) Passed CLEAN, [78.49.xx.xx] [78.49.xx.xxx] <Info@domain1.de> -> <adresse@web.de>, Message-ID: <51F571C5.6010602@domain1.de>, mail_id: fzdCtk2Y8oBX, Hits: -1, size: 603, queued_as: 900ED134638, 7530 ms
postfix/smtp[9258]: EE564134637: to=<adresse@web.de>, relay=127.0.0.1[127.0.0.1]:10024, delay=7.7, delays=0.18/0.01/0.04/7.5, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=08829-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 900ED134638)
postfix/qmgr[31272]: EE564134637: removed
postfix/qmgr[31272]: warning: private/smtp socket: malformed response
postfix/qmgr[31272]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
postfix/master[31267]: warning: process /usr/lib/postfix/smtp pid 9266 exit status 1
postfix/master[31267]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
postfix/error[9267]: 900ED134638: to=<adresse@web.de>, relay=none, delay=1.2, delays=0.08/1/0/0.08, dsn=4.3.0, status=deferred (unknown mail transport error)

E-Mail Empfang - Logs

Code:
postfix/smtpd[31072]: connect from unknown[89.xx.xx.xx]
postfix/smtpd[31072]: NOQUEUE: reject: RCPT from unknown[89.xx.xx.xx]: 450 4.7.1 Client host rejected: cannot find your hostname, [89.xx.xx.xx]; from=<adresse@domain2.de> to=<info@domain1.de> proto=ESMTP helo=<mail.domain2.de>
postfix/smtpd[31072]: disconnect from unknown[89.xx.xx.xx]

Der Empfang wird immer so abgelehnt, obwohl es korrekt ist. Ich kann mit meinen Server sogar selbst per "resolveip 89.xx.xx.xx" die Domain -> mail.domain2.de auflösen und umgekehrt zeigt es auch auf die IP.

Es gibt drei mögliche Auslöser für das Problem:
- Defektes Filesystem vor ca. 1 Woche bei dem zwei Inodes behoben wurden (Grund: HDD defekte Sektoren).
- Installation von "mono-complete" Paket per apt-get vom Wheezy Repository, was aber nicht problematisch sein sollte, da es keine Abhängigkeiten zu installierten Paketen gab und auch keine anderen Pakete geupdatet wurden worauf ich auch extra achtete um Versionskonflikte zu vermeiden.
-Irgendwelche Datein verschwunden da nach dem HDD Problem die Festplatte(n) getauscht wurden mitsamt RaidMigration (Raid1 -> Raid10) und RaidExpansion (Vergrößerung des Raids). Dieses dauert ja etwas länger und weiß nicht wie gut der Raid Controller (Adaptec) sowas auf einem Produktivserver verkraftet in bezug auf permanente Daten veränderungen.

Aufgetreten ist es plötzlich nachdem Reboot des Server nachdem "mono" installieren. Durch das erneute Laden der Programme können aber auch die anderen Sachen eventuell ne Auswirkung haben (irgendwelche Datein sind korrupt o.ä.)

Geprüft habe ich folgendes:
- DNS auf dem Server funktioniert allgemein (Ping mit Domains/ Resolveip etc.), aber scheinbar nicht beim Postfix (siehe "cannot find your hostname").
- Nameserver sind in /etc/resolv.conf und /var/spool/spool/postfix/etc/resolv.conf identisch und funktionieren, auch mit DNS von Google getestet.
- Er kennt den "smtp" Service nicht - in /etc/services und /var/spool/spool/postfix/etc/services ist es aber mit TCP auf Port25 bei beiden vorhanden. Auch das hinzufügen z.B. nochmal extra mit UDP brachte auch keine Verbesserung.
- Rückspielen von Backups (1 Tag vor Ausfall, 1 Monate vor Ausfall und 3 Monate vor Ausfall) brachten auch ebenfalls immer wieder den selben Fehler beim Postfix.
- Amavis und die ganze AntiSpam Klamotten sind auch nicht der Fehler, ohne Verweis auf Amavis verhält sich der Postfix ebenfalls so.

Services
Code:
root@server1:/etc/postfix# ls -la /etc/services
-rw-r--r-- 1 root root 19666 Jan 19  2011 /etc/services
root@server1:/etc/postfix# ls -la /var/spool/postfix/etc/services
-rw-r--r-- 1 root root 19666 Jul 28 18:09 /var/spool/postfix/etc/services

root@server1:/etc/postfix# cat /etc/services | grep 'smtp'
smtp            25/tcp          mail
ssmtp           465/tcp         smtps           # SMTP over SSL
root@server1:/etc/postfix# cat /var/spool/postfix/etc/services | grep 'smtp'
smtp            25/tcp          mail
ssmtp           465/tcp         smtps           # SMTP over SSL

main.cf
Code:
## General Postfix configuration
# should be the default domain from your provider eg. "server100.provider.tld"
mydomain = server1.domain1.de

# should be different from $mydomain eg. "mail.$mydomain"
myhostname = mail.domain1.de

mydestination = $myhostname,
        $mydomain,
        localhost.$myhostname,
        localhost.$mydomain,
        localhost
mynetworks = 127.0.0.0/8, xx.xx.xx.xx (meine IP)
inet_interfaces = all
append_dot_mydomain = no
biff = no

# Postfix performance settings
default_destination_concurrency_limit = 20
local_destination_concurrency_limit = 2

# SMTPD Settings
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_helo_required = yes
smtpd_helo_restrictions =
        permit_sasl_authenticated,
        permit_mynetworks,
        reject_unauth_destination,
        reject_non_fqdn_sender,
        reject_non_fqdn_recipient,
        reject_unknown_recipient_domain,
        reject_non_fqdn_hostname,
        reject_invalid_hostname,
        reject_rbl_client sbl.spamhaus.org,
        reject_rbl_client ix.dnsbl.manitu.net
        reject_rbl_client bl.spamcop.net
        reject_unauth_pipelining
smtpd_recipient_restrictions = permit_mynetworks,
        permit_sasl_authenticated,
        reject_unauth_destination,
        reject_unauth_pipelining,
        reject_non_fqdn_recipient
smtpd_sender_restrictions = permit_mynetworks,
        reject_sender_login_mismatch,
        permit_sasl_authenticated,
        reject_unknown_helo_hostname,
        reject_unknown_recipient_domain,
        reject_unknown_sender_domain
        reject_invalid_hostname,
        reject_non_fqdn_hostname,
        reject_non_fqdn_sender,
        reject_non_fqdn_recipient,
        reject_unauth_pipelining,
        reject_unauth_destination,
#       reject_rbl_client zombie.dnsbl.sorbs.net,
#       reject_rbl_client relays.ordb.org,
#       reject_rbl_client opm.blitzed.org,
#       reject_rbl_client list.dsbl.org,
        reject_rbl_client zen.spamhaus.org,
#       reject_rbl_client blackholes.easynet.nl,
#       reject_rbl_client unconfirmed.dsbl.org,
#       reject_rbl_client dynablock.njabl.org,
#       reject_rbl_client dialup.blacklist.jippg.org,
        reject_rbl_client cbl.abuseat.org,
smtpd_client_restrictions = permit_mynetworks,
        permit_sasl_authenticated,
        reject_unknown_client_hostname
# Maximum size of Message in bytes (50MB)
message_size_limit = 52428800

## SASL Auth Settings
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes

# Virtual delivery settings
virtual_mailbox_base = /var/customers/mail/
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000

# Local delivery settings
local_transport = local
alias_maps = $alias_database

# Default Mailbox size, is set to 0 which means unlimited!
mailbox_size_limit = 0
virtual_mailbox_limit = 0

### TLS settings
###
## TLS for outgoing mails from the server to another server
#smtp_tls_security_level = may
#smtp_tls_note_starttls_offer = yes
## TLS for email client
#smtpd_tls_auth_only = no
#smtp_use_tls = yes
#smtpd_use_tls = yes
#smtpd_tls_security_level = may
#smtpd_tls_cert_file = /etc/ssl/server/mail.nackteoma-server.de.crt
#smtpd_tls_key_file = /etc/ssl/server/mail.nackteoma-server.de.key
#smtpd_tls_key_file = $smtpd_tls_cert_file
#  SSLCACertificateFile /etc/ssl/server/ca/ca.pem
#  SSLCertificateChainFile /etc/ssl/server/ca/sub.class1.server.ca.pem
#smtpd_tls_CAfile = /etc/ssl/server/ca/ca.pem
#/etc/ssl/certs/ca-certificates.crt
#smtpd_tls_loglevel = 1
#smtpd_tls_received_header = yes

debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5

#
# ATTENTION - this is not the full postfix-main.cf file
#
# it only provides additional configuration-entries!
#

#
# look for the follow statement
#
#smtpd_recipient_restrictions = permit_mynetworks,
#       permit_sasl_authenticated,
#       reject_unauth_destination,
#       reject_unauth_pipelining,
#       reject_non_fqdn_recipient

#
# and extend it with the following line
# so it looks like this
#
#smtpd_recipient_restrictions = permit_mynetworks,
#        permit_sasl_authenticated,
#        reject_unauth_destination,
#        reject_unauth_pipelining,
#        reject_non_fqdn_recipient,
#        check_recipient_mx_access cidr:/etc/postfix/mx_access

#spamassassin_destination_recipient_limit = 1

content_filter=smtp-amavis:[127.0.0.1]:10024

master.cf
Code:
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd

#submission inet n       -       -       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       -       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
         -o content_filter=
         -o receive_override_options=no_header_body_checks
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
#spamassassin unix - n n - - pipe
#       -o content_filter=spamassassin:dummy
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
        -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
#  mailbox_transport = lmtp:inet:localhost
#  virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#

spamassassin
          unix  -       n       n       -       -       pipe
            user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix  -       n       n       -       2       pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

smtp-amavis     unix    -       -       -       -       2       smtp
        -o smtp_data_done_timeout=1200
        -o smtp_send_xforward_command=yes
        -o disable_dns_lookups=yes
        -o max_use=20

127.0.0.1:10025 inet    n       -       -       -       -       smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpd_restriction_classes=
        -o smtpd_delay_reject=no

Hat jemand ne Idee :confused: Ich bin mittlerweile einfach ratlos...
 
Last edited by a moderator:
Back
Top