I have installed Ubuntu Linux 10.04 with package postfix 2.8.5-2~build0.10.04.
I have configured postfix to send email through my ISP and this works fine: I can open mutt
and send an email to an external address (e.g. google) and the email is delivered correctly.
The next thing I wanted to do was to define a mapping so that if I send a local email, it is delivered to my address which has the form:
[email protected]
In order to do this, I followed the postfix documentation and configured postfix as follows:
/etc/postfix/main.cf:
smtp_generic_maps = hash:/etc/postfix/generic
/etc/postfix/generic:
@my-hostname [email protected]
@localhost [email protected]
So, if I have understood the documentation correctly, this should cause all messages sent to any local user user-x
with the addresses user-x@my-hostname
and user-x@localhost
to be delivered to [email protected]
.
Instead, I observe the following unexpected behaviour:
- If I send email to
my-username@localhost
, the message is delivered to my Linux box and not to my ISP account[email protected]
. - Even more strangely, my ISP administrator has sent me an email, that they are receiving messages for destination
[email protected]
with subject 'Subject: Anacron job 'cron.daily' on my-hostname'. I suppose this is a local notification of my Linux box that is meant forroot
, but how does this get mapped to[email protected]
?
At the moment I have checked all my configuration files and I have not clue as to how I can explain this behaviour:
- Why are my messages to address
my-username@localhost
not mapped to[email protected]
as specified in the configuration file? - Where do these messages for
[email protected]
come from, if the only mapping I have specifies the complete address of the receiver ([email protected]
) explicitly? So if a message forroot@locahost
gets mapped, it should be delivered to[email protected]
and not to[email protected]
.