Mailx stopped working in OpenBSD router connected to dsl

Posted on 2009-04-18
Last Modified: 2013-12-09
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 -
Question by:wotan1953
    LVL 61

    Expert Comment

    Most likely disk full.
    I do not see any error from mailx in your posting - post one for me to see.

    Author Comment

    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 -

    Author Comment

    If there is further information, I need to supply, let me know. If I fugure this one out I will post.
    LVL 61

    Expert Comment

    <>... 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.

    Author Comment

    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.
    LVL 61

    Accepted Solution


    Author Comment

    I am working this.
    LVL 61

    Expert Comment

    Then why your smarthost rejects you? It is outside your OpenBSD machine.

    Author Comment

    "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.



    Author Comment

    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 -

    Author Closing Comment


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now