Setup Email with Postfix
Jump to navigation
Jump to search
- Postfix needs to be installed on the headnode and the compute nodes
Install Postfix
yum install postfixSetup Postfix
- Edit the main.cf configuration and setup a relayhost to send mail
# vi /etc/postfix/main.cf
relayhost = speedy2k3.viglen.co.uk
# Or customer version
relayhost = smtp.mailserver.uni.ac.ukRestart and test postfix
/etc/init.d/postfix restart
echo "hi" | mail -s "Subject" david.power@viglen.co.ukSetup the compute nodes for postfix
- Conf TBC
- Install postfix on nodes using ngedit
- Create a link in /etc/cfm/[node_group]/etc/postfix/main.cf to /etc/postfix/main.cf
- Might need chkconfig in custom_scripts
Setup aliases for users
- By default LSF will email the localhost user mailbox, to email external mailboxes, setup aliases:
# EG if you had a user called david but wanted to email david.power@viglen.co.uk
# Edit /etc/aliases
david: david.power@viglen.co.uk
# Once the aliases are added, run newaliases:
[root@vhpchead etc]$ newaliases
/etc/aliases: 77 aliases, longest 24 bytes, 794 bytes totalLSF parameters
LSB_MAILPROG=/usr/sbin/sendmail
LSB_MAILSERVER=SMTP:smtp.uea.ac.uk
# mail address format user@uea.ac.uk
LSB_MAILTO=!U@uea.ac.ukDNS Domain needs changing
- By default, PCM will setup an internal zone called private.dns.zone
- This may need to be changed to allow mails be relayed (from a trusted university domain)
[root@vhpchead ~]$ kusu-net-tool dns domain private vhpc.viglen.co.uk
Updating and restarting PCM daemons...
Updating /etc/resolv.conf
Updating /etc/named.conf
Updating DNS zone file(s)
Updating reverse DNS configuration file(s)
Restarting named...
None
Updating /etc/hosts...
Restarting dhcpd...
None
Updating SSH client configuration...
Restarting httpd...
None
Restarting xinetd...
None
Removing old DNS zone file(s)
Please run 'kusu-addhost -u' to update the configuration for installed kits.
[root@vhpchead etc]$ addhost -u