Sendmail Relay rules and configuration files for SENDMAIL configuration

zhaozj2021-02-11  197

Sendmail Relay rules and configuration file usage

Recommended: Einstein Posted: October 11, 2000 Readings: 390

-------------------------------------------------- ------------------------------

The first part of the Mail Relay rule

I. Software Environment: Sendmail 8.9.3

2. By default, RELAY rules

By default, if you have any settings (Sendmail Server), you can only send mail, network (local area network or internet), any other host on the network, cannot send mail to the SMTP server. If you want to be sent, you need to meet any of the following conditions (do not need to be satisfied):

1. Sender identity belongs to "Local or Allowed Senders".

2. Receiver identity belongs to "Local or Allowed Receiver".

That is, regardless of the sender of the mail or the mail reception object, the Sendmail mail server allows the Relay Your message as if one of them belongs to the local or allowed. So what is "local / allowed sender"?

In fact, there is only one, it is listed in File / etc / mail / relay-domains (without this file after the default installation, you can create it) or / etc / mail / access from the domain name or IP address line, such as:

ABC.COM (/ etc / mail / relay-domains)

Abc.com relay (/ etc / mail / access)

Note:

a. We assume that a company domain name is abc.com

b. The above two lines have the same meaning, just different grammar required in different files, and need to add relay in the / etc / mail / access file.

=== Discuss the situation of the domain name:

Back to what is the "local / allowed sender", if the domain name is listed in the Relay-Domains / Access file, look for the / etc / hosts file before the sender's IP address (usually this Because the Linux server is used by default, finding the DNS is first looking for the / etc / hosts file to see if there is a host domain name corresponding to this IP address, if no reverse DNS lookup, if you can find it back, find The domain part of the host belongs to the domain name listed in the above two files, and then the host name is the same, the IP address (the host's A record) is the same as the sender IP address, which allows the Relay mail, this Indicates that the sender belongs to the permitted sender.

That is to say, look at the definition in the /etc/host.conf file, usually this:

ORDER HOSTS, BIND

Multi on

The ORDER line refers to the precedent / etc / hosts, then find the DNS database. Now give an example:

As shown below:

Interior LAN | Internet

|Windows PC| -----------> |sendmail Server|

(192.168.11.12) SMTP (192.168.11.5) | (1.2.3.4)

(A) Send an email (b)

Jephe.abc.com sh.abc.com

(Figure 1)

There is a Windows PC on the internal LAN, referred to as machine A, and host named Jephe.abc.com to a Sendmail SMTP server connected to the internal LAN and Internet, referred to as machine B sends mail, address 192.168.11.12 and 192.168 .11.5, the external address of the SMTP server is 1.2.3.4 Line connection Internet. Suppose the company domain name is abc.com, machine B is both the SMTP server is also a DNS server, where we don't consider the firewall setting, that is, all in the internal LAN direction The machine can be free to enter (allowing all TCP / IP packets from / won 192.168.11.5 from / go to 192.168.11.5).

If there is a line in the machine B / etc / mail / relay-domains or / etc / mail / access file

ABC.COM

or

Abc.com relays

When A is sent to b, if B can find a line in its / etc / hosts

192.168.11.12 jephe.abc.com Allows A to send mail to b, which is to receive all messages from A, no matter where it is going, because this situation meets the first Relay rule, that is, the sender is allowed sender. At this point, you don't need to find DNS again, until this. The email has been received.

If the row corresponding to 192.168.11.12 (sender IP address) is found in / etc / hosts, then the DNS is found, and the 192.168.11.12 is reversely parsed, and the corresponding 192.168 can be found in the reverse DNS database. 11.12 The host record, and the host name found, then from the DNS, if the lookup is consistent, the relay is allowed to be the same as the above case, belongs to the first allowed RELAY rule.

Such as:

Find the DNS host named 192.168.11.12 in the DNS database. The Class A record address corresponding to the host Jephe is 192.168.11.12 in the DNS of the @ ABC.COM domain. .

The sender belongs to the local domain, that is, the allowed sender.

It should be noted that it is necessary to be resolved and unanimous, otherwise it is not allowed to record "May Bepeged" in / var / log / maillog in / var / log / maillog.

But not all records "May Bepeged" information is not allowed in the / var / log / maillog file, and some cases have recorded a warning message says "May Be forged", but the email is still receiving. It is below the case:

For example: there is two lines in the B-machine / etc / mail / relay-domains

ABC.COM

Yahoo.com

[Note: This is no longer subject to / etc / mail / access, because there is already said in / etc / mail / relay-domains

One line

ABC.COM

Equivalent to / etc / mail / access

Abc.com relays

Therefore, it is no longer described below, only / etc / mail / relay-domains or / etc / mail / access.]

If A is sent to B to Someone@yahoo.com. There is no corresponding record line corresponding to 192.168.11.12 in the B-machine / etc / hosts.

And in the B-machine (DNS server), IP address 192.168.11.12 can not be reverse, or can do reverse lookup, if you find it out for jephe.abc.com but in the forward look (for the main DNS for the abc.com The database in the database corresponds to the a record corresponding to the host Jephe, or the IP address of the host Jephe is not 192.168.11.12. but. The recipient is someone@yahoo.com, and the domain Yahoo.com is in / etc / mail / relay-domains. Then it is still allowed.

However, the warning message may Be forged to / var / log / maillog file, which allows for the second Mail Relay rule:

The recipient is the allowed recipient. Therefore, the warning message is always recorded in Maillog as long as it is a positive reverse DNS.

Sendmail is not simply viewing reverse DNS resolution, and the post-right basief must match, otherwise it is not relay, why? We will explain it later.

From this, we will lead to === What is "local or allowed receiver"?

This is relatively simple, that is, the domain part of the recipient's Email address is listed in / etc / mail / relay-domains or / etc / mail / access

In the file, if any recipient sent to the @ Yahoo.com domain is allowed to be received.

Pay attention to a range problem, if the sender's domain name (according to the previous / etc / hosts or positive reverse DNS unison) is listed in these two files, the sender can send to anyone's mail, It can be received, but if this is not this, only the retribute of the domain name of the recipient's Email address in these two files. The latter's situation is subject to the scope of the subject.

Another question of another payment is to be aware, that is, the domain name listed in the file relay-domains or access is both for the sender, and is also for the recipient. For the sender, check / etc / hosts, and forward DNS, for the recipient, only the domain portion of the recipient email address is checked.

Also, for the second Mail Relay rule, there is more situations, namely:

If the receiver's domain name part is listed in the /etc/sendmail.cw, the recipient belongs to the local recipient.

(By default, sendmail.cw is under / etc, of course you can also change the Sendmail.cw path in /etc/sendmail.cf)

Then check the alias file aliases (the specific path rely on your definition) to extend alias.

for example:

Internet

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -

(Eth0: 1.2.3.4) | Beijing telecom | |

[SMTP Server] [SMTP Server] [SMTP Server] [SMTP Server]

Sh.abc.com mail.abc.com bj.abc.com sz.abc.com

(Eth1: 192.168.11.5) (DNS) | |

| ____ | |

____ | ____ |_pc_| ___ __| _____ _____ | ______

(LAN) | (LAN) (LAN)

| (192.168.11.1)

[mailhost]

(Figure 2) If the company abc.com has a branch in Beijing, Shanghai and Shenzhen, headquarters in Beijing, put a MAIL server in Beijing Telecom Bureau, and other branches, Shanghai, Beijing, Shenzhen each use special lines Local ISP.

All externally entering to someone@abc.com is first stored in the mail.abc.com of Beijing Telecom Bureau.

The mail host, there is a line ABC.COM in the /etc/sendmail.cw on the mail server, and the mail sent to @ ABC.COM checks the alias file aliases.

If there are three lines as follows:

Shuser: shuser@sh.abc.com

BJUser: bjuser@bj.abc.com

Szuser: szuser@sz.abc.com

The messages sent to SHUSER @ abc.com, bjuser @ abc.com and szuser@abc.com are aligned with shuse @ sh.abc.com, bjuser @ bj.abc.com and szuser@sz.abc.com, Then distribute Sendmail SMTP from each branch

Mail Server.

Note: Sendmail checking the alias file is constantly checking until you can do it again. Specifically, the three lines in the file above, if mail.abc.com receives a letter is shuser@abc.com, discovering that abc.com in Sendmail.cw, receive the message (why? Because the domain part of the recipient's Email address is local receiver in the sendmail.cw file, the RELAY rule second point)

Local recipient checks alias files, alias to Shuser@sh.abc.com, then put alias from the Email Plan Section, now Sh.abc.com, compares the domains listed in Sendmail.cw, It is still in line with the alias until it cannot meet the conditions.

Nowadays, a question is not to be aware that don't make the alias check loop. If you add the SH.Abc.com to Sendmail.cw, you have an alias check cycle.

Now how do you send an email after the alias? The general send the mail process is like this:

If the above server mail.abc.com receives a letter from Shuser@abc.com, then after the other named shuser@sh.abc.com

1. Sendmail request DNS gives the CNAME record of the host Sh.abc.com, if you have CNAME to shmail.abc.com, then request DNS to see if there is Shmail's CNAME record until not

2. Now we assume that there is no CNAME record, still shuse@sh.abc.com. Sendmail requests DNS to give the MX record of Sh.abc.com and get a record:

SH mx sh.abc.com

3. Sendmail request DNS gives a record (IP address) of Sh.abc.com, the return value is 1.2.3.4

4. Establish a SMTP connection with 1.2.3.4 and then send a message.

The previous explanation has a domain name in / etc / mail / substcess, if only IP addresses are there?

If

192.168.11.12

or

192.168.11.12 relay

Then directly refer to the IP address of the sender machine. It can be the retention address of the internal network segment C Category: 10.0.0.0--10.255.255.255 (10.0.0.0/8)

Class B: 172.16.0.0-172.31.255.255 (172.16.0.0/12)

Class C: 192.168.0.0--192.168.255.255 (192.168.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.

Note the two questions below:

Question 1: The company considers mobile users.

The left portion in the figure above is actually map. Take the picture as an example. If a Shanghai company is not in the company, use the notebook to enter Shanghai Telecom 163 Internet, the employee not simply set the send mail server as SH. Abc.com (1.2.3.4). Make the email address set in Outlook Express as jephe@abc.com. why?

Because Sendmail does not check your sender's mail address, but your dial-up IP address, but your dial-up IP address is dynamically randomly assigned, and the domain name reversed by the IP address is the domain name of ISP. Not @ abc.com, actually, when you get an IP address, send mail to Sh.Abc.com, Sendmail only know your IP address,

Then after the application layer receives the data, the DNS is reversed to find the domain name corresponding to the IP address, but it is an ISP domain name. It is nothing to do with your organization. And most ISP does not set the reverse DNS search for dial-up IP address segments. recording.

Therefore, those employees who have dial to ISP, need to use the company's server as a send mail server, the company's mail server cannot configure only allows the company's employees to do it as a mail server, can't just only RELAY. The letter to the employee of ISP is required.

Current solution:

a. The company sets your own dial-in server, only the company employees can send mail after dialing in their username and password.

b. SMTP-AFTER-POP3 method, modify the POP3 program, and then accept your own letter after dialing to the ISP, POP3 detects that the IP address is then dynamically add this IP address to the RELAY-DOMAINS or Access file, allowing relay Default for half an hour.

c. Sendmail 8.10 joins the SMTP user authentication feature, and prompts to enter the username and password when you send an email.

Question 2: Why must I be inversely parsing, why is May Be forged?

If a hacker organization manipulates an ISP mechanism, if your Sendmail only checks the domain name that reverse DNS resolution, if your company's domain name allows the RELAY MAIL, the ISP mechanism that is manipulated by the hacker group can put it owned. The address segment sets the reverse resolution domain in its own reverse DNS database for your company's domain name, and then your sendmail does nothing to distinguish between it. Think the ISP user is your local / allowed sender, The consequence is conceivable.

The above introduces Sendmail Control Mail Relay:

Sendmail.cw

ACCESS

Relay-Domains

Aliases

in conclusion:

<< Sendmail how to relary your mail? >>

Condition 1: The sender is the permitted sender:

This depends on the domain name and IP address line listed in the file / etc / mail / assocics or / etc / mail / access, for the IP address, check if the sender's IP address is allowed, if not, and There is a domain name inside, check / etc / hosts and positive reverse DNS

Analyze whether there is a corresponding record to see if the domain name reversed is eligible.

Conditions 2: Local / permitted recipients.

Similarly, you must see whether the / etc / mail / access file is to see if the domain part of the recipient email address is listed in the above two files, and there is another check file is sendmail.cw, The domain name column in this file is considered to be a local recipient. Check the alias file to expand.

Other circumstances reject relay.

Part II Sendmail Profile

To explain all profiles, the M4 source files listed below have all the configuration files mentioned in this book as follows:

============================================= include (`../ m4 / cf.m4 ')

Define (`Confdef_user_id ',` `8: 12' ')

Ostype (`Linux ')

Undefine (`uucp_relay ')

undefine (`BitNet_Relay ')

Define (`confauto_rebuild ')

Define (`Confto_Connect ',` 1m')

Define (`ConfTry_null_mx_list ', true)

Define (`confdont_probe_interface", true)

Define (`procmail_mailer_path ',` / usr / bin / procmail')

Define (`alias_file ',` / etc / mail / aliases')

Define (`confprivacy_flags", `Authwarnings, Needmailhelo, NoExpn, Novrfy ')

Feature (`SMRSH ',` / usr / sbin / smrsh')

Feature (`Mailertable ',` hash -o / etc / mail / mailertable')

Feature (`Virtusertable ',` hash -o / etc / mail / virtusertable ")

Feature (`DomainTable ',` hash -o / etc / mail / domaintable ")

Feature (`genericstable ',` hash -o / etc / mail / genericstable ")

Generics_domain_file (`/ etc / mail / genericsdomain)

Feature (Allmasquerade)

Feature (masquerade_envelope)

Masquerade_as (MyDomain.com)

Feature (redirect)

Feature (always_add_domain)

Feature (use_cw_file)

Feature (local_procmail)

MAILER (procmail)

MAILER (SMTP)

Feature (Access_DB)

Feature (`blacklist_recipients')

=========================================

All profiles are as follows:

/ etc / mail / mailertable

/ etc / mail / domaintable

/ etc / mail / genericstable

/ etc / mail / genericsdomain

/ etc / mail / virtusertable We use the network structure of the leftmost Shanghai section in the second Shanghai section to explain the applicable rules and usage of the above five configuration files. You don't have to care about the network environment in the example, no matter For example, as long as you understand what the files are applied.

The resemblance is as follows:

----------------- Internet -----------------

| (1.2.3.4)

[SMTP Server] sh.abc.com

(192.168.11.5)

|

| Jephe.abc.com (192.168.11.12)

_____ | ____________________ [mypc] ______ [shmail] (192.168.11.1) ____

[Shanghai Internal Lan] shmail.abc.com

(Figure 3)

/ etc / mail / virtusrtable usage

1. If you have the following two lines on the sh.abcl.com /etc/sendmail.cw:

Public.sta.net.cn

Sh.abc.com

And / etc / mail / aliases have the following two rows (assuming / Etc/sendmail.cf in the path to / etc / mail / aliases)

admin: jwu@sh.abc.com

jwu: jwu@yahoo.com

When you send an email from [MyPC] to admin@public.sta.net.cn (Outgoing Server: Sh.abc.com). Where is this letter to be sent?

===> A: Usually, it will eventually be sent to the jwu@yahoo.com mailbox. Why?

Because after two alien checks. Finally Yahoo.com is not in the /etc/sendmail.cw file, so no alias is checked. Directly sent to jwu@yahoo.com.

2. But not completely, there is exceptions in the following cases (not necessarily the alias checking).

If there is a row in / etc / mail / virtusrtable

@ sh.abc.com% 1 @ [192.168.11.1]

And there is /etc/sendmail.cw

Sh.abc.com

And there is a line in / etc / mail / aliases

jwu: wat@yahoo.com

The letter sent to jwu@sh.abc.com is resolved to wat@yahoo.com or jwu @ [192.168.11.1]?

====> A: Resolution to JWU @ [192.168.11.1]

Let's take an example:

3. If it is still the same as the figure, / etc / mail / virtusertable

@ sh.abc.com% 1 @ [192.168.11.1]

/etc/sendmail.cw

Sh.abc.com

Public.sta.net.cn

/ etc / mail / aliases are:

admin: jwu@sh.abc.com

jwu: wat@yahoo.com

The letter sent to admin@public.sta.net.cn is ending where wat@yahoo.com is still jwu @ [192.168.11.1]?

===> A: jwu @ [192.168.11.1]

in conclusion:

a. When the domain portion of the recipient email address is in /etc/sendmail.cw, give priority to the virtusertable file, apply the definition rules in the file. (Example 2)

b. To apply the VirtUsertable rule, the domain part of the recipient mail address must exist in the /etc/sendmail.cw file (Example 2 and 3)

c. If the domain portion of the recipient email address is in the /etc/sendmail.cw file but does not have the corresponding definition in the VirtUsertable file, only the definition in Sendmail.cw will expand alias, once the alias recipient message is expanded. The domain part is defined in VirtUsertable, no longer name, running the definition rule (Example 3) / etc / mail / mailertable usage immediately running VirtUsertable.

The record of MX across DNS, takes precedence over MX records, can be different from the host setting specified by the MX record.

4. If / etc / mail / mailertable has

Sh.abc.com relay: [192.168.11.1]

And there is /etc/sendmail.cw

Sh.abc.com

And / etc / mail / virtusertable

@ sh.abc.com% 1 @ [192.168.11.1]

Where is the letter to jwu@sh.abc.com?

===> A: Use the VirtUsertable rules to transition to jwu @ [192.168.11.] Will be sent to the internal host Shmail

But a. If there is no / etc / mail / virtusrtable, look up local alias files

b. If the /etc/sendmail.cw is not or empty, check / etc / mail / mailertable is sent to jwu@sh.abc.com to the internal host Shmail (192.168.11.1)

Note: Transition to jwu @ [192.168.11.1] Recycling and sending a letter from jwu@sh.abc.com to 192.168.11.1 The host is a different concept. If you look from the message header, the former is Received By Shmail [192.168.11.1] for jwu @ [192.168.11.1]; the latter is received by shmail [192.168.11.] for jwu@sh.abc.com

in conclusion:

a. Priority order is Virtusrtable> sendmail.cw> mailertable> DNS MX record

b. Mailertable uses no need to exist in Sendmail.cw without the area of ​​the recipient email address.

c. mailertable is used to span DNS, which is preferred to MX records in DNS.

/ etc / mail / domainTable Usage Under no circumstances, DomainTable is the best inspection, and it is two: One is mainly to prevent misunderstanding of the domain name of your company.

The second is the replacement of our new old domain name. Example 5 is as follows:

5. If / etc / mail / domaintable is Yahoo.com Sh.abc.com

And there are sh.abc.com in /etc/sendmail.cw

And / etc / mail / virtusertable is @ Sh.abc.com% 1 @ [192.168.11.1]

And / etc / mail / mailertable has sh.abc.com relay: [192.168.11.1]

Let's go to jwu@yahoo.com where to go.

===> The transition is jwu @ [192.168.11.1].

Because the DomainTable file is first checked, jwu @ Yahoo.com is replaced with jwu@sh.abc.com. Then I then find that in /etc/sendmail.cw and in VirtUsertable, give priority in Virtusertable Rule transformation email address is jwu @ [192.168.11.1]

If the / etc / sendmail.cw does not have a sh.abc.com in / etc / sendmail.cw, then check the rules in the mailertable, then send the email address jwu@sh.abc.com to 192.168.11.1 server .

No matter where the situation (refers to MAILERTABLE or Virtusrtable), the last recipient receives the letter to check the mail header information, in the Message Header's to: Coales is jwu@sh.abc.com. You are looking for in the Message Header No information about any jwu@yahoo.com, but there is a record of jwu@yahoo.com in the first Received row in Message Envelope. in conclusion:

1. Whenever DomainTable is prioritized, without any additional conditions, unconditional checks, and whether there is a domain name in Sendmail.cw.

2. Generally used to do domain name replacement, if your company @ abc.com may be misled by employees to abd.com, put it below

/ etc / mail / domaintable

Abd.com abc.com

Usage of / etc / mail / genericstable and / etc / mail / genericsdomain

Role: Rewote the sender email address, consider the following figure 4:

[Pc] a (jwu)

|

| C PPP LINK

_____Lan _______________ [SMTP / POP3 Server] ------- ISP ------- Internet

| Jwu@domain.com @ ISP.NET

| Tom@domain.com jephe@isp.net

[Pc] B (Tom) Tomyh@isp.net

(Figure 4)

Considering the above situation, there are two PCs, A and B on the company's LAN. The accounts on the internal mail server C are jwu@domain.com and Tom@domain.com, and ISP is connected by PPP, and two Personally have their own email address Jephe@isp.net and Tomyh@isp.net now need:

If the JWU wants to send a seal to TOM, you want to be received by the server C and delivered directly to B locally, and the sender email address is jwu@domain.com, but if jwu wants to send a letter to the external Internet If you want to be received by the other party, the sender email address is jephe@isp.net, that is, the mail account on the ISP.

==== "The Sendmail on the server C can do this. This is to use genericstable and genericsdomain. It can be done when the conditions below are satisfied.

First consider whether it is sending to TOM or a user on the Internet is changed to jephe@isp.net:

1. Setting the client email address in the Outlook Express on your own PC A machine to jwu@domain.com

2. Server C Set the following line in / etc / mail / genericstable

jwu jephe@isp.net

3. Server C has the following lines in / etc / mail / genericsdomain

Domain.com

When the above three conditions are simultaneously satisfied, the JWU is sent to any to anyone, and the sender email address is rewritten as jephe@isp.net, and the same situation is applied to Tom.

If the sender email address is jwu@domain.com if you want to send to a local user such as TOM, there is no M4-based solution, you need to find the following lines in /etc/sendmail.cf to delete two rows.

S10

R <@> $ n errors to mailer-daemonr @ <@> $ n temporarily bypass sun bogosity

R $: $> 50 $ 1 add local domain if needed

R $$$> 94 $ 1 do masquerading <- delete this line

#

# Hader sender shutriting

#

S30

R <@> $ n errors to mailer-daemon

R @ @ $ *> $ n temporarily bypass sun bogosity

R $: $> 50 $ 1 add local domain if needed

R $: $> 93 $ 1 do masquerading <- delete this line

Again, consider the following figure five

_______________ [SMTP Server] _______ DDN_LINK_____internet

(Figure 5)

Set the bottom on the SMTP server:

/ etc / mail / genericstable

Jwu jwu@sources.com

/ etc / mail / genericsdomain

Test.com

If the SMTP server receives a letter from the Internet to jw@test.com, the sender email address is rewritten as jwu@sources.com, and the return address in the message envelope is also jwu @ Sourcees .com

in conclusion:

a. When the user part of the sender's email address is listed in / etc / mail / genericstable and / etc / mail /

When genericsdomain is in two files, the sender email address is rewritten as defined in / etc / mail / genericstable.

Email address.

b. Whether it is from the LAN or from the Internet, as long as it is handled by SendMail server, check the rules.

Part III Sendmail Masquerading

Commonly used camouflage rules:

1.masquerade_as (YourDomain.com)

2.Feature (Allmasquerade)

3.FEATURE (Masquerade_ENVELOPE)

4. Masquerade_Domain (mydomain.com)

5.FEATURE (Masquerade_entire_domain)

Masquerade_as (YourDomain.com) indicates which domain name of all other camouflage rules work.

By default, only the email address of the row and reply to: rows.

Feature (allmasquerade) to: address in the Messes Header

Feature (Masquerade_envelope) Retrn Address for the Message Envelope section, which is used when the message is not delivered and returned to the sender.

Question 1: What happens in the case of camouflage?

Improvement when the following conditions are met at the same time:

a. The domain section of the address in the client Outlook Express is in the /etc/sendmail.cw file, ie the local domain.

b. Clients directly send mail to the Sendmail server or the sendmail server receives a message from the Internet, but the domain part of the sender's email address pointed out in the FROM line is in the /etc/sendmail.cw. The words of the SENDMAIL mail server,

=====> The domain part of the sender's mail address is cured as the domain specified in Masquerade_as (YourDomain.com).

YourDomain.com

for example:

If you have a line in /etc/sendmail.cw

Yahoo.com

And set Masquerade_as (Domain.com)

And the sender client sets the mail address as jwu@yahoo.com. After this SMTP server with Sendmail, the sender email address is rewritten into jwu@domain.com.

If the recipient is jwu@yahoo.com, it also rewrites the recipient address for jwu@domain.com.

Again for example:

If masquerade_as (domain.com) is set, and set the masquerade_domain section, the entire domain is disguised.

All hosts. For example, it is set as follows:

Masquerade_as (Masq.com)

Masquerade_domain (foo.org)

Masquerade_domain (bar.com)

Feature (Masquerade_entire_Domain)

Then * foo.org and * bar.com are converted to Masq.com, otherwise only foo.org and bar.com are converted to Masq.com.

Section IV FAQ Treatment Method

1. I have a user who left the company, but still received a lot about him / her email, how can I let others know that this person has used the new email address.

===> Plus the line to the M4 macro configuration file

"FEATURE (` redirect ') DNL "

Then add the following line to the aliases file ilduser: him@new.address.Redirect

All those sent to the old email address will receive a notification message for a new email address.

2. Why didn't I change the various configuration files?

Run MakeMap after any configuration file changes, for example:

#makemap hash mailertable

But for the change of Sendmail.cw and relay-domains files to restart Sendmail with the following command

#killall -hup sendmail

Changes to AliaSes files To run

#Newaliases

3. I have configured all the files as required and I still can't send an email. Why?

First ensure your Sendmail background is running. Check if you are running with #ps -aux | grep sendmail, then check if you can #telnet mailserver 25. If you still can't see if #PING Mail Server Note: Sendmail is connected to the TCP port 25 on 25, and the TCP connection is two-way, you want to check the routing table, see if the reply package generated by a TCP connection coming in is correctly replied to the sender in the opposite direction.

4. How do I check an email?

Perform the following command on the Sendmail mail server.

# echo testing | / usr / sbin / sendmail -v someone@somedomain.com

Author: Jephe

Source: Unknown

转载请注明原文地址:https://www.9cbs.com/read-3689.html

New Post(0)