On 08/08/2007 15:44, Oded Arbel wrote:
It might be the time, but I can't wrap my head around this problem:

I have postfix configured as the local MTA for a server that needs to
generate some status emails every day (logwatch, etc'), and mail them to
the administrator's address which is [EMAIL PROTECTED] , and I've setup
an alias:
root:   [EMAIL PROTECTED]

The problem is that the mail server running the mail domain comany.com
doesn't like to receive e-mail from addresses in the form of
server.comany.com (where server.company.com is local host name that is
not visible on the internet) - because it doesn't accept mail from
"domains" that it can't resolve. So mail from <[EMAIL PROTECTED]>
to <[EMAIL PROTECTED]> gets rejected.

I tried to solve the problem by setting postfix's 'myorigin' to
"company.com" so that postfix will send mail as <[EMAIL PROTECTED]> which
is meaningless (there is no such e-mail address), but I don't mind and I
can understand what it means and the mail server will be happy (it
doesn't actually verify the user part of From addresses). Problem is
that postfix now refuses to resolve the alias and instead of sending to
the required address, it sends emails from <[EMAIL PROTECTED]> to
<[EMAIL PROTECTED]>, which of course gets rejected because there is no
such address. This is because the second caveat of the 'myorigin'
setting:

# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.

So postfix maps 'root' to '[EMAIL PROTECTED]' and then its no longer a
local address and so it gets sent on the wire.

My current workaround is to set 'myorigin' to "valid.company.com", where
valid.company.com is the address of another server whose name can be
resolved on public DNS server. Of course this is bad.
Can any one suggest a better method of getting my log reports ? I rather
not have an alias for '[EMAIL PROTECTED]' on the mail server - its a good
address for a spam trap, but probably nothing else.

Either define mynetworks to include all local networks thus whitelist
them or use access list by domain ( with or without wild card ).

PS Why do try to resolve domains in the first place? If you are
   resolving to check mx then it's a headache since many ISP's
   do not conform to standards. I.e. sending  from servers
   without mx records.
   If you are checking just for valid domains, i.e. with a valid A
   records then again, what exactly will this check tell you?
   Weigh carefully the overhead against the results.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to