Hi,

I have a few questions regarding redirection of mail with aliases and
virtual domains. Sometimes there are incoming messages which have the
actual FQDN of the machine as recipient, although they were sent to a
virtual domain.

I have the following setup:

- The machine has the FQDN foo.ext.bar.baz ($myhostname = foo.ext.bar.baz).

- It is supposed to be the final destination for bar.baz (not virtual,
$mydomain = bar.baz)

- There are two virtual domains it is also supposed to be the final
destination for, let's say beer.org and curry.org

- There are following entries in the virtual alias table:

        realu...@curry.org              bob
        b...@curry.org                  bob
        anotherrealu...@beer.org        alice
        al...@beer.org                  alice
        k...@beer.org                   kitty
        aliasu...@beer.org              kitty

- bob and alice are, you guessed it, real users on the system, recorded
in /etc/passwd et al.

- kitty is a real user and also has an entry in /etc/aliases:

        kitty:  some...@anywhere.org

so everything to ki...@beer.org and k...@beer.org should be redirected to
sosme...@anywhere.org, at least that's the plan.

Now, the problem is, that mails addressed to aliasu...@beer.org are
sometimes rejected. Not always, but just sometimes. It seems as the
messages are  not addressed to aliasu...@beer.org, but to
aliasu...@foo.ext.bar.baz. Postfix logs the following when rejecting
said message:

Jan 27 23:40:22 lxcisc postfix/smtpd[5029]: NOQUEUE: reject: RCPT from
sendingmta.fqdn.tld[a:b:c:d::e]: 550 5.1.1 <aliasu...@foo.ext.bar.baz>:
Recipient address rejected: User unknown in local recipient table;
from=<sen...@somwhereelse.org> to=<aliasu...@foo.ext.bar.baz>
proto=ESMTP helo=<sendingmta.fqdn.tld>

which is totally understandable, since aliasuser is not an actual user
on the system nor an entry in /etc/aliases, so it would also be unknown
with aliasuser@$mydomain.

My questions are: Who resolves to the address aliasu...@foo.ext.bar.baz?
If it is my MTA, how can I stop it from doing that? If it is the sending
MTA, how does it come to that conclusion? Is IPv6 an issue here?

I have verified that the MX record for beer.org is set to
foo.ext.bar.baz. Well, actually it is set to foo.bar.baz, which is a
CNAME to foo.ext.bar.baz (Yes, it is a mess, but the plan is to get rid
of the ext.bar.baz subdomain sooner or later). The machine is running
CentOS 6.4, Postfix Version is 2.6.6.

I have now, as a countermeasuer, defined in /etc/aliases:

        aliasuser: some...@anyhere.org

which I hope helps to receive all the mail and redirect it approriately.
But I don't know if that's really helping. Neither do I understand the
actual issue here.

Sorry if the description of the problem is a bit messy. If anyone has a
pointer for me, it would be greatly appreciated.

Cheers, Johannes

-- 
Johannes von Rotz
Bachmannweg 11
8046 Zuerich
+41 79 705 23 96

Reply via email to