sendmail - Konfiguration für uni-mailserver (From: Zeile)


Johannes Nix (Johannes.Nix@mail.uni-oldenburg.de)
Fri, 16 Apr 1999 19:45:19 +0200


Hi folks,

heute bin ich zu dem Schluß gekommen, daß es bei UNIX doch ein paar Sachen
gibt, die tatsächlich kompliziert sind - nämlich sendmail.

Ausgangspunkt:

Ich benutze sendmail, von SuSE Linux (5.3) vorkonfiguriert, um über
modem + ppp + mail.uni-oldenburg.de meine Post zu verschicken. Ich habe als
FROM_HEADER mail.uni-oldenburg.de angegeben, in meinem /etc/sendmail.cf
tauchen folgende Sachen auf:

|======================================================================
|# "Smart" relay host (may be null)
|DSsmtp:mail.uni-oldenburg.de
|
|# who I masquerade as (null for no masquerading) (see also $=M)
|DMmail.uni-oldenburg.de
|
|# list of locations of user database file (null means no lookup)
|O UserDatabaseSpec=/etc/userdb.db
|======================================================================

außerdem ist in /etc/userdb folgendes eingetragen:

|======================================================================
|jnix:mailname Johannes.Nix@mail.uni-oldenburg.de
|Johannes.Nix:maildrop jnix
|======================================================================

und desweiteren wurde untenstehender Hinweis aus der FAQ angewandt, um die
user Database zu übersetzen. Das Eintragen von "stickyhost" in den M4-Makros
habe ich nicht gemacht, weil ich nicht weiß, in welche Datei, und ich mir
überlege, daß es eigentlich nicht so kompliziert sein darf, daß ich ein neues
handgemachtes sendmail.cf erzeugen muß (geht auch etwas über meinen Horizont
hinaus).

Nun das Problem: eine Mail an jnix@unixen.hrz-uni-oldenburg hat folgenden
Header:

|======================================================================
|From jnix@mail.uni-oldenburg.de Fri Apr 16 19:02:11 MES 1999
|Received: from mailsrv2.hrz.uni-oldenburg.de (mailsrv2.hrz.uni-oldenburg.de [134.106.49.199])
| by hpux01.hrz.uni-oldenburg.de (8.8.8/8.8.8/23.10.97) with ESMTP id TAA16346
| for <jnix@unixen.hrz.uni-oldenburg.de>; Fri, 16 Apr 1999 19:02:10 +0200 (MESZ)
|Received: from galapago.uni-oldenburg.de (ascend47.hrz.uni-oldenburg.de [134.106.49.147])
| by mailsrv2.hrz.uni-oldenburg.de (8.9.3/8.9.3/08.01.1999) with ESMTP id TAA13370
| for <jnix@unixen.hrz.uni-oldenburg.de>; Fri, 16 Apr 1999 19:02:07 +0200 (METDST)
|Received: (from jnix@localhost)
| by galapago.uni-oldenburg.de (8.8.8/8.8.8) id TAA00563
| for jnix@unixen.hrz.uni-oldenburg.de; Fri, 16 Apr 1999 19:08:49 +0200
|Date: Fri, 16 Apr 1999 19:08:49 +0200
|From: Johannes Nix <Johannes.Nix@mail.uni-oldenburg.de>
|Message-Id: <199904161708.TAA00563@galapago.uni-oldenburg.de>
|To: jnix@unixen.hrz.uni-oldenburg.de
|Subject: namespace-test
|...
|======================================================================

wie man sieht, gibt es einen korrekten

"From: Johannes.Nix@mail.uni-oldenburg.de"

Header, aber einen blödsinnigen

"From jnix@mail.uni-oldenburg.de"

Header ganz am Anfang, der einige Mailer (vielleicht auch euren) bei einem
"reply" verwirrt.

Was muß ich dagegen tun? SENDMAIL_RELAY in /etc/rc.config anzuschalten scheint
mir nicht das richtige zu sein.

Johannes

|======================================================================
|Date: January 24, 1996
|Subject: Q3.2 -- How do I rewrite my From: lines to read
| ``First_Last@My.Domain''?
|
| There are a couple of ways of doing this. This describes using
|the "user database" code. This is still experimental, and was
|intended for a different purpose -- however, it does work with a bit
|of care. It does require that you have the Berkeley "db" package
|installed (it won't work with DBM).
|
| First, create your input file. This should have lines like:
|
| loginname:mailname First_Last
| First_Last:maildrop loginname
|
| If your login name is "john" and your full name is "John Q.
|Public", then this would be:
|
| john:mailname John_Q_Public@your.domain.goes.here
| John_Q_Public:maildrop john
|
| The words "mailname" and "maildrop" must be typed in literally,
|just as they appear.
|
|
| Install this file in (say) /etc/userdb. Create the database:
|
| makemap -d btree /etc/userdb.db < /etc/userdb
|
| You can then create a config file that uses this. You will have
|to include the following in your .mc file:
|
| define(confUSERDB_SPEC, /etc/userdb.db)
| FEATURE(notsticky)
|
| Version 8.7 sendmail changes the semantics of this feature such
|that notsticky is turned on by default, and if you want the old (8.6)
|behaviour, you instead define:
|
| FEATURE(stickyhost)
|
|
| You also need to make sure that you have the "ik" flags specified
|on the affected mailer definition.
|
|
| Note: The program "makemap" is discussed in further detail
|======================================================================

End Of Mail



This archive was generated by hypermail 2.0b3 on Fri Apr 16 1999 - 19:38:29 CEST