This is a discussion on Re: Relaying mail FROM: a specific domain only within the mailing.postfix.users forums, part of the Mail Servers and Related category; Planet X Mail wrote: > Hello, > > I sent a similar post a few days ago but I need ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Planet X Mail wrote:
> Hello, > > I sent a similar post a few days ago but I need more specifics. > > I have a mail server that has problems with its IP address so I need to forward > all mail coming from ( @mydomain.com ONLY no other domain ) # host mydomain.com mydomain.com has address 216.34.94.184 .... is this your IP? to another > mailserver we will call: 123.123.123.123 [mail.externalserver.com] # whois 123.123.123.123 .... NetName: RESERVED-8 .... so this is a reserved network, that doesn't resolve to mail.externalserver.com, nor does the latter resolve to 123...: # host mail.externalserver.com mail.externalserver.com has address 217.160.141.17 or is this your IP? > > @mydomain.com relayed for delivery to 123.123.123.123 [mail.externalserver.com] > > What configs do I set in main.cf for the @mydomain.com POSTFIX > What configs do I set in main.cf for the relay server? > > This is what I have so far... > > On the @mydomain.com server set relayhost = [mail.externalserver.com] > But, how do I ONLY relay mail from the domain @mydomain.com ??? and no other > domains this mail server handles? > > On the RELAY SERVER 123.123.123.123 [mail.externalserver.com ] > what do I set in main.cf ? So far I believe I add the IP Address for > @mydomain.com to mydestination = mydomain.com, (plus all the other > mydestinations.. ) > > Is this correct? let's say today is the guess game day.... - on the relaying server, allow relay for a client by adding it to mynetworks or by putting it in relay_client map and using this in your smtpd restrictions. - on the client that needs to relay, set the gateway as a relayhost or as an entry in the transport table. if this isn't clear enough, I'm sorry, but your question isn't clear to me. start by using reserved IPs and reserved domain names, then state what you want on which machine (using different paragraphs for each machine). divide and conquer... |