Ubuntu – DynDNS and mail servers

dyndnseximUbuntu

I have set up an Ubuntu box with EXIM4 for handling my email, for now I only care about outgoing email. My router manages my DynDNS.com psuedo static-IP addressing. Port forwarding for port 25 is open and shows up with a port-scan. The firestarter firewall on the box shows access attempts and I have added a permit rule.

Outgoing email seems to work as I wanted, and it is configured to send through my gmail account. The problem is that GMail is spamming me every 10-20 minutes with a Delivery Status Notification message complaining about connection refused. It seems to be that Google is trying to email my root@<dyndns-account> account.

How should I overcome this problem? How could I set up complete in/out email access? What is the best course of action for a private web-site that needs minimal email support (e.g. the MediaWiki I'm hosting, etc).

EDIT – added an anonymous copy of the email

    This is an automatically generated Delivery Status Notification

    THIS IS A WARNING MESSAGE ONLY.

    YOU DO NOT NEED TO RESEND YOUR MESSAGE.

    Delivery to the following recipient has been delayed:

        root@mydomain.is-a-geek.com

    Message will be retried for 2 more day(s)

    Technical details of temporary failure:
    The recipient server did not accept our requests to connect. Learn more at http://mail.google.com/support/bin/answer.py?answer=7720
    [mydomain.is-a-geek.com (1): Connection refused]

      ----- Message header follows -----

    Received: by 10.210.89.7 with SMTP id m7mr1107333ebb.14.1246185600392;
           Sun, 28 Jun 2009 03:40:00 -0700 (PDT)
    Return-Path: <me@gmail.com>
    Received: from MyMachine (isp.com [xx.xx.xx.xxx])
           by mx.google.com with ESMTPS id 10sm7080189eyz.31.2009.06.28.03.39.59
           (version=TLSv1/SSLv3 cipher=RC4-MD5);
           Sun, 28 Jun 2009 03:39:59 -0700 (PDT)
    Received: from smmsp by MyMachine with local (Exim 4.69)
           (envelope-from <smmsp@mydomain.is-a-geek.com>)
           id 1MKrnl-00075G-Oe
           for root@mydomain.is-a-geek.com; Sun, 28 Jun 2009 11:40:01 +0100
    From: Cron Daemon <me@gmail.com>
    To: root@mydomain.is-a-geek.com
    Subject: Cron <smmsp@MyMachine> test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp
    Content-Type: text/plain; charset=UTF-8
    X-Cron-Env: <MAILTO=root>
    X-Cron-Env: <SHELL=/bin/sh>
    X-Cron-Env: <HOME=/var/lib/sendmail>
    X-Cron-Env: <PATH=/usr/bin:/bin>
    X-Cron-Env: <LOGNAME=smmsp>
    Message-Id: <E1MKrnl-00075G-Oe@MyMachine>
    Date: Sun, 28 Jun 2009 11:40:01 +0100

      ----- Message body suppressed -----

Best Answer

Wait... Is mail to local users going out to gmail's smtp servers and then coming back to your server? That's something you want to avoid. You need to tell exim that all mail to your domain(s) should be delivered locally, and all other mail can then go via gmail as a smarthost (definitely not as a delivery agent).

Edit: These instructions may help.

Related Topic