Hi Matt,
Exim uses setuid/setgid (or whatever) when delivering e-mails,
that's why the owner of the email file is always the user to which
it belongs. That's also why it can access directories with access
restrictions for group or world.
If you set `$mailroot = "/home/mailmgr/domains/"`, and this
directory does not exist, or is not accessible to the web server
(e.g. /home/mailmgr/ has 0700 as its mask), you get the error
during domain creation. You have two options to get rid of the
error: you can either let the web server check for existence of
$mailroot (by changing directory masks appropriately), or disable
this check in the config file, taking the responsibility to make
sure it is valid onto yourself. Like I explained in #71 and #75,
the reason why this check exists is to prevent creating domains
with invalid configuration (e.g. creating
example.org domain with
a patch of /var/vmail/
example.org, where /var/vmail does not even
exist and will not be created by Exim, because /var is only
writable by root). Again, this check can be disabled in the
config, and it might be the right approach to take in your
situation.
The welcome mail is certainly not a requirement, but it's being
sent using the standard mail() call AFTER the domain is created,
so if creation fails, it fails before that. This message isn't
really necessary, but, like Udera wrote, it helps you see whether
or not your setup works, because if it does, Exim will create the
necessary directory structure when delivering this e-mail to its
recipient. If you have created a domain successfully, but don't
see its directory a few seconds (or a minute) later, this is a
good indication that something is not right, and you should go
check Exim logs.
Regards,
Rimas