Web Hosting Talk







View Full Version : postfix question


|<@os
10-31-2004, 03:01 AM
Currently I have two domains pointing to my server. For example maindomain.com and otherdomain.com

I've setup virtual domain with postfix and email to somalias@maindomain.com is working but no on otherdomain.com

My config - (the only lines I changed/added from default debian sarge config)


In main.cf
virtual_alias_domains = maindomain.com, otherdomain.com
virtual_alias_maps = hash:/etc/postfix/virtual

In /etc/postfix/virtual
somealias@maindomain.com userA
alias2@otherdomain.com userB


but otherdomain.com is not recieveing outside email (eg. gmail.com), however it's recieving internal email fine. Eg. when I am logged as root and send an email via mutt to alias2@otherdomain.com and it arrives to userB's inbox properly. Same test from gmail will fail, no error message...

Is this something wrong with my postfix config? or something else (DNS, server config...etc)

Thank you.

macooper
10-31-2004, 04:43 AM
Hi,
It's difficult to say for sure without knowing the actual domain names, but your postfix setup sounds correct. Have you checked the MX records for both domains ?

If your not familier with DNS, an MX record is the record added to each domain that tells it where to deliver mail. A typical DNS config might be :-



$ORIGIN maindomain.com.
$TTL 259200 ; 3 days
@ IN SOA ns1.maindomain.com. admin.maindomain.com. (
251020045 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
3600 ; minimum (1 hour)
)
NS ns1.maindomain.com.
NS ns2.maindomain.com.
MX 10 mail.maindomain.com.

ns1 A 192.168.0.2
ns2 A 192.168.0.3
mail A 192.168.0.10



Obviously, you would have to set this up for both domains. Also, note that the MX record should contain a host name, and that hostname must be defined with an A record. Using a CNAME record is non RFC compliant and will cause some problems with certian mailservers.

Depending on how you manage your domains, you may be able to change this from your registrars control panel.

HTH