PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : virtusertable geht nicht



mc_one_eye
11.12.01, 08:01
hallo,

ich habe folgendes problem: habe einen lokalen mailserver 'server4.intranet.de' der von WINNT clients die mail einsammelt und alle halbe stunde per wählverbindung an smtp.mailserverinternet.de verschickt, bzw dort die mails vom provider abholt. soweit so gut, aber leider werden alle mails immer an den provider geschickt, auch die lokalen benutzer 'benutzer@mailserverinternet.de' obwohl die dch eigentlich nicht erst ins internet bräuchten. also habe ich eine virtusertable eingerichtet mit 'benutzer@mailserverinternet.de benutzer'. leider klappts irgendwie nicht so richtig. lediglich wenn ich als root angemeldet an dem server eine mail an 'benutzer' schicke wird diese ins lokale postfach gestellt. wenn ich an 'benutzer@mailserverinternet.de' schicke kommt sie in diel mailqueue und wird extern verschickt. ebenso wird alles was die windowsclients an meinen mailserver schicken ausschließlich ins inernet gequeut. mache ich einen denkfehler? wofür steht die virtusertable genau. überall steht, sie wäre für eine empfängerumsetzung. welche empfänger? die mails, die ich per fetchmail vom provider abhole, oder auch die von den windowsclients eingehenden mail?
hier meine sendmail.mc die ich per m4 umgewandelt habe. sonst funktioniert alles..
(ich könnte in den sendmail.mc auch noch Cw localhost mailserverinternet.de einbauen, hatte ich schon, aber dann bleibt alles lokal und da ich auch aussenstellen habe, die die mails direkt vom provider abholen, kann ich das nicht benutzen, denn sonst könnte ich den aussenstellen nichts senden)

weiß jemand rat? vielen dank !




dnl Copyright (c) 1997 S.u.S.E. GmbH Fuerth, Germany.
dnl Author: Florian La Roche <florian@suse.de>
dnl
dnl
dnl "dnl" starts a comment until the next newline charcter
dnl putting words into `'-pairs disables macro expansion
dnl
include(`/usr/share/sendmail/m4/cf.m4')
VERSIONID(`linux setup for SuSE (RZ/MZ-Online)')dnl
OSTYPE(`linux')dnl
dnl
dnl put some statistics about email into this file (man mailstats)
dnl
define(`STATUS_FILE', `/etc/mail/sendmail.st')dnl
dnl
dnl use this user id if we do not use some specific local user
dnl (e.g. for delivering error messages)
dnl
define(`confDEF_USER_ID', `daemon:daemon')dnl
dnl
dnl we use procmail for all local mail delivery
dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
dnl
dnl store emails in this dir before they are given to the next host
dnl
define(`QUEUE_DIR', `/var/spool/mqueue')dnl
dnl
dnl enable this to send all error messages also to this address
dnl
define(`confCOPY_ERRORS_TO', `Postmaster')dnl
dnl
dnl do not send MIME error messages
dnl
dnl define(`confMIME_FORMAT_ERRORS', `False')dnl
dnl
dnl the default max message size for UUCP is only 100k and too small...
dnl
dnl define(`UUCP_MAILER_MAX', `2000000')dnl
dnl
dnl if you have a modem and you use dial on demand, specify the time
dnl until you have a working connection. sendmail will then retry to
dnl establish a connection.
dnl
dnl define(`confDIAL_DELAY', `10s')dnl
dnl
dnl timeout before a warning message is sent to the sender telling them
dnl that the message has been deferred
dnl
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl
dnl timeout before a message is returned as undeliverable
dnl
dnl define(`confTO_QUEUERETURN', `3d')dnl
dnl
dnl we will accept incoming email until a load of 18 and we will try
dnl to deliver email until the load hits 12
dnl
define(`confQUEUE_LA', `12')dnl
define(`confREFUSE_LA', `18')dnl
dnl
dnl you probably always want to disable the SMTP expn and verfy commands
dnl with "noexpn" and "noverfy".
dnl if you have lots of users, you might want to add "restrictmailq" and
dnl "restrictrunq", but normally they can be left out.
dnl "authwarnings" warns about all people that e.g. use "sendmail -bs"
dnl and adds X-Authentication-Warning: headers. pine users might want to
dnl disable this.
dnl "noreceipts" ignores all Return-Receipt-To: headers.
dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn')dnl
dnl
dnl create the dir /var/mqueue/.hoststat and sendmail will write
dnl status information about the destination hosts into it. this should
dnl speed up email delivery on big email servers.
dnl
dnl define(`confHOST_STATUS_DIRECTORY', `.hoststat')dnl
dnl
dnl enable the userdb lookup (userdb is not recommended, please look at
dnl genericstable/virtusertable instead. userdb was never really intended
dnl for setting the sender email name. so please don't use it for that.)
dnl
dnl define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
dnl
dnl these users are allowed to modify the email sender address. or
dnl you can enable reading this list from an external file.
dnl
define(`confTRUSTED_USERS', `mdom wwwrun')dnl
dnl
dnl define(`confCT_FILE', `/etc/mail/sendmail.ct')dnl
dnl FEATURE(`use_ct_file')dnl
dnl
dnl you can specify a smarthost either here or in /etc/mail/mailertable
dnl
define(`SMART_HOST', `smtp:smtp.mailserverinternet.de')dnl
dnl define(`SMART_HOST', `uucp-dom:otheruucphost')dnl
dnl define(`MAIL_HUB', `smtp:host.your.domain')dnl
dnl define(`LOCAL_RELAY', `local:server4.intranet.de')dnl
dnl
dnl enable the following two lines, if you have a dialup connection
dnl and want to queue all email until "sendmail -q" is started.
dnl
define(`confCON_EXPENSIVE', `True')dnl
define(`SMTP_MAILER_FLAGS',`e')dnl
dnl
dnl sendmail will give all hostnames to your DNS server and replace the
dnl names with the FQDN ones. as nearly all email-programs use the full
dnl hostname and you will probably also just use full hostnames as
dnl destination addresses, you could disable this "feature".
dnl this is also used for dial-on-demand connections where we don't want
dnl to trigger a connection just for a DNS query.
dnl
FEATURE(`nodns')dnl
FEATURE(`nocanonify')dnl
dnl
dnl if you really have to disable DNS lookups and only want to use /etc/hosts,
dnl you have to create the file /etc/service.switch with the two lines
dnl "hosts files" and "aliases files" in it.
dnl please configure a real DNS server and do not use this mis-feature.
dnl you might instead also use /etc/mail/mailertable with IP addresses.
dnl
define(`confSERVICE_SWITCH_FILE', `/etc/service.switch')dnl
define(`confHOSTS_FILE', `/etc/hosts')dnl
dnl
dnl just add the local domain if the email address doesn't have one
dnl
FEATURE(`always_add_domain')dnl
dnl
dnl specify the sender email address for all outgoing mail from the local
dnl machine. most people also want to use "masquerade_envelope" to also
dnl change the envelope addresses.
dnl use "allmasquerade" to also change the recipient addresse. don't use
dnl this feature, if you don't have the full /etc/aliases and the full
dnl /etc/passwd on your host.
dnl
MASQUERADE_AS(`mailserverinternet.de')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
dnl
dnl use procmail for local mail delivery. the exact pathname is given above.
dnl
FEATURE(`local_procmail')dnl
dnl
dnl this table is used for all outgoing mail. just look at it for examples.
dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
dnl
dnl you can use these tables for additional sendmail features
dnl (mapping of email names)
dnl
FEATURE(`virtusertable', `hash -f /etc/mail/virtusertable.db')dnl
FEATURE(`genericstable', `hash -f /etc/mail/genericstable.db')dnl
dnl
dnl these mailers are available. per default only smtp is used. you have
dnl to add entries to /etc/mail/mailertable to enable one of the other
dnl mailers.
dnl
MAILER(`local')dnl
MAILER(`procmail')dnl
MAILER(`smtp')dnl
MAILER(`uucp')dnl
MAILER(`bsmtp')dnl
MAILER(`fido')dnl
dnl
dnl "use_ip" is a list of IP addresses that are allowed to relay mail.
dnl "use_names" is a list of domain names that are allowed to relay mail.
dnl If your host accepts non-local email as relay for other sites, use
dnl "use_relayto" to specify those sites.
dnl To ban unauthorized relay, you have to use one or more of "use_ip",
dnl "use_names" and "use_relayto". Always add the line with "check_rcpt4".
dnl
dnl HACK(`use_ip',`/etc/mail/LocalIP')dnl
dnl HACK(`use_names', `/etc/mail/LocalNames')dnl
dnl HACK(`use_relayto', `/etc/mail/RelayTo')dnl
dnl HACK(`check_rcpt4')dnl
dnl
dnl "check_rcpt5" can be used instead of "check_rcpt4" to also allow
dnl email relay based on the envelope from address. The format of the file
dnl is "user@address.domain allow" or "another.domain allow".
dnl
dnl HACK(`check_rcpt5', `hash -a@ALLOWED /etc/mail/allow.db')dnl
dnl
dnl ban local email delivery from well-known spam sites.
dnl the format of the database file is:
dnl junk.domain "Error-Code Error-Text"
dnl spammer@address.domain "Error-Code Error-Text"
dnl D.X.Y.Z "Error-Code Error-Text"
dnl C.X.Y "Error-Code Error-Text"
dnl B.X "Error-Code Error-Text"
dnl A "Error-Code Error-Text"
dnl junk.domain JUNK
dnl spammer@address.domain SPAMMER
dnl cyberpromo.com "571 Sorry, Spamford, no e-mail from your place."
dnl honey@sweeties.com "571 Honey, you're a spammer, go away."
dnl If the RHS is JUNK or SPAMMER, a default error text is used.
dnl "check_relay3" uses the IP addresses: full address, or class a, b or c.
dnl ACCEPT_SOME activates a backdoor: all entries must have the form
dnl "user@address OK" or "domain OK".
dnl
dnl define(`_ACCEPT_SOME_',`hash /etc/mail/accept.db')dnl
dnl HACK(`check_mail3', `btree -a@JUNK /etc/mail/junk.db')dnl
dnl HACK(`check_relay3', `btree -a@JUNK /etc/mail/junk.db')dnl
dnl
dnl sendmail only accpect emails as local that use the FQDN. if you want
dnl to accpect further hostnames as local email, add them here or put
dnl them into a sendmail.cw file.
dnl
dnl define(`confCW_FILE', `/etc/mail/sendmail.cw')dnl
dnl FEATURE(use_cw_file)dnl
dnl alternate names:
FEATURE(`promiscuous_relay')
FEATURE(`accept_unresolvable_domains')

mightymike99
11.12.01, 13:47
Hallo wenn mich das nicht täuscht musst du deine externe domain(mydomain.com) + die lokale(localmail.de) in die Datei /etc/mail/sendmail.cw stellen.

Desweiteren noch die Verbindung von lokalen Konten zu Internet Konten zuordnen, sofern die unqualifizierten Namen(das vor dem @) nicht übereinstimmen. Das geht in /etc/mail/aliases. Danach "newaliases" aufrufen.

Beispiel:
lokale Email: sabine@localmail.de
internet EMail: info@mydomain.com

aliases-file:
sabine info
Das steht ausführlich in der Mailserver-FAQ drin:
Die Text-FAQ findest du hier(HTML im Anhang):
http://www.linuxforen.de/forums/showthread.php?s=&threadid=20122