Mailing List Archive

Virtual mailboxes not working on new install.
Firstly, please forgive me for not having investigated deeper. Although
it's old I haven't touched my exim4 installation for years and am
therefore effectively a complete exim4 newbie. I'm really just asking
for pointers to how to debug this.

I've run exim4 (and maybe its predecessors) for about 15 years on a VM
hosting platform. All that time ago I set up a virtual mailbox config
(so that the maildir is under <domain-name>/<username>). Has worked
well for all that time.

I'm now in the process of migrating to a new server. I've installed a
new exim4 on the new box, copied over /etc/exim4, exim4/aliases and the
entire mail dir structure under /var/mail. I also ran dpkg-reconfigure
exim4-config on both servers to check they were the same.

After adjusting the IP address and file ownerships it starts up and I
can relay mails that I sent by SMTP on a local terminal.

But when I send them to myself (i.e. to a configured user and domain)
the mails are getting accepted by exim4 without errors, but appended to
a file /var/mail/<username> and not put into the virtual maildirs as
configured.

One obvious difference is that the new exim4 is accepting mails to my
domain, but I can only send from localhost as currently the domain's MX
record points to the old server.

Apart from that, the old server is running Exim4 ver 4.84_2 #2 under
Debian 8 and the new one is running 4.92 #5 under Debian 10.

Also, the new install is logging "No server certificate defined; will
use a selfsigned one". I can't find a certificate for exim4 on the old
install though it doesn't give this error, so I wonder if this is a new
check.

So - apologies again for not looking further, beyond checking for
logged errors and searching in this mailing list. As I say, if you can
just give some pointers (e.g. how to increase logging verbosity) I'll
happily try them and report back.




--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Virtual mailboxes not working on new install. [ In reply to ]
I ran exim -d -bt adrian@domain.org
(won't append the results here but can if useful)

This seems to resolve adrian@domain.org to ... adrian@domain.org. So
nothing obvious to learn from there I guess.

The only config that seems to be responsible for the desired behaviour
(that I'm seeing in the old server) is in
router/360_exim4-local_vdom_aliases

which contains, in the vdom_aliases clause:
data =
${expand:${lookup{$local_part}lsearch*@{/etc/exim4/virtual/$domain}

and in the vdom_aliases_maildir clause:
data = /var/mail/virtual/$domain/$local_part/

This config is present in the new server but that's not happening.
Instead, what I AM seeing happen - i.e. appending to a MH file
in /var/mail/$local_part

seems to be configured in the file transport/30_exim4-config_mail_spool:

mail_spool:
debug_print = "T: appendfile for $local_part@$domain"
driver = appendfile
file = /var/mail/$local_part

which is present in the old and new configs.

So the old server does the router/360_exim4-local_vdom_aliases way, and
the new server silently ignores it and does the
transport/30_exim4-config_mail_spool way

I note that "vdom_aliases" doesn't appear anywhere in the latest exim4
spec, so I suspect that it has been obsoleted.

So maybe what I'm asking is for some simple documentation with examples
of how to set up the same behaviour under exim4 ver 4.92

Many thanks

Adrian

On Fri, 22 Jan 2021 14:04:49 +0000 Adrian <adrian@aeolian.org.uk> wrote:

> Firstly, please forgive me for not having investigated deeper.
> Although it's old I haven't touched my exim4 installation for years
> and am therefore effectively a complete exim4 newbie. I'm really just
> asking for pointers to how to debug this.
>
> I've run exim4 (and maybe its predecessors) for about 15 years on a VM
> hosting platform. All that time ago I set up a virtual mailbox config
> (so that the maildir is under <domain-name>/<username>). Has worked
> well for all that time.
>
> I'm now in the process of migrating to a new server. I've installed a
> new exim4 on the new box, copied over /etc/exim4, exim4/aliases and
> the entire mail dir structure under /var/mail. I also ran
> dpkg-reconfigure exim4-config on both servers to check they were the
> same.
>
> After adjusting the IP address and file ownerships it starts up and I
> can relay mails that I sent by SMTP on a local terminal.
>
> But when I send them to myself (i.e. to a configured user and domain)
> the mails are getting accepted by exim4 without errors, but appended
> to a file /var/mail/<username> and not put into the virtual maildirs
> as configured.
>
> One obvious difference is that the new exim4 is accepting mails to my
> domain, but I can only send from localhost as currently the domain's
> MX record points to the old server.
>
> Apart from that, the old server is running Exim4 ver 4.84_2 #2 under
> Debian 8 and the new one is running 4.92 #5 under Debian 10.
>
> Also, the new install is logging "No server certificate defined; will
> use a selfsigned one". I can't find a certificate for exim4 on the
> old install though it doesn't give this error, so I wonder if this is
> a new check.
>
> So - apologies again for not looking further, beyond checking for
> logged errors and searching in this mailing list. As I say, if you
> can just give some pointers (e.g. how to increase logging verbosity)
> I'll happily try them and report back.
>
>
>

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Virtual mailboxes not working on new install. [ In reply to ]
On 22/01/2021 18:39, Adrian via Exim-users wrote:
> I note that "vdom_aliases" doesn't appear anywhere in the latest exim4
> spec, so I suspect that it has been obsoleted.

It's not an Exim thing and never has been.
It's probably a thing specific to the config you are running.

> So maybe what I'm asking is for some simple documentation with examples
> of how to set up the same behaviour under exim4 ver 4.92

The project documentation is at http://exim.org/docs.html
However, you seem to be running a Debian-derived installation -
and they have a whole complex configuration. You may be better
off asking in a Deb-specific forum.

If you want to start from scratch, you could either run the Debian
configuration script (I don't know if it supports your needs, but
it's not unlikely) - or wipe all your config and develop one from
scratch.

Exim has extensive debug output possibilities, either from commandline
options or triggered by the config. See the docs.

On the certificate message: yes, it's a new check. But the lack of
a cert means that you weren't successfully running TLS with Exim in
server mode before.

--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Virtual mailboxes not working on new install. [ In reply to ]
Many thanks Jeremy

Apologies for the wrong threading and delay in responding, I'm not
getting list replies as direct mails.

That explains a lot! I must have found someone's suggested config and
adapted that, when I set it up fifteen years ago.

I'm using the Debian split config, and would probably be better to
reconfigure and choose the single-file format. But I suspect the
Debian version is different in other ways beyond that. The Debian exim
forum (or the only one I found) seems to be pretty dead and all in
German.

It would make sense to start from scratch on the new server. May I put
down my requirements here and ask for suggestions e.g. existing example
configs?

What I currently have and need to replicate is as follows.
I have two local domains I receive mails for. I use /etc/aliases, and
also files for each domain of the form /etc/exim4/virtual/<domain>
which contain redirects for all valid users. Each valid mail ends up
in one of four Maildirs, under /var/mail/virtual/local though I'm told
that path is now tainted. I can change the path to whatever would be
valid, so long as it doesn't have to be a Linux user's home dir, as one
of my users is virtual and has no entry in /etc/passwd and no home dir.
(Though I can create one if I have to.)

/etc/aliases and the domain files have some lines which pipe mails for
certain users to scripts that handle them. This is the way I create my
own basic mailing lists though they go as plaintext not SSL or TLS and
might now be better handled a different way.

Thanks!

Adrian

>>It's not an Exim thing and never has been.
It's probably a thing specific to the config you are running.

> So maybe what I'm asking is for some simple documentation with examples
> of how to set up the same behaviour under exim4 ver 4.92

>>The project documentation is at http://exim.org/docs.html
However, you seem to be running a Debian-derived installation -
and they have a whole complex configuration. You may be better
off asking in a Deb-specific forum.

>>If you want to start from scratch, you could either run the Debian
configuration script (I don't know if it supports your needs, but
it's not unlikely) - or wipe all your config and develop one from
scratch.

>>Exim has extensive debug output possibilities, either from commandline
options or triggered by the config. See the docs.

>>On the certificate message: yes, it's a new check. But the lack of
a cert means that you weren't successfully running TLS with Exim in
server mode before.

>>--
>>Cheers,
>>Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Virtual mailboxes not working on new install. [ In reply to ]
I'd say that your needs are complex enough that you should run a fully
custom config. The example one in the project source distribution is
a reasonable place to start - but you will be radically adding to it.
For that you need to understand how Exim works, and what parts of
the config do in broad terms, and what details of the config syntax
provide you with what facilities.

You need to read the documentation.
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Virtual mailboxes not working on new install. [ In reply to ]
Hi!

> What I currently have and need to replicate is as follows.

Have a look at https://exim4u.org/, it should cover this.

I have not tested it, but the project looks alive enough to
be usable.

--
pi@opsec.eu +49 171 3101372 Now what ?

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Virtual mailboxes not working on new install. [ In reply to ]
Thanks Jeremy

The current situation is that I'm in the middle of a server migration
from a quirky fifteen-year-old one to a hopefully much cleaner one.
Lots to migrate and troubleshoot.

The situation with exim4 is that it still works, albeit still using my
homebrew pipe transport script. Using that happily gets past any taint
problems too. I need to enable TLS certs, but that must wait till I
have Letsencrypt certificate signing on my new server.

I thought I'd found some documentation that hopefully will start from
concepts, cover the structure of the config files and end with
practical examples. But I've lost it again*. In the meantime I'll
migrate with my clunky but working system, and when things have died
down I'll read up the principles of exim4, and also the way Debian
messes around with it, with a view to recreating a clean install.

Thanks to all, especially Odhiambo Washington who has sent me a lot of
help offlist.

Adrian

*no, found in the github Wiki.

On 2021-01-24 14:08, Jeremy Harris wrote:
> I'd say that your needs are complex enough that you should run a fully
> custom config. The example one in the project source distribution is
> a reasonable place to start - but you will be radically adding to it.
> For that you need to understand how Exim works, and what parts of
> the config do in broad terms, and what details of the config syntax
> provide you with what facilities.
>
> You need to read the documentation.
> --
> Cheers,
> Jeremy
>
>

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/