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
Please refer to the following information to assist in configuring various of the common mail servers:
List of common mail server
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.
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.
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 E-Mail.
smtp-proxy.tm.net.my userid:password
where userid and password are your domain username and password.
chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd
postmap hash:/etc/postfix/sasl_passwd
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.myCreate a database file from the contents of the transport file:
postmap hash:/etc/postfix/transport
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.
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.
.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')
/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.
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.
.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 serverThese instructions assume Exim 4.x and have been vetted by our support staff running Exim version 4.20 on FreeBSD 4.8:
send_to_gateway:
driver = manualroute
domains = !+local_domains
transport = remote_smtp
route_list = * smtp-proxy.tm.net.my
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
login:
driver = plaintext
public_name = LOGIN
client_send = ": username : password"
The username and password should of course be your domain credentials.
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.
Setting qmail to route all outgoing SMTP traffic through that server by doing:
echo ":smtp-proxy.tm.net.my" > /var/qmail/control/smtproutes