Outgoing mail rewriting - inverse mail aliases

Outgoing mail rewriting - inverse mail aliases

Post by Mike Jenki » Sat, 21 Aug 1993 04:25:16



The main.cf sendmail configuration file has:

Quote:># map containing the inverse of mail.aliases
># Note that there is a special case mail.byaddr will cause reverse
># lookups in both Nis+ and NIS.
># If you want to use ONLY Nis+ for alias inversion comment out the next line  
># and uncomment the line after that
>DZmail.byaddr
>#DZREVERSE.mail_aliases.org_dir

I commented the DZmail.byaddr and uncommented the REVERSE line
but have been unsuccessful in getting it to work.  Do I create
a new NIS+ table (REVERSE.mail_aliases.org_dir) or does it use
the mail_aliases.org_dir table?  Anyone got this working?

Also, what was decided about the alias column of mail_aliases
being CASE SENSITIVE?  Should we change it to CASE INSENSITIVE?

Thanks,
Mike Jenkins

 
 
 

Outgoing mail rewriting - inverse mail aliases

Post by Wolfgang Ratzka t20 » Sat, 21 Aug 1993 06:30:26


: The main.cf sendmail configuration file has:

: ># map containing the inverse of mail.aliases
: ># Note that there is a special case mail.byaddr will cause reverse
: ># lookups in both Nis+ and NIS.
: ># If you want to use ONLY Nis+ for alias inversion comment out the next line  
: ># and uncomment the line after that
: >DZmail.byaddr
: >#DZREVERSE.mail_aliases.org_dir

: I commented the DZmail.byaddr and uncommented the REVERSE line
: but have been unsuccessful in getting it to work.  Do I create
: a new NIS+ table (REVERSE.mail_aliases.org_dir) or does it use
: the mail_aliases.org_dir table?  Anyone got this working?

I tried the same, no way. Even a officially patched version of
sendmail did not help. Note that REVERSE.mail_aliases.org_dir is not a
legal name for a NIS+ map (as mail_aliases isn't a directory), hence
this special syntax should trigger some reverse mapping within
sendmail. (This should be possible, as both the alias and the
expansion column are searchable).

Somewhere in the man pages it says, that the canonical alias for
inverse translation should be marked by having CANON in the option
column. Doesn't help either:

I devised the following workaround: After updating the alias table I
run the following (ugly) script:
--------------------
#!/bin/sh
nistbladm -d inverse_aliases.org_dir
nistbladm -c mail_aliases alias=S,og=rmcd,w=r expansion=S,og=rmcd,w=r \
inverse_aliases.org_dir.our.domain.
nisgrep options=CANON mail_aliases.org_dir \
| awk '{print "nistbladm -a alias="$2" expansion="$1" inverse_aliases.org_dir"}' \
| sh
nischown rphc1a.our.domain. inverse_aliases.org_dir
--------------------
This creates a second NIS+ map, containing the inverted `canonical'
aliases, which are read by sendmail using:

#DZmail.byaddr
#DZREVERSE.mail_aliases.org_dir
DZinverse_aliases.org_dir

--
    _
|  | )
|/\| \ Wolfgang Ratzka