Postfix : Undelivered Mail

Hi,

I have a problem with my postfix server. If I send mail to user1@mydomain.internal, I can simply receive e-mail.
but If I send an e-mail to user1@myhost.mydomain.internal
the e-mail bounces back to the root user.

#hostname -f
myhost.mydomain.internal

dig mydomain.internal

; <<>> DiG 9.5.0-P2 <<>> mydomain.internal
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63688
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;mydomain.internal. IN A

;; AUTHORITY SECTION:
mydomain.internal. 3600 IN SOA mydomain.internal. root.mydomain.internal. 20090404 172800 14400 3628800 604800

;; Query time: 0 msec
;; SERVER: 192.168.1.3#53(192.168.1.3)
;; WHEN: Sun May 17 18:55:53 2009
;; MSG SIZE rcvd: 75

dig myhost.mydomain.internal

; <<>> DiG 9.5.0-P2 <<>> myhost.mydomain.internal
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65306
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;myhost.mydomain.internal. IN A

;; ANSWER SECTION:
myhost.mydomain.internal. 3600 IN A 192.168.1.3

;; AUTHORITY SECTION:
mydomain.internal. 3600 IN NS myhost.mydomain.internal.

;; Query time: 0 msec
;; SERVER: 192.168.1.3#53(192.168.1.3)
;; WHEN: Sun May 17 18:58:49 2009
;; MSG SIZE rcvd: 73

What am I missing.?

Why is that when I type, #dig mydomain.internal, I get nothing on the Answer Section. but when I type

#dig mydomain.internal mx

; <<>> DiG 9.5.0-P2 <<>> mydomain.internal mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51497
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;mydomain.internal. IN MX

;; ANSWER SECTION:
mydomain.internal. 3600 IN MX 10 myhost.mydomain.internal.

;; AUTHORITY SECTION:
mydomain.internal. 3600 IN NS myhost.mydomain.internal.

;; ADDITIONAL SECTION:
myhost.mydomain.internal. 3600 IN A 192.168.1.3

;; Query time: 0 msec
;; SERVER: 192.168.1.3#53(192.168.1.3)
;; WHEN: Sun May 17 19:16:48 2009
;; MSG SIZE rcvd: 89

I forgot some important information:

mydestination = mydomain.internal
mydomain = mydomain.internal
myhostname = myhost.mydomain.internal

That’s perfectly valid. A domain name can have a MX record associated with it but no A record.

As for your mail bouncing, you need to tell postfix that myhost.mydomain.internal is one of the acceptable destinations, in $mydestination.

I manually edited main.cf

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

then #rcpostfix restart
#postconf reveals differently

mydestination = mydomain.internal why?

thanks,

Maybe you have two lines setting mydestination in main.cf. The last one wins.

ariyoshi wrote:

> I have a problem with my postfix server. If I send mail to
> user1@mydomain.internal, I can simply receive e-mail.
> but If I send an e-mail to user1@myhost.mydomain.internal
> the e-mail bounces back to the root user.

Take a look at the Postfix logs ("/var/log/mail" and “/var/log/mail.warn”)
to see what’s happening.

Greetings,


Camaleón

What’s the trick not to send mail destinated to your lan to your ISP when you’re using a smarthost and no name server on your lan? I’ve been doing that with sendmail and exim, but still need to do that on openSUSE boxes.

Also … something I never got done: How to rewrite enveloppes for lan mails so that the sender be different from the one using smarthost (for external mails).

I know … this is tricky … and please don’t end up telling me I should set up a DNS (allthough some day I certainly will).