Ignoramus6442 wrote:
> We have a satellite computer running Ubuntu 7.10. The hostname is
> server5.example.com.
>
> I set up postfix as a satellite system with mail.example.com as a relay.
>
> We also set default domain that is appended to our addresses, as
> example.com.
>
> On this machine, there is a user account called "myuser". It has a
> .forward file forwading emai lto me@myhome.example.
>
> If I say
>
> echo helo | Mail -s hello user
>
Of course. The .forward file is in 'myuser' but you sent the mail to
'user'. Try:
echo helo | Mail -s hello myuser
and the mail should be forwarded.
To forward the results from the cron jobs, you should use one of these
options:
- add a "MAILTO = myuser" line to the crontab file(s).
See "man 5 crontab" for more details.
- run the cron jobs under 'myuser', not 'user'
- move the .forward file to 'user'.
- add a line to /etc/aliases to redirect mail for 'user' to 'myuser' and
run "newaliases" to rebuild the aliases database.
> I was expecting it to go to me@myhome.example. Instead, it is
> delivered to the mail relay mail.example.com witrh destination of
> user@example.com.
>
That's exactly what I'd expect with your default domain setting and host
name, seeing that
user@example.com is not the same as the local user
(user@server5.example.com).
Hints: run "postconf -n" and compare its output with what you're seeing.
Look at /var/log/maillog to see what's happening to a message that
doesn't go where you expect it to.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |