[Vmail-discuss] Vmail, exim local_domains, bouncing local users
Paul Warren
pdw@xxxxxxxxxxxxx
Wed, 17 Oct 2001 17:14:33 +0100
On Wed, Oct 17, 2001 at 09:03:55AM -0700, Caleb Crome wrote:
> I'm using vmail-sql, which is quite nifty. However, I have a
> comment and a problem.
>
> First the comment. You don't mention the 'local_domains' parameter in
> your README about the exim configuration. I think you should tell the
> user that each virtual domain needs to be in the local_domains list.
> To that end, it might as well be a mysql lookup, so you don't have to
> maintain different lists.
Yep - good point, I'll note this in the next release.
We do it like this:
LOCAL_ALIASES = /etc/mail/local_aliases
Tha file consists of a list of (non-virtual) names for our machine. We
then have:
local_domains = "LOCAL_ALIASES:\
mysql;select domain_name from domain where domain_name = '$key':\
mysql;select alias from domain_alias where alias = '$key'"
> Now, for my problem:
>
> How do I prevent local delivery of mail to a virtual domain to an
> email address that has a local part that matches a local user, but
> doesn't match any user in the domain?
>
> For example, I have a local host, named localhost.com, and a virtual
> host called virtualhost.com. I have a local user named 'caleb'.
> There is no 'caleb' user in virtualhost.com, nor is there a default
> for virtualhost.com. Mail to caleb@localhost.com should be delivered
> locally, but mail to caleb@virtualhost.com should be bounced. With
> the current set up, mail to caleb@virtualhost.com is being delivered
> locally, which is a bad thing.
With the above, add:
domains = LOCAL_ALIASES
for all your local delivery directors. This should fix your problem.
I will ensure that the sample Exim config is improved for the next
release - thanks for the feedback.
Paul