SUMMARY sender address in mail

From: Rune Paulsen (Rune.Paulsen@usystems.no)
Date: Tue Jun 13 1995 - 09:42:58 CDT


I did the following to change my From address from
rune@usystems.no to Rune.Paulsen@usystems.no:

1. Add the following to your /etc/aliases file

        Rune.Paulsen: rune

2. Make the following changes to your NIS makefile:

        

aliases.time: $(ALIASES)
        @cp $(ALIASES) $(YPDBDIR)/$(DOM)/mail.aliases;
        @/usr/lib/sendmail -bi -oA$(YPDBDIR)/$(DOM)/mail.aliases;
        $(MKALIAS) $(YPDBDIR)/$(DOM)/mail.aliases $(YPDBDIR)/$(DOM)/mail.byaddr;
New line-> #
New line-> # Build my own mail.byaddr wiping out existing mail.byaddr
New line-> #
New line-> @(egrep '[A-Z][a-z]*\.[A-Z][a-z]*:' $(DIR)/aliases $(CHKPIPE))\
New line-> |( sed -e 's/:/ /' -e 's/@themailhost//' -e 's/,/ /' $(CHKPIPE))\
New line-> |( awk '{print $$2,$$1}' $(CHKPIPE))\
New line-> | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/mail.byaddr;
New line-> #

        rm $(YPDBDIR)/$(DOM)/mail.aliases;
        @touch aliases.time;
        @echo "updated aliases";
        @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) mail.aliases; fi
        @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) mail.byaddr; fi
        @if [ ! $(NOPUSH) ]; then echo "pushed aliases"; fi

   Make aliases and check it with command ypcat mail.byaddr

3. Change your /etc/sendmail.cf file. The modification is for rule
   22 and should work for both ddn and smartuucp mailer.

DZmail.byaddr
 

S22
# Next line is the new line that change From address
R$- $:$>3${Z$1$} firstname.lastname
R$*<@LOCAL>$* $:$1
R$-<@$-> $:$>3${Z$1@$2$} invert aliases
R$*<@$+.$*>$* $@$1<@$2.$3>$4 already ok
R$+<@$+>$* $@$1<@$2.$m>$3 tack on our domain
R$+ $@$1<@$m> tack on our domain

4. restart sendmail and test !!!

Good luck.

....rune

                           \\\|///
                          \\ ~ ~ //
                          (/ @ @ /)
+-----------------------oOOo-(_)-oOOo-----------------------+
| Rune Paulsen | Phone: +47 63 817600 (work) |
| UnixSystems AS | +47 63 820441 (home) |
| Fetveien 1 | Fax: +47 63 801930 |
| N-2007 KJELLER | E-Mail: rune@usystems.no |
+-----------------------------------------------------------+



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:27 CDT