[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim re-writing help



*- On 30 Sep, David Kanter wrote about "Re: Exim re-writing help"
>>>> Brian Servis <servis@purdue.edu> 9/30/99 11:10:57 AM >>>
> I also set the primary_hostname to my dynamic dns name so that the
> Message-Id gets set properly(look in the header of this mail).
> 
> Thanks. You explanation makes perfect sense and makes rewriting in exim much easier than rewriting with smail.
> 
> But with you above statement, did you set primary_hostname = uname()? Or is there some other way of setting the dynamic hostname?
> 

I have a script in /etc/ppp/ip-up.d that modifies/replaces my exim.conf
when I connect.  There are probably other/better ways to do it but it
works for me so I am sticking with it for now.

#!/bin/sh
# get the dns name of the dynamic ip
set name=`nslookup $PPP_LOCAL | grep Name | cut -c 10-`
# update exim config file 
sed -e s/--Name--/${name}/g /etc/exim.conf-up >! /etc/exim.conf

Then at the top of exim.conf-up I have the following,
 
primary_hostname = --Name--

I got this idea from the Dynamic-IP-Hacks mini-HOWTO.  I also do the
same type of thing with /etc/hosts and my cfingerd setup.

-- 
Brian 
---------------------------------------------------------------------
Mechanical Engineering                              servis@purdue.edu
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------


Reply to: