Difference between revisions of "Configuring another postfix server for incoming and outgoing emails"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>Postfix_server_configuration|Postfix server configuration</yambe:breadcrumb> =Configuring another postfix server for incoming and outgoing emails= To config...")
 
m
Line 2: Line 2:
=Configuring another postfix server for incoming and outgoing emails=
=Configuring another postfix server for incoming and outgoing emails=


To configure a server which is publicly reachable, say mail.sbarjatiya.com, to receive and forward emails on behalf of an internal server, say mailtest.sbarjatiya.com use following steps:
To configure a postfix relay server which is publicly reachable, say mail.sbarjatiya.com, to receive and forward emails on behalf of an internal server, say mailtest.sbarjatiya.com use following steps:
#Add DNS entries for mailtest.sbarjatiya.com with MX mail.sbarjatiya.com on external DNS
#Add DNS entries for mailtest.sbarjatiya.com with MX mail.sbarjatiya.com on external DNS
#Add DNS entries for mailtest.sbarjatiya.com with MX mailtest.sbarjatiya.com on internal DNS
#Add DNS entries for mailtest.sbarjatiya.com with MX mailtest.sbarjatiya.com on internal DNS

Revision as of 12:36, 22 November 2013

<yambe:breadcrumb>Postfix_server_configuration|Postfix server configuration</yambe:breadcrumb>

Configuring another postfix server for incoming and outgoing emails

To configure a postfix relay server which is publicly reachable, say mail.sbarjatiya.com, to receive and forward emails on behalf of an internal server, say mailtest.sbarjatiya.com use following steps:

  1. Add DNS entries for mailtest.sbarjatiya.com with MX mail.sbarjatiya.com on external DNS
  2. Add DNS entries for mailtest.sbarjatiya.com with MX mailtest.sbarjatiya.com on internal DNS
  3. Edit '/etc/postfix/main.cf' on mail.sbarjatiya.com to include:
    relay_domains = mailtest.sbarjatiya.com
    mynetworks = <Private IP address of mailtest.sbarjatiya.com>
  4. Edit '/etc/postfix/main.cf' on mailtest.sbarjatiya.com to include:
    relayhost = mail.sbarjatiya.com
  5. Test by sending email from external email server and also by using mail command on mailtest.sbarjatiya.com to verify things are working fine.

Note that this would require a IMAP / POP3 server to be setup on mailtest.sbarjatiya.com for users to be able to check email.