Sie sind auf Seite 1von 5

How to setup Relay host in mail server

Please refer to the following information to assist in configuring various of the common mail servers:
List of common mail server

Microsoft Exchange 2003 Microsoft Exchange 2000 Postfix Sendmail Exim Communigate Pro Qmail

Microsoft Exchange 2003 Important: If you are using Exchange with smtp-proxy.tm.net.my, you must configure your server to reject invalid recipients during the SMTP session, rather than generating NDRs and sending them out later. In the Message Delivery Properties dialog box in Global Settings, find the Recipient Filtering tab. Make sure that "Filter recipients who are not in the Directory" is checked, and Apply the settings. 1. Go to "Start/All Programs/Microsoft Exchange" and click on "System Manager". 2. Expand the "Connectors" item. 3. By default, Exchange uses SMTP for outbound connections, so you should find an "Internet Mail SMTP Connector" already there. Right click on it and select "Properties". 4. On the "General" tab, select "Forward all mail through this connector to the following smart hosts" and enter "smtp-proxy.tm.net.my" in the field below. 5. On the "Advanced" tab, click on the "Outbound Security" button to get to "Outbound Security" dialog box. 6. By default, exchange sets up security to use "Anonymous Access". Change this to "Basic authentication (password is sent in clear text)" then click the "Modify" button, enter your domain username and password, and click "OK". 7. Back at the "Outbound Security" dialog box, enable "TLS Encryption" and click "OK". Microsoft Exchange 2000 Exchange's SMTP virtual server does not support authentication. In order to use smtp-proxy, you must add an SMTP connector. Important: If you are using Exchange with smtp-proxy, you must configure your server to reject invalid recipients during the SMTP session, rather than generating NDRs and sending them out later. In the Message Delivery Properties dialog box in Global Settings, find the Recipient Filtering tab. Make sure that "Filter recipients who are not in the Directory" is checked, and Apply the settings. 1. Click on Routing Groups -> First routing group -> Connectors. 2. Add an SMTP connector by right clicking on Connectors. 3. In the properties, select "Forward all mail through this connector to the following smart hosts" and

4. 5. 6. 7. 8. 9. 10. 11.

enter smtp-proxy.tm.net.my in the field below. Add a local bridgehead. If you have only one server, this is your server. Select Properties: Deactivate "Send HELO instead of EHLO". Activate "Do not send ETRN/TURN". On the Delivery Options page, select "Specify when messages are sent through this connector" and specify "Always Run" (or whatever you desire). Under the Advanced tab, click "Outbound Security..." then "Basic authentication" then click Modify. Enter your domain username and password here. Under Address Space, click Add then SMTP. Domain should be * and cost 1. Connector Scope is probably "Entire organization". It is not necessary to click "Allow messages to be relayed through this domain" (and this option probably should not be selected).

Postfix These instructions is for Mac OS X 10.3 that running postfix 2.0.10. It is expected that other versions of postfix running on various flavors of UNIX/Linux should be similarly configured. These instructions assume the postfix config files live in /etc/postfix. 1. In /etc/postfix/main.cf add the lines:
relayhost = smtp-proxy.tm.net.my:25 smtp_sasl_auth_enable=yes smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd smtp_sasl_security_options=

Optionally, also add the lines:


smtp_use_tls = yes smtp_tls_CAfile = /etc/postfix/cert.pem smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache

to enable SSL/TLS when sending outgoing mail. Note that the path info in the second command may be different depending on your system and where you have installed your certificates. The last line may be omitted, but should help reduce CPU cycles verifying the certificate chain when sending outgoing EMail.

2. Create a file /etc/postfix/sasl_passwd with the contents:


smtp-proxy.tm.net.my userid:password where userid and password are your domain username and password.

3. Next, change the ownership and permissions on the sasl_passwd file to protect it from unauthorized access.
chown root:root /etc/postfix/sasl_passwd chmod 600 /etc/postfix/sasl_passwd

4. Finally, create a database file from the contents of the sasl_passwd file:

postmap hash:/etc/postfix/sasl_passwd

5. OPTIONAL: If you wish to relay only specific domains via smtp-proxy, You will need to do the following: Remove the relayhost = smtp-proxy.tm.net.my entry in main.cf, if one exists. Add the following line to your main.cf file: transport_maps = hash:/etc/postfix/transport Edit /etc/postfix/transport and update it with something similar to the following:
# Syntax: .domain transport:relay_host # Specifies specific domains for local delivery my.domain.com : # Specify all subdomains for local delivery .my.domain : # Specify domains that need to be relayed through smtp-proxy.tm.net.my aol.com relay:smtp-proxy.tm.net.my hotmail.com relay:smtp-proxy.tm.net.my

Create a database file from the contents of the transport file: postmap
hash:/etc/postfix/transport

6. Lastly, reload postfix: postfix reload If you want to change the port that Postfix uses to send outgoing mail, we have been told that you may need to change the definition of the SMTP port in /etc/services. We do not have comprehensive instructions for making this change, but some reasonable searching should get you the information you need - when changing /etc/services, though, you should be very careful, as this file controls a large part of the UNIX system's TCP/IP interactions. Sendmail These instructions assume that you already have an appropriate .mc file prepared for your Sendmail configuration, and have the appropriate commands/tools prepared to compile that into a sendmail.cf file and install it in the appropriate location. On some BSD-based systems, this is as simple as typing "make" in /etc/mail and editing $hostname.mc. On other systems, it can be considerably more difficult. Consult the manual for your system or Sendmail for more information. 1. Add the following lines to your .mc file:
FEATURE(authinfo, `hash -o /etc/mail/authinfo') define(`SMART_HOST', `smtp-proxy.tm.net.my')

If you need to use an alternate port (other than 25) for smtp-proxy, also add the following line:
define(RELAY_MAILER_ARGS, `TCP $h 2525')

2. Create or edit the file /etc/mail/authinfo, and add a line that looks like this:
AuthInfo:smtp-proxy.tm.net.my "U:username" "P:password" "M:LOGIN"

Replacing "username" and "password" with your domain username and password, respectively. Be sure to include the rest of the line exactly as it is shown above, quotes and all. You should make sure

that this file is not readable by unpriviledged users, as it contains your login information. 3. Build the authinfo file into the Sendmail hash database format with the following command:
makemap hash /etc/mail/authinfo < /etc/mail/authinfo

This will create an /etc/mail/authinfo.db file, which Sendmail will use to read the authentication information. You will need to re-run the above command any time you change /etc/mail/authinfo. 4. Finally, compile your .mc file to a .cf file, install it as sendmail.cf, and re-start Sendmail. Your server should now send all mail via the smtp-proxy.tm.net.my server Exim These instructions assume Exim 4.x and have been vetted by our support staff running Exim version 4.20 on FreeBSD 4.8: 0. In the "MAIN CONFIGURATION SETTINGS" make sure that your primary_hostname and local_domains variables are configured correctly. Otherwise you'll likely generate nasty loops. Unfortunately we can't tell you precisely how to configure these as they depend on too many local variables. Consult the Exim documentation for more details on configuring these items. 1. In the "ROUTERS CONFIGURATION" section, before any other routers, add the following:
send_to_gateway: driver = manualroute domains = !+local_domains transport = remote_smtp route_list = * smtp-proxy.tm.net.my

2. In the "TRANSPORTS CONFIGURATION" section, locate the remote_smtp directive and edit it to include:
remote_smtp: driver = smtp hosts_require_auth = smtp-proxy.tm.net.my

If you have Exim compiled to use SSL, add the following line as well:
hosts_require_tls = smtp-proxy.tm.net.my

3. Near the bottom of your configure file, in the "AUTHENTICATION CONFIGURATION", enter:
login: driver = plaintext public_name = LOGIN client_send = ": username : password"

The username and password should of course be your domain credentials. Communigate Pro These instructions is for Communigate Pro version 4.1.7 on Mac OS X 10.3. However, the basic interface for this in Communigate Pro hasn't changed since 3.0 or earlier. As such, these instructions should work with most versions of Communigate Pro currently in service.

1. Using the basic Web interface to administer Communigate Pro, access the SMTP section and select the option "Forward to". Enter smtp-proxy.tm.net.my in the text field to the right of this option. 2. In the "Send AUTH" field enter your domain username. 3. In the "Password" field enter your domain password. 4. Optionally, in the "Send Encrypted (SSL/TLS)" enter smtp-proxy.tm.net.my in the "To Domains" field to engage SSL based encryption for communications between you and our relay server. qmail Relaying to a smart host Setting qmail to route all outgoing SMTP traffic through that server by doing:
echo ":smtp-proxy.tm.net.my" > /var/qmail/control/smtproutes

Das könnte Ihnen auch gefallen