Page tree
Skip to end of metadata
Go to start of metadata

SMTP configuration, client side

Fedora 23 - postfix


You can get configuration of postfix relay and configure relay to use alias of gate33(smtp1) or gate43(smtp2) do following:

dnf install postfix mailx -y
postconf | grep "^relayhost ="
postconf -e 'relayhost = smtp.tds.tieto.com'
#postconf -e 'relayhost = [mail.mgt.tds.tieto.com]:587' - for public instance
postconf | grep "^relayhost ="
systemctl enable postfix
systemctl restart postfix
  
#if SElinux is enabled, you have to do following to allow apache apps to send mails:
/usr/sbin/getsebool httpd_can_sendmail
setsebool -P httpd_can_sendmail 1
/usr/sbin/getsebool httpd_can_sendmail
#correct output should be "httpd_can_sendmail --> on"

CentOS 7 - postfix


You can get configuration of postfix relay and configure relay to use alias of gate33(smtp1) or gate43(smtp2) do following:

yum install postfix mailx -y
postconf | grep "^relayhost ="
postconf -e 'relayhost = smtp.tds.tieto.com'
#postconf -e 'relayhost = [mail.mgt.tds.tieto.com]:587' - for public instance
postconf | grep "^relayhost ="
systemctl enable postfix
systemctl restart postfix
  
#if SElinux is enabled, you have to do following to allow apache apps to send mails:
/usr/sbin/getsebool httpd_can_sendmail
setsebool -P httpd_can_sendmail 1
/usr/sbin/getsebool httpd_can_sendmail
#correct output should be "httpd_can_sendmail --> on"

CentOS 6 - postfix


You can get configuration of postfix relay and configure relay to use alias of gate33(smtp1) or gate43(smtp2) do following:

yum install -y postfix
postconf | grep "^relayhost ="
postconf -e 'relayhost = smtp.tds.tieto.com'
#postconf -e 'relayhost = [mail.mgt.tds.tieto.com]:587' - for public instance
postconf | grep "^relayhost ="
chkconfig postfix on
service postfix restart
  
#if SElinux is enabled, you have to do following to allow apache apps to send mails:
/usr/sbin/getsebool httpd_can_sendmail
setsebool -P httpd_can_sendmail 1
/usr/sbin/getsebool httpd_can_sendmail
#correct output should be "httpd_can_sendmail --> on"

Ubuntu Server 14.04

sudo apt-get install mailutils
sudo apt-get install postfix #select no configuration when installation dialog pops out
cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
postconf -e 'relayhost = smtp.tds.tieto.com'
#postconf -e 'relayhost = [mail.mgt.tds.tieto.com]:587' - for public instance
postconf | grep "^relayhost ="
sudo service postfix restart

Testing mail transport


You can send testing email to etb mailbox:

echo "small hello :)" | mail -s "Testing email" YOUR EMAIL ADDRESS
echo "small hello :) Email sent exactly on $(date)" | mail -r tds@tieto.com -s"Testing email" YOUR EMAIL ADDRESS


Related articles