Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do you tell ssmtp to ignore DNS checks on localhost?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rhodyne
n00b
n00b


Joined: 25 Oct 2002
Posts: 16
Location: Granger TX

PostPosted: Sat Jun 28, 2003 2:52 am    Post subject: How do you tell ssmtp to ignore DNS checks on localhost? Reply with quote

All I want to do is send email notifications from my server thru a local smtp server to a local email address.

A little background may help understand the situation.

I have a (soon to be headless) server at work that gets DHCP leases from a M$ based network that is extremely restrictive. If the IP changes I want to notify myself of that change by email.

Already worked out the script string (using mailx) to help send that notification
Code:
echo -e "`ifconfig | grep "addr:123.456"`" | mail -s "oodako IP" my.email@here.com

Throw that into a script that regularly checks for IP changes, only sends if there is a diff, and away we go.

Problem is I don't want to setup DNS (too many restrictions) and I can't use static IPs. This server will be very low-key, only showing a DHCP lease and an active ssh port on their network. That and, obviously, random accesses to one of the smtp servers.

I know you can tell sendmail to do this somehow but I already have ssmtp installed because it is required by one of my other packages and I really don't need more than one mail transport app.

As a side note this system will never need to recieve mail from outside itself.

Any ideas would be helpful, including other possible ways to do this.
_________________
./done
Back to top
View user's profile Send private message
rhodyne
n00b
n00b


Joined: 25 Oct 2002
Posts: 16
Location: Granger TX

PostPosted: Sat Jun 28, 2003 3:12 am    Post subject: Reply with quote

Well, just answered my own question.

In the /etc/ssmtp/ssmtp.conf there is a line
Code:
rewriteDomain=
that is usually blank. If you set it to the local domain, your mail goes out. It looks like it tricks ssmtp into checking the domain on the network which you already know is valid if you can hit the smtp server.
_________________
./done
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum