Generally, Sendmail does not provide Relay information for the mail service. This prevents malicious users from sending emails to other email servers. By default, the Relay function is disabled in Sendmail configuration.
If you want to Relay the email for another server, you can set it as follows -- add the machine for the Relay email to the access file in the format:
Hostname RELAY
Ipaddress RELAY
If you want to Relay a letter for multiple machines in one domain, you can directly add its subnet IP address or domain name to the/etc/mail/access file, as shown below:
Access File Content:
Domainname.com RELAY allows relay mails for all computers in the domainname domain)
Localhost RELAY
192.168.1.0 RELAY (for all machines in the network for 192.168.1.0 relay Mail)
The Sendmail configuration file only determines which machines and domains can use the mail server to forward emails. After compilation, You need:
# Makemap hash access. db <access. The file relationships of other configurations are not very large. You can use the default installation content temporarily. Now, Sendmail is working properly.
The next step is to test the mail sending function of the mail server. Note: during the test, do not only test the local user. For example, if your domain is abc.com, do not test user1@abc.com users only on the mail server. Because user1 is a local user, the mail server can Relay it. You should use the mail client such as Outlook to test the server on another machine on the LAN.
Fixed IP users (including cross-region users) can add their fixed IP addresses to the database. It is not applicable to people who often go on business trips.