Relay single Domain to relayhost? - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: System Setup & Installation (/forum-32.html) +--- Thread: Relay single Domain to relayhost? (/thread-9034.html) |
Relay single Domain to relayhost? - polysign - 01-01-2010 12:21 AM Hi there, I have a simple. but yet frustrating question/problem to solve... I have multiple domains setup on my ispcp server. One client however uses his own Exchange Server locally (his office). Now I want to relay all incoming mails for his domain to his own Exchange server. So I setup a transport map: hisdomain.tld smtp:IPofEXCHANGE and put it into a transport_map in the main.cf. That does work if I the mail address I am sending to is setup in the alias.db / in ispcp as alias or mailbox account. How can I solve this without having to setup a mail account in my ispcp box for every account on the exchange server? Please help RE: Relay single Domain to relayhost? - motokochan - 01-01-2010 03:22 PM Do a search on using external mail services. Once you set the correct MX in DNS, your server should send to the right place. RE: Relay single Domain to relayhost? - polysign - 01-01-2010 10:03 PM Dear Motokochan, you were right! It was that simple... So all I had to do is remove the domain from the /etc/postfix/ispcp/domains list and rebuild the domains.db using postmap. Then I manually changed the DNS Zone for that domain by changing the IP of the mail.domain.com entry. It's no clean setup and I don't know how ispcp will handle the manual removal of the domain in the domain.db. But I hope as long as I don't edit the email-settings fro that domain, it will be allright Thanks again. RE: Relay single Domain to relayhost? - polysign - 01-02-2010 09:00 PM Not to forget: In my main.cf (Postfix Conf) I had to add the following line: relay_domains = $mydestination, domain2relay.com Otherwise postfix will give an "relay access denied" for that domain. RE: Relay single Domain to relayhost? - motokochan - 01-04-2010 01:49 PM You shouldn't need to do that if you are using an external mail service. The local server should have relay access, and external servers should be using the correct MX for that outside domain. RE: Relay single Domain to relayhost? - polysign - 01-04-2010 08:04 PM I guess it just worked that way because the public MX record for that domain points to our servers, and not to the mail server for that client. So all mails have to come to our server first, then get forwarded to the clients exchange server. The moment the domain was listed in the local postfix domain.db, postfix tried to post the mail locally on the server. When I removed the domain from the list, postfix tried to send it to the MX record. As the MX record (by default, on the local server where ispcp runs) points to itself, it couldn't deliver! SO I had to change the MX record manually on my ispcp for that domain. RE: Relay single Domain to relayhost? - motokochan - 01-05-2010 05:34 AM Unless you are doing something special with that domain, the MX should point to the most direct server to deliver to. By allowing relay to any address on that domain, you enable spam to any possible address, try to deliver to the actual mail server, then have to handle bounces - causing backscatter. If you still want to act as MX, you should maintain a list of all valid addresses, and make sure they are in the mail map so you reject invalid addresses at the submission stage. |