[Pkg-exim4-users] redirecting mail to root under jessie

Jeffrey Mark Siskind qobi at purdue.edu
Mon Oct 24 14:51:02 UTC 2016


I recently upgraded from wheezy to jessie. I did a fresh install. During the
install, I configured exim4 the same way that I did under wheezy. I have been
configuring it the same way since sarge, etch, lenny, and squeeze. I keep
records of the answers that I give to dpkg-reconfigure exim4-config. Enclosed
are the answers that I gave during the jessie install.

   qobi at upplysingaoflun>cat /etc/aliases
   # /etc/aliases
   mailer-daemon: postmaster
   postmaster: root
   nobody: root
   hostmaster: root
   usenet: root
   news: root
   webmaster: root
   www: root
   ftp: root
   abuse: root
   noc: root
   security: root
   root: qobi at purdue.edu
   qobi at upplysingaoflun>hostname
   upplysingaoflun
   qobi at upplysingaoflun>hostname -f
   upplysingaoflun.ecn.purdue.edu
   qobi at upplysingaoflun>hostname -d
   ecn.purdue.edu
   qobi at upplysingaoflun>cat /etc/mailname
   ecn.purdue.edu
   qobi at upplysingaoflun>

   root at upplysingaoflun:~# cat /etc/exim4/update-exim4.conf.conf
   # /etc/exim4/update-exim4.conf.conf
   #
   # Edit this file and /etc/mailname by hand and execute update-exim4.conf
   # yourself or use 'dpkg-reconfigure exim4-config'
   #
   # Please note that this is _not_ a dpkg-conffile and that automatic changes
   # to this file might happen. The code handling this will honor your local
   # changes, so this is usually fine, but will break local schemes that mess
   # around with multiple versions of the file.
   #
   # update-exim4.conf uses this file to determine variable values to generate
   # exim configuration macros for the configuration file.
   #
   # Most settings found in here do have corresponding questions in the
   # Debconf configuration, but not all of them.
   #
   # This is a Debian specific file

   dc_eximconfig_configtype='smarthost'
   dc_other_hostnames=''
   dc_local_interfaces='127.0.0.1 ; ::1'
   dc_readhost='purdue.edu'
   dc_relay_domains=''
   dc_minimaldns='false'
   dc_relay_nets=''
   dc_smarthost='smtp.ecn.purdue.edu'
   CFILEMODE='644'
   dc_use_split_config='false'
   dc_hide_mailname='true'
   dc_mailname_in_oh='true'
   dc_localdelivery='mail_spool'
   root at upplysingaoflun:~#

I ran

   # newaliases

I then ran the following test, just on upplysingaoflun:

   root at upplysingaoflun:~# mail root
   Subject: test1
   test1
   Cc: root at upplysingaoflun:~# mail root at upplysingaoflun
   Subject: test2
   test2
   Cc: root at upplysingaoflun:~# mail root at upplysingaoflun.ecn.purdue.edu
   Subject: test3
   test3
   Cc: root at upplysingaoflun:~#

test2 got forwarded to qobi at purdue.edu. test1 and test3 did not.

I have changed /etc/mailname to purdue.edu and upplysingaoflun.ecn.purdue.edu.
It makes no difference.

I tried copying /etc/exim4/conf.d/ from a wheezy machine that does forward
root to qobi at purdue.edu. It didn't make a difference.

Under wheezy and all previous versions of Debian for the past decade, mail to
root got forwarded to qobi at purdue.edu. In particular, I just tried test{1,2,3}
above on my one remaining wheezy installation and got the exact opposite
behavior: test1 and test3 got forwarded to qobi at purdue.edu. test2 did not.

I need cron mail, smartctl mail, mdadm mail, etc. forwarded to qobi at purdue.edu.
How do I get this to work under jessie?

For more details, see

https://lists.debian.org/debian-user/2016/08/msg00544.html

    Thanks,
    Jeff (http://engineering.purdue.edu/~qobi)
--------------------------------------------------------------------------------
 Please select the mail server configuration type that best meets your     │
 │ needs.                                                                    │
 │                                                                           │
 │ Systems with dynamic IP addresses, including dialup systems, should       │
 │ generally be configured to send outgoing mail to another machine, called  │
 │ a 'smarthost' for delivery because many receiving systems on the          │
 │ Internet block incoming mail from dynamic IP addresses as spam            │
 │ protection.                                                               │
 │                                                                           │
 │ A system with a dynamic IP address can receive its own mail, or local     │
 │ delivery can be disabled entirely (except mail for root and postmaster).  │
 │                                                                           │
 │ General type of mail configuration:                                       │
 │                                                                           │
 │       internet site; mail is sent and received directly using SMTP        │
 │       mail sent by smarthost; received via SMTP or fetchmail              │
 │       mail sent by smarthost; no local mail                               │
 │       local delivery only; not on a network                               │
 │       no configuration at this time                                       │
 │                                                                           │
 │                                                                           │
 │                    <Ok>                        <Cancel>
--------------------------------------------------------------------------------
mail sent by smarthost; received via SMTP or fetchmail
--------------------------------------------------------------------------------
The 'mail name' is the domain name used to 'qualify' mail addresses       │
 │ without a domain name.                                                    │
 │                                                                           │
 │ This name will also be used by other programs. It should be the single,   │
 │ fully qualified domain name (FQDN).                                       │
 │                                                                           │
 │ Thus, if a mail address on the local host is foo at example.org, the         │
 │ correct value for this option would be example.org.                       │
 │                                                                           │
 │ This name won't appear on From: lines of outgoing messages if rewriting   │
 │ is enabled.                                                               │
 │                                                                           │
 │ System mail name:                                                         │
 │                                                                           │
 │ ecn.purdue.edu___________________________________________________________ │
 │                                                                           │
 │                    <Ok>                        <Cancel>
--------------------------------------------------------------------------------
ecn.purdue.edu
--------------------------------------------------------------------------------
Please enter a semicolon-separated list of IP addresses. The Exim SMTP    │
 │ listener daemon will listen on all IP addresses listed here.              │
 │                                                                           │
 │ An empty value will cause Exim to listen for connections on all           │
 │ available network interfaces.                                             │
 │                                                                           │
 │ If this system only receives mail directly from local services (and not   │
 │ from other hosts), it is suggested to prohibit external connections to    │
 │ the local Exim daemon. Such services include e-mail programs (MUAs)       │
 │ which talk to localhost only as well as fetchmail. External connections   │
 │ are impossible when 127.0.0.1 is entered here, as this will disable       │
 │ listening on public network interfaces.                                   │
 │                                                                           │
 │ IP-addresses to listen on for incoming SMTP connections:                  │
 │                                                                           │
 │ 127.0.0.1 ; ::1__________________________________________________________ │
 │                                                                           │
 │                    <Ok>                        <Cancel>                   │
 │
--------------------------------------------------------------------------------
<default>
--------------------------------------------------------------------------------
Please enter a semicolon-separated list of recipient domains for which    │
 │ this machine should consider itself the final destination. These domains  │
 │ are commonly called 'local domains'. The local hostname                   │
 │ (upplysingaoflun.ecn.purdue.edu) and 'localhost' are always added to the  │
 │ list given here.                                                          │
 │                                                                           │
 │ By default all local domains will be treated identically. If both         │
 │ a.example and b.example are local domains, acc at a.example and              │
 │ acc at b.example will be delivered to the same final destination. If         │
 │ different domain names should be treated differently, it is necessary to  │
 │ edit the config files afterwards.                                         │
 │                                                                           │
 │ Other destinations for which mail is accepted:                            │
 │                                                                           │
 │ _________________________________________________________________________ │
 │                                                                           │
 │                    <Ok>                        <Cancel>                   │
 │
--------------------------------------------------------------------------------
<blank>
--------------------------------------------------------------------------------
 Please enter a semicolon-separated list of IP address ranges for which    │
 │ this system will unconditionally relay mail, functioning as a smarthost.  │
 │                                                                           │
 │ You should use the standard address/prefix format (e.g. 194.222.242.0/24  │
 │ or 5f03:1200:836f::/48).                                                  │
 │                                                                           │
 │ If this system should not be a smarthost for any other host, leave this   │
 │ list blank.                                                               │
 │                                                                           │
 │ Machines to relay mail for:                                               │
 │                                                                           │
 │ _________________________________________________________________________ │
 │                                                                           │
 │                    <Ok>                        <Cancel>                   │
 │
--------------------------------------------------------------------------------
<blank>
--------------------------------------------------------------------------------
Please enter the IP address or the host name of a mail server that this   │
 │ system should use as outgoing smarthost. If the smarthost only accepts    │
 │ your mail on a port different from TCP/25, append two colons and the      │
 │ port number (for example smarthost.example::587 or                        │
 │ 192.168.254.254::2525). Colons in IPv6 addresses need to be doubled.      │
 │                                                                           │
 │ If the smarthost requires authentication, please refer to the             │
 │ Debian-specific README files in /usr/share/doc/exim4-base for notes       │
 │ about setting up SMTP authentication.                                     │
 │                                                                           │
 │ IP address or host name of the outgoing smarthost:                        │
 │                                                                           │
 │ smtp.ecn.purdue.edu______________________________________________________ │
 │                                                                           │
 │                    <Ok>                        <Cancel>                   │
 │
--------------------------------------------------------------------------------
smtp.ecn.purdue.edu
--------------------------------------------------------------------------------
 │ The headers of outgoing mail can be rewritten to make it appear to have   │
 │ been generated on a different system. If this option is chosen,           │
 │ 'ecn.purdue.edu', 'localhost' and '' in From, Reply-To, Sender and        │
 │ Return-Path are rewritten.                                                │
 │                                                                           │
 │ Hide local mail name in outgoing mail?                                    │
 │                                                                           │
 │                    <Yes>                       <No>
--------------------------------------------------------------------------------
Yes
--------------------------------------------------------------------------------
 The option to hide the local mail name in outgoing mail was enabled. It   │
 │ is therefore necessary to specify the domain name this system should use  │
 │ for the domain part of local users' sender addresses.                     │
 │                                                                           │
 │ Visible domain name for local users:                                      │
 │                                                                           │
 │ purdue.edu_______________________________________________________________ │
 │                                                                           │
 │                    <Ok>                        <Cancel>                   │
 │
--------------------------------------------------------------------------------
purdue.edu
--------------------------------------------------------------------------------
In normal mode of operation Exim does DNS lookups at startup, and when   │
  │ receiving or delivering messages. This is for logging purposes and       │
  │ allows keeping down the number of hard-coded values in the               │
  │ configuration.                                                           │
  │                                                                          │
  │ If this system does not have a DNS full service resolver available at    │
  │ all times (for example if its Internet access is a dial-up line using    │
  │ dial-on-demand), this might have unwanted consequences. For example,     │
  │ starting up Exim or running the queue (even with no messages waiting)    │
  │ might trigger a costly dial-up-event.                                    │
  │                                                                          │
  │ This option should be selected if this system is using Dial-on-Demand.   │
  │ If it has always-on Internet access, this option should be disabled.     │
  │                                                                          │
  │ Keep number of DNS-queries minimal (Dial-on-Demand)?                     │
  │                                                                          │
  │                    <Yes>                       <No>
--------------------------------------------------------------------------------
No
--------------------------------------------------------------------------------
Exim is able to store locally delivered email in different formats. The   │
 │ most commonly used ones are mbox and Maildir. mbox uses a single file     │
 │ for the complete mail folder stored in /var/mail/. With Maildir format    │
 │ every single message is stored in a separate file in ~/Maildir/.          │
 │                                                                           │
 │ Please note that most mail tools in Debian expect the local delivery      │
 │ method to be mbox in their default.                                       │
 │                                                                           │
 │ Delivery method for local mail:                                           │
 │                                                                           │
 │                     mbox format in /var/mail/                             │
 │                     Maildir format in home directory                      │
 │                                                                           │
 │                                                                           │
 │                    <Ok>                        <Cancel>
--------------------------------------------------------------------------------
mbox format in /var/mail/
--------------------------------------------------------------------------------
The Debian exim4 packages can either use 'unsplit configuration', a       │
 │ single monolithic file (/etc/exim4/exim4.conf.template) or 'split         │
 │ configuration', where the actual Exim configuration files are built from  │
 │ about 50 smaller files in /etc/exim4/conf.d/.                             │
 │                                                                           │
 │ Unsplit configuration is better suited for large modifications and is     │
 │ generally more stable, whereas split configuration offers a comfortable   │
 │ way to make smaller modifications but is more fragile and might break if  │
 │ modified carelessly.                                                      │
 │                                                                           │
 │ A more detailed discussion of split and unsplit configuration can be      │
 │ found in the Debian-specific README files in /usr/share/doc/exim4-base.   │
 │                                                                           │
 │ Split configuration into small files?                                     │
 │                                                                           │
 │                    <Yes>                       <No>                       │
--------------------------------------------------------------------------------
No
--------------------------------------------------------------------------------



More information about the Pkg-exim4-users mailing list