EasyManua.ls Logo

Vistec EBPG5200 - 8 Mail Setup

Vistec EBPG5200
26 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8. MAIL SETUP
In case an email has to be send, the local system settings could have to be changed
depending on the network environment the system is member of. To see whether
changes have to be done, send a test email as follows:
[pg@a217 pg]~> mail -s "1st test from a217" user@domain.com
bla bla
ctrl/d
Cc: <return>
[pg@a217 pg]~>
Check the mail of user@domain.com
The reason the mail will not be received to above email address is that no MX records
exist in (internal) DNS-server and/or clients are not allowed to directly send mail via
SMTP.
Thus in case no email is received on this email-address, contact the mail-server manager
and consider to make changes on the Linux system.
First of all the hostname has to have a different local-ip-address than localhost in:
/etc/hosts
like:
127.0.0.1 localhost.localdomain localhost
127.0.0.2 a217
The IP-address of 127.0.0.2 for <hostname> is valid, but the real IP-address if the system
should be better in case the system has to be accessed with RGS through a ssh-tunnel.
Thus it is a good practice to keep the IP-address of a217 in /etc/hosts to 127.0.0.2 in case
the system is still at Vistec but when it is at the final destination, the IP-address of a217
should be the IP-address of the system itself.
To send emails, default sendmail is used. Due to the complex configuration scripts of
sendmail, postfix is explained here:
To setup postfix, login as root and edit the file:
/etc/postfix/main.cf
and append the next line to it:
relayhost = <ip-address>
wherein <ip-address> is the IP-address of the mail server. Thus in case the system is
moved to its final destination, change this IP-address accordingly. Ask the local system
administrator for the proper IP-address of the SMTP mail-server.
Finally append at least one of next lines to main.cf:
mydomain = vistec-litho.com
and/or
myhostname = a217.vistec-litho.com
After these lines are added, save and close this file.
Now startup the postfix service and let it startup after every reboot:
[root@a217 ~]# service postfix start
[root@a217 ~]# chkconfig postfix on
Do the mail test again:
[pg@a217 pg]~> mail -s "2nd test from a217" user@domain.com
bla bla
ctrl/d
Cc: <return>
[pg@a217 pg]~>