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: > > I have a mail server that has problems with its IP address so I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Planet X Mail wrote:
> > 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 > ) to another mailserver we will call: 123.123.123.123 > [mail.externalserver.com] So, basically this is just like a travelling salesman with a laptop, who wants to send email using the mailserver from his company... > 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? If you don't know the IP address, and it isn't fixed: use SMTP Auth and TLS to authenticate the sending host. > ( @mydomain.com ONLY no other domain > ) to another mailserver we will call: 123.123.123.123 > [mail.externalserver.com] Additionaly, you can use smtpd_sender_login_maps so only mail with a MAIL FROM in domain @mydomain.com will be accepted. http://www.postfix.org/postconf.5.ht...der_login_maps > 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? You should *not* relay mail based on what's in the MAIL FROM. Doing so makes your server an open relay, because anyone can fake a MAIL FROM and send email to anyone using your mailserver. Greetings, Hans van Kranenburg |