we have mac os x server which isn't connected to the internet, but it's hosting some collaborative tools which is used internaly only (lan).

Some of those tools send notifications, but our mail server is outside this lan.

I'm using linux as my desktop, and i'd like to be a relay to let the server able to send mail outside.

I'd like to limit realying only from local network and to everywhere.

I took in consideration that my computer will be needed to relay e-mail. And down times are in mind.

Thanks !

  • what does having a mac os x server have to do with your question? are you attempting to set up the email relay server on the linux box or the mac server? do you have access to your firewall in case this type of activity is blocked? are you sure you need a relay server? – Patrick R Feb 10 '10 at 20:30

If you only want to send out-going mail from the MAC OS X through your linux desktop. You can install sendmail on your linux desktop. Then configure these files:

/etc/mail/relay-domains contains a list of hosts which are allowed to relay mail through your mail server. This list may consist of either specific hosts or whole domains.

/etc/mail/sendmail.cw (after sendmail version 8.10, this file is local-host-names) contains a list of domains for which your mail server will accept mail. This list is usually the domains hosted by your machine.

You might to need to configure the OS X server to send mail to your linux box. Here is an instruction on how to do that.

This solution configures postfix, the service used by mail and sendmail, to relay messages through a third-party server (ideally your ISP), optionally using authentication and TLS. You'll need to be root to create/edit the files and run the commands. So, without further delay, enjoy.

Edit /etc/postfix/main.cf and add the following to the end:

relayhost = smtp.yourisp.com # (you can use smtp.yourisp.com:port, such as smtp.yourisp.com:587)
smtp_sasl_auth_enable = yes
smtp_use_tls = yes
smtp_enforce_tls = yes
smtp_sasl_security_options =
smtp_sasl_tls_security_options =
smtp_sasl_tls_verified_security_options =
smtp_tls_loglevel = 2 # optional if you wan to see what's going on with the TLS negotiation in /var/log/mail.log
smtp_sasl_password_maps = hash:/etc/postfix/smtp_sasl_passwords
smtp_tls_per_site = hash:/etc/postfix/smtp_tls_sites
tls_random_source = dev:/dev/urandom


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.