Previous Section  < Day Day Up >  Next Section

Recipe 20.5. Sending Internet Mail

20.5.1 Problem

How do you configure Postfix to send Internet mail? You've set up the server, but mail isn't flowing yet.

20.5.2 Solution

This is more complicated than it used to be, thanks to spammers. If your ISP does not require SMTP authentication, you can relay outbound mail via their SMTP server. Add a relayhost directive to /etc/postfix/main.cf:

relayhost = isp.smtpserver.com

Use the SMTP server specified in your ISP account information.

If your ISP requires SMTP authentication, see Recipe Recipe 20.7.

20.5.3 Discussion

Beware of restrictive Terms of Service (TOS). They may forbid running servers of any kind. If your service provider does not allow you to run servers, you'll either need to move to a provider that does allow it or use a third-party service for "smart hosting" (a commercial SMTP relaying service).

Another option is to configure each individual mail client to use your ISP account for outgoing mail, because most mail clients can be configured to remember the SMTP login. However, there are a couple of drawbacks to doing this:

  • You won't have any control over or logging of outbound mail.

  • Internal mail won't be delivered directly, but rather bounced all over the Internet.

20.5.4 See Also

  • Recipe 20.7

  • The Postfix book (/usr/share/doc/postfix/html/index.html)

    Previous Section  < Day Day Up >  Next Section