Mailx stopped working in OpenBSD router connected to dsl

Hi EE -

I have an OpenBSD server that acts as a router/firewall for my home network. Up until April of 2007 I was able to get this :

cat mail_ip.sh_09022008a
/usr/bin/mailx -s "Home IP Address is: `ifconfig tun0 | grep inet | awk '{ print $2 }'`" [USERID] < /etc/ppp/mail_file;

To email me when my dsl dynamic ip through would change.

It just abruptly stopped and I am now ready to figure it out :-) There were not any cahnges that I made to the server. Here is the mail_file:

"This is an automated message."

And the ppp.conf:
 set log Phase Chat IPCP CCP tun command
 set redial 15 0
 set reconnect 15 10000

 set device "!/usr/sbin/pppoe -i ep0"
 disable acfcomp protocomp
 deny acfcomp
 set mtu max 1492
 set speed sync
#  enable lqr
#  set lqrperiod 5
#  set cd 5
#  set dial
#  set login
#  set timeout 0
 set authname
 # set authkey password
 set authkey pasword
 add! default HISADDR
 enable dns
 enable mssfixup

And another under /etc/ppp:
cat ppp.linkup
 ! sh -c "/sbin/ifconfig pflog0 up"
 ! sh -c "/sbin/pfctl -F all -f /etc/pf.conf"
 ! sh -c "/etc/ppp/"

Any help will be appreciated

Thanks -
Who is Participating?
Most likely disk full.
I do not see any error from mailx in your posting - post one for me to see.
wotan1953Author Commented:
Okay for df I get:

bash-2.05b# pwd
bash-2.05b# df -h
Filesystem    Size   Used  Avail Capacity  Mounted on
/dev/wd0a     193M    28M   156M    15%    /
/dev/wd0d     124M    27K   117M     0%    /tmp
/dev/wd0f     935M   679M   209M    76%    /usr
/dev/wd0e     124M    13M   105M    11%    /var

Regarding errors, I get this bounce:

Message 1:
From Sat Apr 18 20:28:05 2009
Date: Sat, 18 Apr 2009 20:28:05 -0500 (EST)
From: Mail Delivery Subsystem <>
To: <>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
Subject: Warning: could not send message for past 4 hours
Auto-Submitted: auto-generated (warning-timeout)

This is a MIME-encapsulated message


    **      THIS IS A WARNING MESSAGE ONLY      **

The original message was received at Sat, 18 Apr 2009 16:25:06 -0500 (EST)
from markc@localhost []

   ----- Transcript of session follows -----
<>... Deferred: Connection timed out with
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old

Content-Type: message/delivery-status

Reporting-MTA: dns;
Arrival-Date: Sat, 18 Apr 2009 16:25:06 -0500 (EST)

Final-Recipient: RFC822;
Action: delayed
Status: 4.4.1
Remote-MTA: DNS;
Last-Attempt-Date: Sat, 18 Apr 2009 20:28:05 -0500 (EST)
Will-Retry-Until: Thu, 23 Apr 2009 16:25:06 -0500 (EST)

Content-Type: message/rfc822

Return-Path: <>
Received: from (wotan@localhost [])
        by (8.12.9/8.12.9) with ESMTP id n3ILP6cQ000140
        for <>; Sat, 18 Apr 2009 16:25:06 -0500 (EST)
Received: (from wotan@localhost)
        by (8.12.9/8.12.6/Submit) id n3ILP6Rx032732
        for; Sat, 18 Apr 2009 16:25:06 -0500 (EST)
Date: Sat, 18 Apr 2009 16:25:06 -0500 (EST)
From: Bob James <>
Message-Id: <>
Subject: Test 18042009a


Is there another place to look for errors?  If I log in as root, it still bombs. As I said the script that I used to run worked fine for awhile. I wonder if there sbcglobal/ameritech changed some parameter ... like the name of the mail  relay ... er something.  The error example I have here is just me shelled inot the server and doing a quick command line mail message:

:> mail -s "Test"  
Then message and ctrl D.

Thanks Again -
wotan1953Author Commented:
If there is further information, I need to supply, let me know. If I fugure this one out I will post.
<>... Deferred: Connection timed out with

Looks like receiving server is blocking you, you cannot fix it on your system. Even you are not spammer they use some automated tests to deny you.
Make sure smarthost is one from your provider, and even then you may encounter problems getting mail to internet.
wotan1953Author Commented:
Okay. Would U give me  a kick in the right direction, to set smart host? Where is it ? Whuch file etc?
I am researching on the web ... but nothing yet.

Much appreciated.
wotan1953Author Commented:
I am working this.
Then why your smarthost rejects you? It is outside your OpenBSD machine.
wotan1953Author Commented:
"Then why your smarthost rejects you?"  I guess one reason might be because it is wrong. I am working what u gave me a link and SMART_HOST directive. I'll get back when I finish .... sorry for the delay ... takes time.


wotan1953Author Commented:
Okay I added sbcglobal relay to my /etc/mail/ file :

# "Smart" relay host (may be null) 465

I also tried it without 465.

I then bounced sendmail ...
By grep sendmail in rc.conf
  536       grep sendmail rc.conf
  537  cd /etc/mail
  538  ls
  539  vi
Found the sendmail start
  540  sendmail -L sm-mta -C/etc/mail/ -bd -q30m
  And restarted sendmail.

Short story SBCGlobal still doesn't like me ... this is nuts!

Anyhow hopefully this long painful process will help someone else ... and gheist thanks for the patience. Points go to you.

For my part I am trying either a service called or see about using my lunarpages account to run my monitoring scripts.. not sure which yet.

By the way I have several other friends using mailx and one who has dsl via ATT has my problem but the other two who have cable accounts (one Time Warner , the other a small regional one)  are able to use mail or mailx in their scripts .. no problems . Just a note ... not sure what to make of it.

Thanks -
wotan1953Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.