PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : lokaler mailserver, probleme mit postfix?



bernd_h_schulz
07.07.04, 22:32
hallo zusammen,

brauche mal eure hilfe, stecke hier einfach fest.
möchte ein einem kleinen netzwerk einen mailserver einrichten. dieser soll nur für den internen mailverkehr zuständig sein.

rechner ip rechnername hostname
------------------------------------------------------------------
client1 192.168.111.120 linuxdell altmarkweb

client2 192.168.111.110 chef altmarkweb

mailserver 192.168.111.150 linuxmailserver altmarkweb

es läuft suse9 webedition, postfix, pop3 und auch imap
auf allen rechnern gibt es die gleichen user und passwörter
unter kmail habe ich z.bsp. eine mail-adresse bernd@192.168.111.150 eingerichtet und verschicke eine mail an christoph@192.168.111.150

in /var/spool/mail/... kommt nichts an, unter mailq werden alte nicht zustellbare mails angezeigt.
in /var/log/mail steht:

Jul 7 18:44:52 linuxmailserver postfix/smtpd[2596]: connect from linuxdell[192.168.111.120]
Jul 7 18:44:52 linuxmailserver postfix/smtpd[2596]: 65A42ACA8: client=linuxdell[192.168.111.120]
Jul 7 18:44:52 linuxmailserver postfix/cleanup[2598]: 65A42ACA8: message-id=<200407071838.31358.bernd@192.168.111.150>
Jul 7 18:44:52 linuxmailserver postfix/qmgr[2412]: 65A42ACA8: from=<bernd@192.168.111.150>, size=556, nrcpt=1 (queue active)
Jul 7 18:44:52 linuxmailserver postfix/smtpd[2596]: disconnect from linuxdell[192.168.111.120]
Jul 7 18:44:52 linuxmailserver postfix/smtpd[2596]: connect from linuxmailserver.altmarkweb[192.168.111.150]
Jul 7 18:44:52 linuxmailserver postfix/smtp[2600]: warning: host 192.168.111.150[192.168.111.150] greeted me with my own hostname linuxmailserver.altmarkweb
Jul 7 18:44:52 linuxmailserver postfix/smtp[2600]: warning: host 192.168.111.150[192.168.111.150] replied to HELO/EHLO with my own hostname linuxmailserver.altmarkweb
Jul 7 18:44:52 linuxmailserver postfix/smtp[2600]: 65A42ACA8: to=<christoph@192.168.111.150>, relay=192.168.111.150[192.168.111.150], delay=0, status=bounced (mail for 192.168.111.150 loops back to myself)
Jul 7 18:44:52 linuxmailserver postfix/smtpd[2596]: lost connection after EHLO from linuxmailserver.altmarkweb[192.168.111.150]
Jul 7 18:44:52 linuxmailserver postfix/smtpd[2596]: disconnect from linuxmailserver.altmarkweb[192.168.111.150]
Jul 7 18:44:52 linuxmailserver postfix/cleanup[2598]: B137FACAA: message-id=<20040707164452.B137FACAA@linuxmailserver.altmarkwe b>
Jul 7 18:44:52 linuxmailserver postfix/qmgr[2412]: B137FACAA: from=<>, size=2264, nrcpt=1 (queue active)
Jul 7 18:44:52 linuxmailserver postfix/smtpd[2596]: connect from linuxmailserver.altmarkweb[192.168.111.150]
Jul 7 18:44:52 linuxmailserver postfix/smtp[2600]: warning: host 192.168.111.150[192.168.111.150] greeted me with my own hostname linuxmailserver.altmarkweb
Jul 7 18:44:52 linuxmailserver postfix/smtp[2600]: warning: host 192.168.111.150[192.168.111.150] replied to HELO/EHLO with my own hostname linuxmailserver.altmarkweb
Jul 7 18:44:52 linuxmailserver postfix/smtp[2600]: B137FACAA: to=<bernd@192.168.111.150>, relay=192.168.111.150[192.168.111.150], delay=0, status=bounced (mail for 192.168.111.150 loops back to myself)
Jul 7 18:44:52 linuxmailserver postfix/smtpd[2596]: lost connection after EHLO from linuxmailserver.altmarkweb[192.168.111.150]
Jul 7 18:44:52 linuxmailserver postfix/smtpd[2596]: disconnect from linuxmailserver.altmarkweb[192.168.111.150]

die /etc/postfix/main.cf sieht wie folgt aus:
################################################## ################################################
# The following parameters are used when installing a new Postfix version.
#
# sendmail_path: The full pathname of the Postfix sendmail command.
# This is the Sendmail-compatible mail posting interface.
#
sendmail_path = /usr/sbin/sendmail

# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
#
newaliases_path = /usr/bin/newaliases

# mailq_path: The full pathname of the Postfix mailq command. This
# is the Sendmail-compatible mail queue listing command.
#
mailq_path = /usr/bin/mailq

# setgid_group: The group for mail submission and queue management
# commands. This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
#
setgid_group = maildrop

# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory = /usr/share/man

# sample_directory: The location of the Postfix sample configuration files.
#
sample_directory = /usr/share/doc/packages/postfix/samples

# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/share/doc/packages/postfix/README_FILES
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
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = linuxmailserver.altmarkweb
mynetworks = 192.168.111.0/24, 127.0.0.0/8
program_directory = /usr/lib/postfix
inet_interfaces = all
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain, $mydomain
defer_transports =
disable_dns_lookups = yes
relayhost =
content_filter =
mailbox_command =
mailbox_transport =
smtp_bind_address = 192.168.111.150
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
#1smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_recipent_restrictions =
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
################################################## ################################################## ###

die master.cf sieht wie folgt aus:

################################################## ################################################## ###
smtp inetn-n--smtpd
#smtps inetn-n--smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submissioninetn-n--smtpd
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inetn-n--qmqpd
pickup fifon-n601pickup
cleanup unixn-n-0cleanup
qmgr fifon-n3001qmgr
#qmgr fifon-n3001nqmgr
#tlsmgr fifo - - n 300 1 tlsmgr
rewrite unix--n--trivial-rewrite
bounce unix--n-0bounce
defer unix--n-0bounce
flush unixn-n1000?0flush
proxymap unix--n--proxymap
smtp unix--n--smtp
relay unix--n--smtp
#-o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unixn-n--showq
error unix--n--error
local unix-nn--local
virtual unix-nn--virtual
lmtp unix--n--lmtp
#localhost:10025 inetn-n--smtpd -o content_filter=
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix-nn--pipe
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix-nn--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}
################################################## ################################################## #####

wo bleiben die verschickten mails?

Gruß
Bernd

jean_luc_picard
09.07.04, 09:16
Ich kann Dir zum Konfigurieren nur ein HowTo empfehlen...

www.linux-tin.org

Im Download-Bereich findest Du eine Anleitung, dort wird zwar auch beschrieben, wie man einen Mailserver für externe Mails einrichtet, aber das kann man ja einfach weglassen ;)

Gruß, Picard

bernd_h_schulz
09.07.04, 11:23
nun klappt es, habe die main.cf wie folgt geändert:
myhostname = linuxmailserver
mydomain = altmarkweb
inet_interfaces = all
mydestination = localhost, localhost.$mydomain, $myhostname, $myhostname.$mydomain

die mail werden verschickt und landen beim server in dem ordner /var/spool/mail/user...

Gruß
Bernd