SuSE Support Database

Title: ISDN: dynamic IPs and sendmail

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

ISDN: dynamic IPs and sendmail

Symptom:

You plan to configure sendmail for your local host. It is not possible to get it to work properly instead sendmail opens a connection each time you send a mail.

Cause:

Sendmail needs to resolve every IP address of your local network. As this is quite impossible while using dynamic IPs you need another solution:

Solution:

Copy this little script to /etc/ppp/ip-up and enter the following commands:
chmod 755 ip-up
ln -s ip-up ip-down
-------------------------------[snip]----------------------------
#!/bin/sh

# (c) '97, S.u.S.E. GmbH, Fuerth, Germany
# Klaus Franken 
# Carsten Hoeger 
# 04.12.97
#

BASENAME=`basename $0`
INTERFACE=$1
DEVICE=$2
SPEED=$3
LOCALIP=$4
REMOTEIP=$5

. /etc/rc.config

# Substitute $IFCONFIG_4 with your configured interface
# in /etc/rc.config:
WHICHIF=$IFCONFIG_4

# A route has to exist in /etc/route.conf
DEST=`grep ${INTERFACE} /etc/route.conf | awk '{ print $1}'`


case "$BASENAME" in
ip-up)
	/sbin/route add default gw $REMOTEIP dev $INTERFACE
	#/sbin/init.d/route start $INTERFACE
	;;
ip-down)
	# delete interface-related routes
	/sbin/route del $REMOTEIP
	/sbin/route del default
	
	# also shut down interface
	/sbin/ifconfig $INTERFACE down
	/sbin/ifconfig $INTERFACE $WHICHIF

	# add configured dummy-route and gw
	/sbin/route add -host $DEST $INTERFACE
	/sbin/route add default gw $DEST dev $INTERFACE
	;;
*)
	;;
esac
-------------------------------[snap]----------------------------
It is required that you replace $IFCONFIG_4 with your IFCONFIG variable from /etc/rc.config. Of course you should use the one that is responsible for your IPPP device. Furthermore a host route for your IPPP device has to be set in /etc/route.conf.

What happens?

Rather simple. There is a a name attached to your IPPP device in /etc/hosts. After havin established a connection this script replaces your routing with the actual address. Now sendmail is able to resolve this IP address (via /etc/hosts).

This solution has not been tested intensively yet. Feedback is welcome!!!

---

Keywords: ISDN, DYNAMISCHE, SENDMAIL, IPPP, VERBINDUNGEN

---

Categories: Configuration

---

Feedback welcome: Send Mail to choeger@suse.de (Please give the following subject: SDB-isdn_dynip-sendmail)

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

SDB-isdn_dynip-sendmail, Copyright SuSE GmbH, Nuremberg, Germany - Version:
Impressum - Last generated: 24. Feb 1999 14:48:43 by maddin with sdb_gen 1.00.0