This article is being updated. Please be aware the content herein, not limited to version numbers and slight syntax changes, may not match the output from the most recent versions of Bright. This notation will be removed when the content has been updated.
The standard linux way, on the head node only. For Bright Cluster Manager 7 onwards, the relay host can be managed by BCM in the base partition.
Outside the BCM-autogenerated section of /etc/postfix/main.cf, the BCM default head node postfix main.cf file is the same as the default distribution version. The same is true for /etc/postfix/generic.cf. So you can customize them to taste just like you would on a normal linux system, as long as what you change doesn’t do the wrong thing with the BCM-autogenerated settings. The relayhost setting of Postfix is a BCM-autogenerated setting in BCM 7 and above, so it is best to set it by using BCM rather than trying to adjust it directly, the standard Postfix way, in the configuration files.
Postfix configuration files have statements that can override earlier ones, so a FrozenFile configuration directive is almost certainly not needed. The FrozenFile directive is covered in the appendix on CMDaemon Configuration File Directives in the Admin Manual.
Example: setting up a relay host.
By default, BCM has no relay host defined. With this default, postfix will try to deliver mail by figuring out the MX records from DNS and connect to any mail servers defined there.
A relay host for Bright 6.1 and below can normally be configured the standard postfix way, ie, setting:
relayhost = [my.relay.host.com]
in the /etc/postfix/main.cf file, outside the BCM autogenerated section on the head node.
For Bright 7.0 and above the relay host can be specified as follows:
- in cmgui the SMTP relay host value can be set in the Settings tab for the cluster resource
- in cmsh the relayhost property can be set for the base object within partition mode:
[root@bright70 ~]# cmsh
[bright70]% partition use base
[bright70-> partition[base]]% set relayhost mail.example.com
[bright70-> partition[base*]]% commit
Postfix on the regular nodes is configured to use the head node as a relay host and is normally left untouched by the administrator.
Example: setting to the domain name from which mail is sent
A typical postfix address rewrite, so that local mail is sent out as a “proper” internet-format e-mail. See http://www.postfix.org/ADDRESS_REWRITING_README.html#generic for background postfix documentation.
Eg: add to the end of the /etc/postfix/generic file, outside the autogenerated section:
This rewrites any outgoing mail starting with root@<some local domain> to email@example.com so that the recipient sees it as coming from firstname.lastname@example.org. You do of course have to make sure your DNS record is right for the mailserver IP address that postfix sends this mail from, or the mail will likely end up being rejected as spam.