This is a discussion on Postfix problem with default domain within the alt.comp.mail.postfix forums, part of the Mail Servers and Related category; We have a satellite computer running Ubuntu 7.10. The hostname is server5.example.com. I set up postfix as ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 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. This is NOT what I want, I feel that the .forward file is not even taking effect. My feeling is that it prefers to resolve the address to user@example.com instead of treating it as a local user. The problem is that these emails come from crontab jobs where cron automatically sends email to user. What can I do to fix this issue and force local delivery of emails with non-qualified destination? I still want @example.com appended to From: field of outgoing emails. Thanks i |
|
|||
|
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 | |
|
|||
|
On 2008-01-22, Martin Gregorie <martin@see.sig.for.address> wrote:
> 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: I apologize for a typo, I was sending email to "myuser" (in this example, the actual usernames differ) > > echo helo | Mail -s hello myuser > > and the mail should be forwarded. Except it does not. > 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). I like this. This could solve this problem, even if I do not solve it by means of postfix configuration. i |
![]() |
| Thread Tools | |
| Display Modes | |
|
|