Postfix problem with default domain

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 ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.postfix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-22-2008
Ignoramus6442
 
Posts: n/a
Default Postfix problem with default domain

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
Reply With Quote
  #2 (permalink)  
Old 01-22-2008
Martin Gregorie
 
Posts: n/a
Default Re: Postfix problem with default domain

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 |
Reply With Quote
  #3 (permalink)  
Old 01-22-2008
Ignoramus6442
 
Posts: n/a
Default Re: Postfix problem with default domain

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:42 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0