Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mutt attachment error

176 views
Skip to first unread message

Haines Brown

unread,
May 10, 2016, 11:10:04 AM5/10/16
to
I tried to use mutt to send someone a zip file of about 50 Mb and got
the error: "Error sending message, child exited 1 (). Could not send
message."

I assumed the attachment was too large and so went to
/etc/exim4/conf.d/main/02*/ and altered the configuration to be:

# Message size limit. The default (used when MESSAGE_SIZE_LIMIT
# is unset) is 50 MB
.ifdef MESSAGE_SIZE_LIMIT
# message_size_limit = MESSAGE_SIZE_LIMIT # I commented this line
message_size_limit = 200 MB # I added this line
.endif

I restarted exim, but it had no effect.

Haines

David Wright

unread,
May 10, 2016, 11:30:05 AM5/10/16
to
Isn't the Debian way to put

MESSAGE_SIZE_LIMIT=foo

into /etc/exim4/update-exim4.conf.conf and then run
# dpkg-reconfigure exim4-config

where foo should be, perhaps, 200M or why not just
200000000

You've obviously remembered the overhead for mime.
Pity your ISP! If your someone runs linux, you might try
man split.

Cheers,
David.

Brian

unread,
May 10, 2016, 11:50:05 AM5/10/16
to
On Tue 10 May 2016 at 10:28:24 -0500, David Wright wrote:

> On Tue 10 May 2016 at 11:07:47 (-0400), Haines Brown wrote:
> > I tried to use mutt to send someone a zip file of about 50 Mb and got
> > the error: "Error sending message, child exited 1 (). Could not send
> > message."
> >
> > I assumed the attachment was too large and so went to
> > /etc/exim4/conf.d/main/02*/ and altered the configuration to be:
> >
> > # Message size limit. The default (used when MESSAGE_SIZE_LIMIT
> > # is unset) is 50 MB
> > .ifdef MESSAGE_SIZE_LIMIT
> > # message_size_limit = MESSAGE_SIZE_LIMIT # I commented this line
> > message_size_limit = 200 MB # I added this line
> > .endif
> >
> > I restarted exim, but it had no effect.
>
> Isn't the Debian way to put
>
> MESSAGE_SIZE_LIMIT=foo
>
> into /etc/exim4/update-exim4.conf.conf and then run
> # dpkg-reconfigure exim4-config

I think it is necessary only to restart exim after altering the
file.

I use the split configuration and put directives in my own file
/etc/exim4/conf.d/main/00_custom_macros.

Sven Hartge

unread,
May 10, 2016, 11:50:06 AM5/10/16
to
David Wright <deb...@lionunicorn.co.uk> wrote:
> On Tue 10 May 2016 at 11:07:47 (-0400), Haines Brown wrote:

>> I tried to use mutt to send someone a zip file of about 50 Mb and got
>> the error: "Error sending message, child exited 1 (). Could not send
>> message."
>>
>> I assumed the attachment was too large and so went to
>> /etc/exim4/conf.d/main/02*/ and altered the configuration to be:
>>
>> # Message size limit. The default (used when MESSAGE_SIZE_LIMIT
>> # is unset) is 50 MB
>> .ifdef MESSAGE_SIZE_LIMIT
>> # message_size_limit = MESSAGE_SIZE_LIMIT # I commented this line
>> message_size_limit = 200 MB # I added this line
>> .endif
>>
>> I restarted exim, but it had no effect.

> Isn't the Debian way to put

> MESSAGE_SIZE_LIMIT=foo

> into /etc/exim4/update-exim4.conf.conf and then run
> # dpkg-reconfigure exim4-config

No, that won't work. You cannot just put stuff into
/etc/exim4/update-exim4.conf.conf and hope it will make it into the
configuration.

Grüße,
Sven.

--
Sigmentation fault. Core dumped.

Brian

unread,
May 10, 2016, 12:10:07 PM5/10/16
to
Didn't spot that; exim's .confs can be confusing. What file is used for
non-split configuration?

Sven Hartge

unread,
May 10, 2016, 2:00:06 PM5/10/16
to
The file /etc/exim4/update-exim4.conf.conf is the configuration file for
the configuration generator, not Exim4 itself.

> What file is used for non-split configuration?

Have a look at /usr/share/doc/exim4/README.Debian.gz, Section 2.1.3
"Using Exim Macros to control the configuration"

Everything is documented there and the following sections, on how to
expand or override the configuration system provided by the Exim4
maintainers.

Sven Hartge

unread,
May 10, 2016, 2:10:04 PM5/10/16
to
Of course it had no effect.

The code snippet above (before your edit) does the following:

If the Macro MESSAGE_SIZE_LIMIT is defined
set the config option message_size_limit to the contents of MESSAGE_SIZE_LIMIT

What you did was

If the Macro MESSAGE_SIZE_LIMIT is defined
set the config option message_size_limit to 200MB

Since MESSAGE_SIZE_LIMIT is normally undefined, the code does nothing in
both cases.

What you need to do is to revert you changes and define
MESSAGE_SIZE_LIMIT in a file called "/etc/exim4/exim4.conf.localmacros",
which will then get included in the autogenerated config file.

Please read /usr/share/doc/exim4/README.Debian.gz as everything is
documented in there.

Brian

unread,
May 10, 2016, 2:50:05 PM5/10/16
to
On Tue 10 May 2016 at 19:58:36 +0200, Sven Hartge wrote:

> Brian <ad...@cityscape.co.uk> wrote:
> > On Tue 10 May 2016 at 17:43:03 +0200, Sven Hartge wrote:
> >> David Wright <deb...@lionunicorn.co.uk> wrote:
> >>> Isn't the Debian way to put
>
> >>> MESSAGE_SIZE_LIMIT=foo
>
> >>> into /etc/exim4/update-exim4.conf.conf and then run
> >>> # dpkg-reconfigure exim4-config
> >>
> >> No, that won't work. You cannot just put stuff into
> >> /etc/exim4/update-exim4.conf.conf and hope it will make it into the
> >> configuration.
>
> > Didn't spot that; exim's .confs can be confusing.
>
> The file /etc/exim4/update-exim4.conf.conf is the configuration file for
> the configuration generator, not Exim4 itself.
>
> > What file is used for non-split configuration?
>
> Have a look at /usr/share/doc/exim4/README.Debian.gz, Section 2.1.3
> "Using Exim Macros to control the configuration"

/usr/share/doc/exim4-config/README.Debian.gz

or

/usr/share/doc/exim4-base/README.Debian.gz

on my system. (the "light" version of exim4).

> Everything is documented there and the following sections, on how to
> expand or override the configuration system provided by the Exim4
> maintainers.

You have jogged my memory as to why I have 00_custom_macros with my
split configuration of many years.

Charlie Kravetz

unread,
May 10, 2016, 3:30:06 PM5/10/16
to
Not meaning to send this to you, Brian, but I lost the previous message.

I would like to know that, too. Since /etc/exim4/update-exim4.conf.conf
has the following at the beginning:

# /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'

That would seem to me to be the way to make it work.

--
Charlie Kravetz
Linux Registered User Number 425914
[http://linuxcounter.net/user/425914.html]
Never let anyone steal your DREAM. [http://keepingdreams.com]

Brian

unread,
May 10, 2016, 3:50:06 PM5/10/16
to
On Tue 10 May 2016 at 12:56:47 -0600, Charlie Kravetz wrote:

> On Tue, 10 May 2016 17:03:47 +0100
> Brian <ad...@cityscape.co.uk> wrote:
> >
> >Didn't spot that; exim's .confs can be confusing. What file is used for
> >non-split configuration?
> >
>
> Not meaning to send this to you, Brian, but I lost the previous message.
>
> I would like to know that, too. Since /etc/exim4/update-exim4.conf.conf
> has the following at the beginning:

>From a previous Sven Hartge post

https://lists.debian.org/debian-user/2016/05/msg00426.html

you need to use "a file called "/etc/exim4/exim4.conf.localmacros",
which will then get included in the autogenerated config file". I've
not tried it but the advice looks kosher.

> # /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'
>
> That would seem to me to be the way to make it work.

/etc/exim4/update-exim4.conf.conf is for configuring how Debian's exim4
basically works for sending or receiving mail, not for setting exim4
specific parameters which modify the sending or receiving.

Mark Fletcher

unread,
May 10, 2016, 5:50:05 PM5/10/16
to
So where would you advocate putting, say, the IP address exim should listen on?

Mark

Haines Brown

unread,
May 11, 2016, 11:20:06 AM5/11/16
to
Sven, your recommendation much appreciated, but didn't altogether
clear up the situation.

I took a look at /usr/share/doc/exim4/README.Debian.gz and found that to
use a macro to change a default configuration value I need to define the
new value in a local configuration file. I have a non-split
configuration, and so it seems I must create a
/etc/exim4/exim4.conf.localmacros file.

The document says that if present this file is read before the
exim4.conf.template file. I don't understand. Wouldn't reading the
template file subsequently to it just overwrite my custom value with
the default value?

In this localmacros file it seems that I simply need the line
MESSAGE_SIZE_LIMIT=200MB to redefine maximum message size from the
default 50 MB to 200MB. I'm unsure of the syntax here. Is "MB"
acceptable? Need it be separated from the number by a space? The
document seems to say that for answers to such questions I should read
the Exim Specification 6.4. It does not tell me where this specification
is to be found.

Another point of confusion is that MESSAGE_SIZE_LIMIT is referred to as
a macro, but in context it seems more just a variable. To set a custom
value, do I have to write an entire macro from scratch, which seems
implied by the text, or merely set the value of a variable, which is
implied by the example?

I apologize for these elementary questions.

Haines Brown

Sven Hartge

unread,
May 11, 2016, 12:20:05 PM5/11/16
to
Haines Brown <hai...@histomat.net> wrote:

> I took a look at /usr/share/doc/exim4/README.Debian.gz and found that to
> use a macro to change a default configuration value I need to define the
> new value in a local configuration file. I have a non-split
> configuration, and so it seems I must create a
> /etc/exim4/exim4.conf.localmacros file.

Correct.

> The document says that if present this file is read before the
> exim4.conf.template file. I don't understand. Wouldn't reading the
> template file subsequently to it just overwrite my custom value with
> the default value?

If this where the case, the whole system the Exim4 DDs put in would be
pointless, wouldn't it?

It all is designed in such a way that you put your values into
/etc/exim4/exim4.conf.localmacros and the config-generator then puts it
all together, using your values.

> In this localmacros file it seems that I simply need the line
> MESSAGE_SIZE_LIMIT=200MB to redefine maximum message size from the
> default 50 MB to 200MB. I'm unsure of the syntax here. Is "MB"
> acceptable? Need it be separated from the number by a space? The
> document seems to say that for answers to such questions I should read
> the Exim Specification 6.4. It does not tell me where this specification
> is to be found.

The specification is here: /usr/share/doc/exim4/spec.txt.gz

Macros are defined as follows:

<name> = <rest of line>

As for the specific value for message_size_limit: You have to omit the
'B':

MESSAGE_SIZE_LIMIT = 200M

> Another point of confusion is that MESSAGE_SIZE_LIMIT is referred to
> as a macro, but in context it seems more just a variable. To set a
> custom value, do I have to write an entire macro from scratch, which
> seems implied by the text, or merely set the value of a variable,
> which is implied by the example?

MESSAGE_SIZE_LIMIT is a macro used by the Debian Exim4 configuration
system. It later gets put into the Exim4 config variable
"message_size_limit".

Depending on what config variable you want to set, you have to look into
the Debian-provided exim4.conf.template, if there is already code to
handle it and then set the appropriate macro to enable the Debian Exim4
config to work.

If not, you can just put the variable into the localmacro file (If it is a
global configuration option. Please see the spec.txt.gz to find out what
options are global.)

All that said: Mail and Exim4 is a complex topic and before you do
anything more involved you should know how everything works together.

Exim can power anything from a small leaf site to a large ISP with
multiple servers.

Only surpassed by sendmail, I think Exim4 is the most versatile
(opensource) MTA out there there. But this versatility comes at the cost
of a very complex configuration which can (and will) be overwhelming.

Depending on what your needs are, you may be better of with something
much simpler, like nullmailer. If you don't need local mail delivery for
local users and just shunt every mail out to a smarthost, then Exim4 is
overkill.

I myself have replaced Exim4 from nearly all my leaf servers (about 200
of them) with nullmailer, because those system don't need local mail and
the only mail on those systems is from Cron or logcheck anyway, which
just get sent to a central mailbox for us admins to read.

to...@tuxteam.de

unread,
May 11, 2016, 12:30:06 PM5/11/16
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

just a little note: "exim -bP" dumps all configuration items Exim
thinks it's seeing (after all Debian magic happened) So perhaps
for debugging you might try:

sudo exim -bP | grep size

which, on my box gives:

bounce_return_size_limit = 100K
header_line_maxsize = 0
header_maxsize = 1048576
message_size_limit = 50M

This might help you to decide whether to dig around in Debian's...
uh... magic or in Exim itself.

hth
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlczXcsACgkQBcgs9XrR2kbSnACeO1vt1U/7iZxDLbfKLAyAMuEv
e24An27jm6wGP/1kdv6O3m/J017uBtN9
=tnXx
-----END PGP SIGNATURE-----

Joe

unread,
May 11, 2016, 1:00:05 PM5/11/16
to
On Wed, 11 May 2016 11:12:26 -0400
Haines Brown <hai...@histomat.net> wrote:


>
> I took a look at /usr/share/doc/exim4/README.Debian.gz and found that
> to use a macro to change a default configuration value I need to
> define the new value in a local configuration file. I have a non-split
> configuration, and so it seems I must create a
> /etc/exim4/exim4.conf.localmacros file.
>
> The document says that if present this file is read before the
> exim4.conf.template file. I don't understand. Wouldn't reading the
> template file subsequently to it just overwrite my custom value with
> the default value?
>
> In this localmacros file it seems that I simply need the line
> MESSAGE_SIZE_LIMIT=200MB to redefine maximum message size from the
> default 50 MB to 200MB. I'm unsure of the syntax here. Is "MB"
> acceptable? Need it be separated from the number by a space? The
> document seems to say that for answers to such questions I should read
> the Exim Specification 6.4. It does not tell me where this
> specification is to be found.
>
> Another point of confusion is that MESSAGE_SIZE_LIMIT is referred to
> as a macro, but in context it seems more just a variable. To set a
> custom value, do I have to write an entire macro from scratch, which
> seems implied by the text, or merely set the value of a variable,
> which is implied by the example?
>

The reason that macros are used is the answer to your first question:
the macros are referred to and expanded at various points in the
exim.conf.template file. They are generally not macros in the
programming sense, in terms of being entire functions, they are simply
labels which are replaced by values, normally fairly simple values.
Often they are switches to enable an optional feature.

Here's my mail server local macros:

CHECK_RCPT_LOCAL_ACL_CODE = "/etc/exim4/banned_countries"
CHECK_MAIL_HELO_ISSUED = yes
SMTP_ACCEPT_MAX_PER_HOST = 3
CHECK_RCPT_VERIFY_SENDER = yes
CHECK_RCPT_REVERSE_DNS = yes
MAIN_LOG_SELECTOR = +ident_timeout +smtp_confirmation +smtp_connection

If you search exim.conf.template, you will find all these labels. They
will be contained in .ifdef...endif statements to check whether they
exist already, and will usually be assigned default values if not found.

The template file is also pretty much a man page, with a lot of
comments. You can go through it, look at the macro labels and mostly see
what you need to put in your local macro to override the default. One
exception is, as it happens, MESSAGE_SIZE_LIMIT which is referenced but
does not set a default, so you can't see the syntax you need, but Sven
has answered that one.

--
Joe

Brian

unread,
May 11, 2016, 1:40:04 PM5/11/16
to
On Wed 11 May 2016 at 18:28:59 +0200, to...@tuxteam.de wrote:

> just a little note: "exim -bP" dumps all configuration items Exim
> thinks it's seeing (after all Debian magic happened) So perhaps
> for debugging you might try:
>
> sudo exim -bP | grep size
>
> which, on my box gives:
>
> bounce_return_size_limit = 100K
> header_line_maxsize = 0
> header_maxsize = 1048576
> message_size_limit = 50M
>
> This might help you to decide whether to dig around in Debian's...
> uh... magic or in Exim itself.

No need to have root privileges:

/usr/sbin/exim -bP message_size_limit

David Wright

unread,
May 11, 2016, 4:00:05 PM5/11/16
to
Yes, I chose the wrong file. Hope doesn't come into it:
dpkg-reconfigure exim4-config sees to that.

I think it's quite unusual for there not to be any stub file provided
by Debian. In fact, it'd be quite useful in this case as
/etc/exim4/exim4.conf.localmacros could reiterate the fact that it's
only for unsplit configuration, and
/etc/exim4/conf.d/main000_localmacros could ditto for split.

BTW when will dpkg-reconfigure exim4-config either stop saying
"hostname --fqdn did not return a fully qualified name, dc_minimaldns will not
work. Please fix your /etc/hosts setup." or suggest a reasonable fix?
Or IOW, why has bug #504427 never even received acknowledgment?

Cheers,
David.

Brian

unread,
May 12, 2016, 6:40:05 AM5/12/16
to
On Wed 11 May 2016 at 14:51:31 -0500, David Wright wrote:

> On Tue 10 May 2016 at 17:43:03 (+0200), Sven Hartge wrote:
> > David Wright <deb...@lionunicorn.co.uk> wrote:
> > > Isn't the Debian way to put
> >
> > > MESSAGE_SIZE_LIMIT=foo
> >
> > > into /etc/exim4/update-exim4.conf.conf and then run
> > > # dpkg-reconfigure exim4-config
> >
> > No, that won't work. You cannot just put stuff into
> > /etc/exim4/update-exim4.conf.conf and hope it will make it into the
> > configuration.
>
> Yes, I chose the wrong file. Hope doesn't come into it:
> dpkg-reconfigure exim4-config sees to that.
>
> I think it's quite unusual for there not to be any stub file provided
> by Debian. In fact, it'd be quite useful in this case as
> /etc/exim4/exim4.conf.localmacros could reiterate the fact that it's
> only for unsplit configuration, and
> /etc/exim4/conf.d/main000_localmacros could ditto for split.

That idea might be worth floating at

http://lists.alioth.debian.org/mailman/listinfo/pkg-exim4-users

(Coincidence: the May 2016 Archives have a discussion on the same topic
as this thread).

> BTW when will dpkg-reconfigure exim4-config either stop saying
> "hostname --fqdn did not return a fully qualified name, dc_minimaldns will not
> work. Please fix your /etc/hosts setup." or suggest a reasonable fix?
> Or IOW, why has bug #504427 never even received acknowledgment?

It will stop, I suppose, when the user has a correct 127.0.1.1 line in
/etc/hosts.

It's impossible to answer your final question. Maybe the maintainers and
other readers of the report were busy.

David Wright

unread,
May 12, 2016, 11:20:04 AM5/12/16
to
On Thu 12 May 2016 at 11:33:10 (+0100), Brian wrote:
> On Wed 11 May 2016 at 14:51:31 -0500, David Wright wrote:
> > On Tue 10 May 2016 at 17:43:03 (+0200), Sven Hartge wrote:
> > > David Wright <deb...@lionunicorn.co.uk> wrote:
> > > > Isn't the Debian way to put
> > >
> > > > MESSAGE_SIZE_LIMIT=foo
> > >
> > > > into /etc/exim4/update-exim4.conf.conf and then run
> > > > # dpkg-reconfigure exim4-config
> > >
> > > No, that won't work. You cannot just put stuff into
> > > /etc/exim4/update-exim4.conf.conf and hope it will make it into the
> > > configuration.
> >
> > Yes, I chose the wrong file. Hope doesn't come into it:
> > dpkg-reconfigure exim4-config sees to that.
> >
> > I think it's quite unusual for there not to be any stub file provided
> > by Debian. In fact, it'd be quite useful in this case as
> > /etc/exim4/exim4.conf.localmacros could reiterate the fact that it's
> > only for unsplit configuration, and
> > /etc/exim4/conf.d/main000_localmacros could ditto for split.
>
> That idea might be worth floating at
>
> http://lists.alioth.debian.org/mailman/listinfo/pkg-exim4-users
>
> (Coincidence: the May 2016 Archives have a discussion on the same topic
> as this thread).

That is a pretty remarkable coincidence. And a further cause to have
stub files, with a warning about the terminating newline while their
script is broken. (crontab suffers from the same problem. A correct
way to write such a script is demonstrated by /etc/init.d/kmod's
reading of /etc/modules. I always add a blank comment line to my
configuration files anyway.)

> > BTW when will dpkg-reconfigure exim4-config either stop saying
> > "hostname --fqdn did not return a fully qualified name, dc_minimaldns will not
> > work. Please fix your /etc/hosts setup." or suggest a reasonable fix?
> > Or IOW, why has bug #504427 never even received acknowledgment?
>
> It will stop, I suppose, when the user has a correct 127.0.1.1 line in
> /etc/hosts.

That just begs the question as to what is correct. Refer to:
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution
and check mine over:

$ cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat
group: compat
shadow: compat
gshadow: files

hosts: files mdns4_minimal [NOTFOUND=return] dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
$ cat /etc/host.conf
multi on
$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by
resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.1
$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 alum
192.168.1.1 router

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
$ cat /etc/hostname
alum
$

All my hosts are set up the same way. /etc/hosts has shrunk somewhat
since reading https://lists.debian.org/debian-user/2016/03/msg01291.html
Note that the router does not resolve DNS queries even though it runs
the dhcp server; it just passes them on to the Internet.

On the broken-wifi laptop that uses a USD dongle, there's no
perceptible delay whether or not the dongle is plugged in when exim
starts up. So I've never been sure which part of dc_minimaldns='true'
doesn't work.

> It's impossible to answer your final question. Maybe the maintainers and
> other readers of the report were busy.

Cheers,
David.

Brian

unread,
May 12, 2016, 3:40:05 PM5/12/16
to
On Thu 12 May 2016 at 10:08:49 -0500, David Wright wrote:

> On Thu 12 May 2016 at 11:33:10 (+0100), Brian wrote:
> > On Wed 11 May 2016 at 14:51:31 -0500, David Wright wrote:
> > >
> > > BTW when will dpkg-reconfigure exim4-config either stop saying
> > > "hostname --fqdn did not return a fully qualified name, dc_minimaldns will not
> > > work. Please fix your /etc/hosts setup." or suggest a reasonable fix?
> > > Or IOW, why has bug #504427 never even received acknowledgment?
> >
> > It will stop, I suppose, when the user has a correct 127.0.1.1 line in
> > /etc/hosts.
>
> That just begs the question as to what is correct. Refer to:
> https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution

The -devel thread referred to in #719621 is worth reading. There was no
consensus in it to support the suggestion that 127.0.0.1 is better than
127.0.1.1. The history of resolving local host/domainname goes back many
years and what we have now does just work. For now, the "correct way" is
the present way.

> and check mine over:

Nothing I say is meant to imply I have a deep knowledge of networking on
Debian. :)

[Configuration files snipped]

My nsswitch and hosts.conf are identical to yours and resolv.conf only
differs on this machine in the IP used. The difference is in /etc/hosts.
Mine is

127.0.0.1 localhost
127.0.1.1 desktop.lan desktop

The hosts manual says:

For each host a single line should be present with the following
information:

IP_address canonical_hostname [aliases...]

My canonical hostname is "desktop.lan" and it has the alias "desktop",
the hostname of the machine. 'hostname --fqdn' gives

desktop.lan

because the files method of nsswitch.conf matches the hostname with the
canonical hostname. Exim is happy with this because the fqdn has at
least one dot in it.

You have

127.0.0.1 localhost
127.0.1.1 alum

so the canonical hostname is alum. I'd expect 'hostname --fqdn' to have
no dots in it, so it is not a fully qualified name. Exim will not like
this if you want dc_minimaldns as "Yes".

You can view my "desktop.lan" as being made up (it needn't be) but it
satisfies Exim, as would anything.anything for the canonical hostname.

For Exim and minimaldns the question is

Does the hostname resolve to a fqdn (something with a dot in it)?

127.0.1.1 alum.anything_you_want alum

would do this.

Having said this it as well to realise Exim will HELO to a remote host
with "alum.anything_you_want". Some misguided hosts will deny contact
because there is no reverse lookup which satisfies them. ISP smarthosts
are generally very forgiving (they have to be!) so this is generally not
a problem with sending mail through them.

Haines Brown

unread,
May 13, 2016, 7:20:05 AM5/13/16
to
I'm still having no luck increasing maximum attachment size.

I create file: /etc/exim4/exim4.conf.localmacros
I leave it default permissions: -rw-r--r-- 1 root root
It has a single line: MESSAGE_SIZE_LIMIT = 200M
followed by CR.
And I restart exim: # invoke-rc.d exim4 reload

But:

# exim -bP | grep size

David Wright

unread,
May 13, 2016, 9:40:05 AM5/13/16
to
On Fri 13 May 2016 at 07:10:02 (-0400), Haines Brown wrote:
> I'm still having no luck increasing maximum attachment size.
>
> I create file: /etc/exim4/exim4.conf.localmacros
> I leave it default permissions: -rw-r--r-- 1 root root
> It has a single line: MESSAGE_SIZE_LIMIT = 200M
> followed by CR.

That's all correct (for unsplit configurations) †.

> And I restart exim: # invoke-rc.d exim4 reload

But you haven't reconfigured exim yet. As I pointed out,
the Debian way to do that is:

# dpkg-reconfigure exim4-config

and that will *also* look after restarting exim in the
appropriate way for your system.

† I think it's good practice to put a comment line at the
end of the file. You wrote that you put a CR at the end,
but it's more likely to be a LF. Put a comment line, and
then you know (and can *see*) the problem is taken care of.

Cheers,
David.

Sven Hartge

unread,
May 13, 2016, 9:50:04 AM5/13/16
to
David Wright <deb...@lionunicorn.co.uk> wrote:
> On Fri 13 May 2016 at 07:10:02 (-0400), Haines Brown wrote:
>> I'm still having no luck increasing maximum attachment size.
>>
>> I create file: /etc/exim4/exim4.conf.localmacros
>> I leave it default permissions: -rw-r--r-- 1 root root
>> It has a single line: MESSAGE_SIZE_LIMIT = 200M
>> followed by CR.

> That's all correct (for unsplit configurations) †.

>> And I restart exim: # invoke-rc.d exim4 reload

> But you haven't reconfigured exim yet. As I pointed out,
> the Debian way to do that is:

> # dpkg-reconfigure exim4-config

> and that will *also* look after restarting exim in the
> appropriate way for your system.

No need to do this. The init-script will regenerate the configuration on
every start, restart and reload.


Sven Hartge

unread,
May 13, 2016, 9:50:05 AM5/13/16
to
Please post the first 20 lines of /var/lib/exim4/config.autogenerated.
Please also do a "ls -al /var/lib/exim4/" and "stat
/var/lib/exim4/config.autogenerated" and post the results.

Ron Leach

unread,
May 13, 2016, 1:10:04 PM5/13/16
to
On 13/05/2016 12:10, Haines Brown wrote:
> I'm still having no luck increasing maximum attachment size.
>
> I create file: /etc/exim4/exim4.conf.localmacros
> I leave it default permissions: -rw-r--r-- 1 root root
> It has a single line: MESSAGE_SIZE_LIMIT = 200M
> followed by CR.

I am no expert on line endings, but I had thought, and this wikipedia
site

https://en.wikipedia.org/wiki/Newline

suggests, that the line ending that *should* be used in Linux is
x 0A (LF line feed), not
x 0D (CR)

If your autogenerated file shows the MESSAGE_SIZE_LIMIT = 200M
followed immediately by <##################> then the exim system
(possibly) doesn't like the CR line ending.

[That was the advice given me on the debian-exim list earlier this
month, where I had posted a similar question. Brian has already
mentioned that thread in an earlier message.]

Perhaps someone who knows for sure what the line-endings ought to be
could chime in.

regards, Ron

Brian

unread,
May 13, 2016, 1:10:05 PM5/13/16
to
It appears from another mail

https://lists.debian.org/debian-user/2016/05/msg00565.html

that you are *not* using Exim's non-split configuration.

David Wright

unread,
May 17, 2016, 1:40:04 PM5/17/16
to
On Thu 12 May 2016 at 20:38:41 (+0100), Brian wrote:
> On Thu 12 May 2016 at 10:08:49 -0500, David Wright wrote:
> > On Thu 12 May 2016 at 11:33:10 (+0100), Brian wrote:
> > > On Wed 11 May 2016 at 14:51:31 -0500, David Wright wrote:
> > > > BTW when will dpkg-reconfigure exim4-config either stop saying
> > > > "hostname --fqdn did not return a fully qualified name, dc_minimaldns will not
> > > > work. Please fix your /etc/hosts setup." or suggest a reasonable fix?
> > > > Or IOW, why has bug #504427 never even received acknowledgment?
> > >
> > > It will stop, I suppose, when the user has a correct 127.0.1.1 line in
> > > /etc/hosts.
> >
> > That just begs the question as to what is correct. Refer to:
> > https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution
>
> The -devel thread referred to in #719621 is worth reading. There was no
> consensus in it to support the suggestion that 127.0.0.1 is better than
> 127.0.1.1. The history of resolving local host/domainname goes back many
> years and what we have now does just work. For now, the "correct way" is
> the present way.

I'm quite happy to accept whatever Debian decides on in this regard
and presumably $ hostname is always going to make the appropriate
choice of source for the hostname. It's only the domainname that was
worrying me.

> My canonical hostname is "desktop.lan" and it has the alias "desktop",
> the hostname of the machine. 'hostname --fqdn' gives
>
> desktop.lan
>
> because the files method of nsswitch.conf matches the hostname with the
> canonical hostname.

But I would prefer not to have a domain tagged on the end if it's made
up. I don't want to use my own domain as the one thing it *doesn't* do
is resolve to my home network; it's even on a different continent.
With the expansion in TLDs, almost nothing is safe. The best I could
find was .localhost IF I'm interpreting RFCs 2606 and 6761 correctly.

So I might try setting that up at some time. Unlike the last change
you suggested (resolving hosts through avahi rather than /etc/hosts)
which I could do piecemeal, this probably has to be networkwide.

> For Exim and minimaldns the question is
>
> Does the hostname resolve to a fqdn (something with a dot in it)?
>
> 127.0.1.1 alum.anything_you_want alum
>
> would do this.

I haven't worked out why exim needs hostname --fqdn to resolve to a
dotty name. After all, it knows that your desktop.lan isn't really a
routable internet address just by its IP number.

> Having said this it as well to realise Exim will HELO to a remote host
> with "alum.anything_you_want". Some misguided hosts will deny contact
> because there is no reverse lookup which satisfies them. ISP smarthosts
> are generally very forgiving (they have to be!) so this is generally not
> a problem with sending mail through them.

That issue is covered by setting helo_data, which has the advantage
that it can be evaluated at the time it's used, so you can tailor it
to each and every host you use.

All that said, my beef is with the message. There doesn't appear to be
any deleterious effect, at least at present. I suspect there was, but
it's too long ago to remember; maybe a dozen years or more since
Starting MTA used to hang.

Cheers,
David.

Brian

unread,
May 17, 2016, 7:10:04 PM5/17/16
to
On Tue 17 May 2016 at 12:32:33 -0500, David Wright wrote:

> On Thu 12 May 2016 at 20:38:41 (+0100), Brian wrote:
>
> > For Exim and minimaldns the question is
> >
> > Does the hostname resolve to a fqdn (something with a dot in it)?
> >
> > 127.0.1.1 alum.anything_you_want alum
> >
> > would do this.
>
> I haven't worked out why exim needs hostname --fqdn to resolve to a
> dotty name. After all, it knows that your desktop.lan isn't really a
> routable internet address just by its IP number.

I'm not too sure being a routeable address is of significance to Exim.
If it isn't, I do not know why.

I'm going to stick with the advice to have a fqdn in /etc/hosts. It
works for me with Exim.

http://lists.alioth.debian.org/pipermail/pkg-exim4-users/2008-April/001328.html

I am very reluctant to give a "Unix administration course" in a
warning printed by an arbitrary tool. This usually leads to people not
reading the text because it's longer than two lines.

The correct answer would of course be "have an FQDN in the 127.0.1.1
line in /etc/hosts" for the majority of Debian systems.

http://lists.alioth.debian.org/pipermail/pkg-exim4-users/2008-April/001326.html

dc_minimaldns works by virtue of hardcoding the output of "hostname
--fqdn" into the primary_hostname configuration option by
update-exim4.conf, thus at package configuration time.
update-exim4.conf silently does not set primary_hostname if hostname
--fqdn's output does not at least contain one dot, effectively
rendering dc_minimaldns invalid.

I think primary_hostname is at the root of this.

> > Having said this it as well to realise Exim will HELO to a remote host
> > with "alum.anything_you_want". Some misguided hosts will deny contact
> > because there is no reverse lookup which satisfies them. ISP smarthosts
> > are generally very forgiving (they have to be!) so this is generally not
> > a problem with sending mail through them.

> That issue is covered by setting helo_data, which has the advantage
> that it can be evaluated at the time it's used, so you can tailor it
> to each and every host you use.

Tried this in the past. It worked. Having no need for tailoring I
returned to using /etc/hosts for the HELO.
0 new messages