1

I am using a Debian Jessie server and have setup exim4 to send me emails instead of postfix or sendmail.

Thats when I started getting loads of emails as follows:

First:

Title: * SECURITY information for vultr.guest *

Body: vultr.guest: Dec 7 12:13:29 : root : unable to resolve host vultr.guest

Second:

Title: Cron test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp

Body:

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@example.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 https://support.google.com/mail/answer/7720
[(10) example.com. [xxx.xxx.xxx.90]:25: socket error]

----- Original message -----

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=from:to:subject:mime-version:content-type:content-transfer-encoding
         :message-id:date;
        bh=k/8GlT8DBvBIJzBOOfw8qR0kGPzj7m9ZR/aj+JOKBhg=;
        b=eA6kpVtS0eNBO0CFBfLzlnaYwZ9/GubMaWTGUkG4MaxbNy55YxY2jZAuh3RHI2mo8Q
         qp5OmKihchYTgCxcAx0xvJaXuuxDhoT9dCJ6YEIzqjmypWjpUEqoXkNu7uKU4Cd1vTfS
         5/dSvE7zVE6TYe4L18vrOiYBEUNrJQ3lTdv//RrlHZs/f62GorIyMHgVL4XvkVNLWF/K
         lK9SSybf9ee3KTKUxurBm1Tyah62Gk4/869Hynr1QEAjSAzM8sSKDyKH/KOZ06sDWtPQ
         jE0Agxffk8RkhsFkEtIbpZBfS/zagGZ8+CXsGqR9541ylMAHGOGeYtRp4oiB8tVP2Sbv
         h4Rw==
X-Received: by 10.129.114.10 with SMTP id n10mr3081975ywc.0.1449600002717;
        Tue, 08 Dec 2015 10:40:02 -0800 (PST)
Return-Path: <myEmailAddress@gmail.com>
Received: from vultr.guest ([104.156.246.90])
        by smtp.gmail.com with ESMTPSA id f203sm2998216ywf.45.2015.12.08.10.40.02
        for <root@example.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 08 Dec 2015 10:40:02 -0800 (PST)
From: Cron Daemon <myEmailAddress@gmail.com>
X-Google-Original-From: root@example.com (Cron Daemon)
Received: from smmsp by vultr.guest with local (Exim 4.84)
        (envelope-from <smmsp@example.com>)
        id 1a6NBB-0007Vu-Os
        for root@example.com; Tue, 08 Dec 2015 13:40:01 -0500
To: root@example.com
Subject: Cron <smmsp@vultr> test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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: <E1a6NBB-0007Vu-Os@vultr.guest>
Date: Tue, 08 Dec 2015 13:40:01 -0500

I edited /etc/cron.d/sendmail and first tried to change the MAILTO= line from root to my gmail address. That did not help. So I commented that line out, and the

*/20 *    *    *    *       smmsp   test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp

That made it stop from sending me emails every 20 minutes with junk. But I still get many and often emails with the

Subject: * SECURITY information for vultr.guest * Body:

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@example.com

Message will be retried for 1 more day(s)

Technical details of temporary failure:
The recipient server did not accept our requests to connect. Learn more at https://support.google.com/mail/answer/7720
[(10) example.com. [xxx.xxx.xxx.90]:25: socket error]

I did modify /etc/hostname and removed vultr.guest and replaced it with example.com. And in /etc/hosts I only have:

127.0.0.1   localhost
127.0.1.1   install.install install

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

What did I configure wrong? And how can I fix it?

UPDATE: The /etc/exim4/update-exim4.conf.conf contents are:

dc_eximconfig_configtype='satellite'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1 ; ::1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='smtp.gmail.com::587'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'
  • 1
    I have added it to the end of the question. Thanks – KingsInnerSoul Dec 10 '15 at 20:38
  • 1
    It's difficult without knowing what example.com really refers to. But Google is telling you it doesn't know how to deliver to root@example.com. Correct the destination address to something valid. – Chris Davies Dec 10 '15 at 21:04
  • 1
    example.com is the domain name I have. root@example.com is the root user. What is needed to be done in order to setup a mailbox for root? I thought it goes to /var/mail/root – KingsInnerSoul Dec 10 '15 at 21:11
  • 1
    You need to tell exim it is the local machine so it does local delivery! I'll write a proper answer shortly – Chris Davies Dec 10 '15 at 21:14
  • 1
    Actually, I do not know if it is relevant or not - but three days ago I configured exim4. Until then I had to go and visit /var/mail/root to see notifications. Once I changed to exim4, I do not see any changes made to the /var/mail/root or /var/mail/mail files. Can that be a clue to the issue? – KingsInnerSoul Dec 10 '15 at 21:15

1 Answers1

4

It seems to me that VULTR's tutorial is not correct. When you configure exim4 by dpkg-reconfigure exim4-config, they tell you to choose mail sent by smarthost; no local mail, and configure it as follows:

System mail name: YOUR_HOSTNAME
IP-addresses to listen on for incoming SMTP connections: 127.0.0.1 ; ::1
Other destinations for which mail is accepted: <BLANK>
Visible domain name for local users: <BLANK>
IP address or host name of the outgoing smarthost: smtp.gmail.com::587
Keep number of DNS-queries minimal (Dial-on-Demand)? No
Split configuration into small files? No
Root and postmaster mail recipient: <BLANK>

But I doubt that the Other destinations for which mail is accepted: should be BLANK. If you configure it, add your email address, or your example.com domain/email.

Otherwise, try to edit the following locations:

/etc/aliases:

root: address@example.com
mailer-daemon: address@example.com
postmaster: address@example.com
nobody: address@example.com
hostmaster: address@example.com
usenet: address@example.com
news: address@example.com
webmaster: address@example.com
www: address@example.com
www-data: address@example.com
ftp: address@example.com
abuse: address@example.com
noc: address@example.com
security: address@example.com
*: address@example.com

and edit /etc/email-addresses to include the user:email combo:

root: address@example.com
mail: address2@example2.com
*: address@example.com

Then restart service sendmail restart and service exim4 restart

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
Mike K
  • 356
  • 2
  • 5
  • Interesting, man etc-email-addresses does not mention that * can be used in email-addresses in Debian 8 (Jessie). Maybe I should report documentation bug? It's convenient feature to know. – Vincas Dargis Jun 05 '17 at 13:33