http://susefaq.sourceforge.net/faq/postfix.html#d0e167 contains my (older) method to find your own IP address. I developed a better, safer method:

lynx --dump www.whatismyip.com | egrep --only-matching  -e "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" | head -1

HTH.

Sander
surfipv6 at xs4all.nl