Oracle eMail Server Administrator's Guide Release 5.2 A86653-01 |
| Library | Service | Index

# 7
Managing the SMTP Gateway and Sendmail

You can install an SMTP gateway to provide access to other mail systems such as Sendmail, the most common mail transfer agent included with most major UNIX-based Internet hosts that handle e-mail routing.

Configuring a gateway includes the following topics discussed in this chapter:

- Creating an SMTP Gateway

- Creating the SMTP Gateway Configuration File

- Creating the SMTP Gateway Configuration File

- Registering the SMTP Gateway with Sendmail

- Creating Aliases to Redirect Incoming Mail to the SMTP Gateway

- Creating Gateway Rewriting Rules

- Configuring the Gateway for Multibyte Support

- Configuring Multiple SMTP Gateways

- Removing (Deregistering) an SMTP/MIME Gateway

- Storing Messages Encrypted with S/MIME

- Rejecting Incoming Spam Messages

- Preventing Use of the Server as a Mail Relay

- Configuring Sendmail for to Check for Viruses

## Creating an SMTP Gateway

You must have at least one SMTP gateway running in your system so that your users can send e-mail to each other. You can use the Configuration Assistant to create your first gateway after you install a node.

See Also: the Oracle eMail Server Installation Guide for instructions.

You can also create a gateway manually using the following procedure.

When you create a gateway, eMail Server creates both an incoming and an outgoing gateway process. For example, if your gateway is called GWY1, it would have the processes GWY1_IN for incoming mail, and GWY1 for outgoing mail.

After creating the gateway, you must perform the following tasks manually to complete the gateway configuration:

- Create a gateway configuration file to specify how to connect to the database. Refer to "Creating the SMTP Gateway Configuration File" for instructions.

- Register the gateway with Sendmail so that Sendmail knows how to forward incoming messages to the gateway. Refer to "Registering the SMTP Gateway with Sendmail" for instructions.

  Caution: After you create a gateway, do not try change the name. Instead, you must delete the gateway record and enter a new one with the correct name. Renaming the gateway in the Administration Tool could cause errors.

  See Also: Chapter 9, "Managing Processes", for more information about gateway processes

### Steps for Creating an SMTP Gateway

This task can be done automatically by using the Configuration Assistant, or it can be done manually by using the Administration Tool GUI or the OOMGR command-line interface.

See Also: the Oracle eMail Server Installation Guide for instructions on using the Configuration Assistant.

#### In the Administration Tool GUI

1. Start the Administration Tool GUI.

2. In the navigation tree, select Messaging System > Domains > domain_name > Gateways.

3. In the toolbar, click (Create).

4. Complete the Add a New Gateway dialog box.

   You will use the gateway name and password that you specify here when create the gateway configuration file (unx.cfg). If you do not specify a password, the default is `welcome`.

   See Also: "Creating the SMTP Gateway Configuration File" for more information

5. Click OK.

The new gateway appears under Gateways in the navigation tree. If you expand the new gateway, you will see the two gateway processes that were created. These processes also appear under Nodes > node_name > Processes > Instances > gateway_instance.

#### In OOMGR

1. Start OOMGR.

2. Enter the following command at the OOMGR prompt:

       IOFCMGR>insert gateway name=<gateway_name> node=<node_name> kind=SMTP

## Creating the SMTP Gateway Configuration File

After you create a gateway, you must create a gateway configuration file, unx.cfg, to specify the gateway name and password as well as the connect string for the database so that the gateway can access the eMail Server database. Each set of incoming and outgoing gateway processes needs a separate configuration file.

### Prerequisites to Creating the SMTP Gateway Configuration File

Before creating the gateway configuration file, you must create a gateway. Refer to "Creating an SMTP Gateway" for instructions.

### Steps for Creating the SMTP Gateway Configuration File

This task must be done manually using a text editor.

1. Use any text editor to create a file named

       $ORACLE_HOME/office/config/node_sid/unx.cfg

2. Enter the gateway name(s), password(s), and connect_string(s) for the database in the unx.cfg file as follows:

       gateway password connect_string

   Parameter | Description
   --- | ---
   gateway | Name of the gateway.
   password | Password of the gateway process.
   connect_string | The connect_string for the mail node. This must be the same value as the one used during node installation.

Add one line per node in the system. The first connect_string is used to fetch the gateway parameters. The following connect_strings are used to deliver mail. The gateway tries to determine the home node for the recipient and delivers the mail directly to that node. If it cannot determine the home node or if the mail is addressed to recipients on multiple nodes, the mail is delivered to the default node. The default node is specified by the second connect_string in the config file. If there is only one connect_string in the file, then it is used for both fetching parameters and delivering mail.

See Also: "Creating an SMTP Gateway" for more information if you do not know the gateway name and password

## Registering the SMTP Gateway with Sendmail

After creating the gateway configuration file, you must register the gateway with Sendmail, the standard UNIX mail transfer agent that handles all messages traveling to and from the Internet. To register the gateway with Sendmail, you must specify gateway information in the sendmail.cf file so that Sendmail knows how to forward messages coming in from the Internet.

Note: You may use any version of Sendmail supplied with your operating system. If you do not have Sendmail, you can download it from ftp.sendmail.org. For documentation on Sendmail, visit the Sendmail Web site at `http://www.sendmail.org`

Note: The Sendmail file may require configuration steps in addition to those provided here, depending on how many gateways you are using, and the complexity of your system. See the documentation for your version of Sendmail for more information.

Note: Oracle Support Services can only provide information for the basic Sendmail configuration required to receive messages. For more complex configurations, contact the distributor of your Sendmail program.

### Prerequisites to Registering the SMTP Gateway with Sendmail

Before registering the SMTP/MIME gateway with Sendmail, you should complete the following tasks:

- "Creating an SMTP Gateway"

- "Creating the SMTP Gateway Configuration File"

### Steps for Registering the SMTP Gateway with Sendmail

This task must be done manually using a text editor.

1. Use any text editor to modify the sendmail.cf file (usually located in either /etc/ or /etc/mail/) by adding the following information about the SMTP/MIME mailer to the end of the file:

       Mofcmail, [tab] P=<$ORACLE_HOME>/bin/ofcuto, F=rlSsDCFMPpmn, S=10, R=20,

       [tab]A=ofcuto - <$ORACLE_HOME> <ORACLE_SID> -f <config_file> - $g $a $b $f
       $x ( $u )

   Replace | With
   --- | ---
   `Mofcmail` | This tells Sendmail to run the eMail Server mailer. The mailer delivers the message to the Gateway process, which then inserts the message in the eMail Server database. You may want to specify a different mailer name. See the Sendmail documentation for more information about mailers.
   `<$ORACLE_HOME>` | Enter the full path for your $ORACLE_HOME directory.
   <ORACLE_SID> | Enter the value for Oracle sid of your database.
   `[tab]` | Press the Tab key where indicated by [tab] instead of the space bar.
   `<config_file>` | Name of the gateway configuration file. The default filename is unx.cfg.See Also: "Creating the SMTP Gateway Configuration File" for more information about the SMTP gateway configuration file

2. In the system-dependent section of the sendmail.cf file, add one of the following entries to the second-to-last entry of ruleset 0 before the local names line:

       ## eMail Server: Hook to eMail Server mailer
       ##
       R$+.ofcmail[tab][tab]$#ofcmail $:$1[tab]{tab]eMail Server passoff

   or

       ## eMail Server: Hook to eMail Server mailer
       ##
       R$+.OFCMAIL[tab][tab]$#ofcmail $:$1[tab][tab]eMail Server passoff

3. In the list of trusted users in the sendmail.cf file, add the username for the owner of the eMail Server $ORACLE_HOME directory. Trusted users such as root, daemon, and uucp generally begin with a "T":

       T root daemon uucp <eMail Server_owner>

4. Create a frozen version of the sendmail.cf file. If your version of Sendmail does not support the frozen version, changes to the sendmail.cf file take effect when the Sendmail daemon starts. To create a frozen version of the file, open a shell tool and enter the following command:

       $ /usr/lib/sendmail -bz

5. If you want to automatically start Sendmail when you reboot the machine, modify the /etc/rc.local file by adding a line with the location of the Sendmail daemon (usually /usr/lib/sendmail). This guarantees delivery of messages waiting to be sent from SMTP/MIME mail to eMail Server.

6. After modifying the sendmail.cf file and the rc.local file, restart Sendmail as the root user.

   On Windows NT, refer to the Windows NT documentation for instructions.

   On Solaris, use the following procedure:

   1. To locate the Process ID of the existing Sendmail, enter the following command:

          $ ps -ef|grep sendmail

   2. To terminate the Sendmail process, enter the following command:

          $ kill -9 <process_id>

   3. To restart Sendmail, enter the following:

          $ /usr/lib/sendmail -bd -q30m

7. Set up aliases to redirect incoming mail to the gateway. Refer to "Creating Aliases to Redirect Incoming Mail to the SMTP Gateway" for instructions.

## Creating Aliases to Redirect Incoming Mail to the SMTP Gateway

If the sendmail configuration file is set up as described in "Registering the SMTP Gateway with Sendmail", then incoming messages must be addressed using the following format:

    userid.mailer_name@domain

To address messages using the standard Internet naming conventions (userid@domain), you can create an alias for each user ID that maps the user ID to userid.mailer_name. To do this add the following line to the end of sendmail alias file (usually /etc/mail/aliases):

    userid: userid.mailer_name

Variable | Description
--- | ---
`userid` | User name of the eMail Server user as defined in the eMail Server directory. Refer to "Displaying a Directory Entry" for instructions on finding user names.
`mailer_name` | Name of the mailer specified in the Sendmail.cf file. If you use the example provided in step 2 of "Registering the SMTP Gateway with Sendmail", the mailer name is `ofcmail`.

Note: If you do not use the procedure in "Registering the SMTP Gateway with Sendmail" to configure the gateway for Sendmail, then you may need to use another procedure for setting up aliases. For documentation on Sendmail, go to the Sendmail Web site at `http://www.sendmail.org`

## Creating Gateway Rewriting Rules

You can create rewriting rules to redirect message routing and to manage addressing details, such as gateways. Rewriting rules search for addresses containing certain patterns of characters and modify the addresses in some way. These rules are used primarily to interpret messages sent through the Internet.

### Steps for Creating Gateway Rewriting Rules

This task can be performed through either the Administration Tool GUI, or the OOMGR command-line interface.

See Also: "Guidelines for Creating Gateway Rewriting Rules" for more information about performing this task

#### In the Administration Tool GUI

1. Start the Administration Tool GUI.

2. In the navigation tree, select Messaging System > Domains > domain_name > Rewriting Rules.

3. In the toolbar, click (Create).

4. Complete the Rewriting Rule dialog box.

   See Also: "Parameters for Creating Gateway Rewriting Rules" for more information about the parameters in this dialog box

5. Click OK.

#### In OOMGR

1. Start OOMGR.

2. Enter the following command at the OOMGR prompt:

       IOFCMGR>insert rule ruleno=<rule_number>
       2>pattern=<pattern>
       3>result=<result>
       4><description>;

   See Also: "Parameters for Creating Gateway Rewriting Rules" for more information about the parameters available with this command

##### Example:

To create a pair of rules that leave correct addresses untouched and add the necessary gateway name to incorrect addresses, you might create the following rules:

    ruleno=10 pattern=%:% result=%0:%1 description=any address that already
    specifies SMTP: is left the way it is

    ruleno=20 pattern=%@% result=SMTP.anywhere.com:%0@%1 description=any address
    that has @ gets SMTP:anywhere.com added to the beginning

### Parameters for Creating Gateway Rewriting Rules

Parameter | Description
--- | ---
`<description>` (Optional) | Description of the rule. The maximum length is 255 characters.
`pattern` | Pattern that you want to search for in the addresses. The maximum length is 255 characters. Use the percent sign (%) as a wildcard to represent part of an address. For example, suppose you have: Address: unix2:jdoe@acme.com Rule Pattern: unix%:% The first % in the rule pattern represents everything between "unix" and the colon (in this case, "2"). The second % represents everything after the colon (in this case, "jdoe@acme.com").
`result` | How you want to change addresses that fit the rule pattern. The maximum length is 255 characters. Use the percent sign followed by a digit (%0, %1, etc.) to represent the wildcard specified in the pattern. In the result, the % signs are numbered to indicate which % from the pattern to which you are referring. For example, suppose you have: Address: unix2:jdoe@acme.com Rule Pattern: unix%:% Rule Result: unix%0.acme.com:%1 In the rule result, %0 represents the first wildcard identified in the pattern (in this case, "2"). %1 represents the second wildcard identified in the pattern (in this case, "jdoe@acme.com"). This rule inserts "acme.com" between "unix2" and "jdoe@acme.com". The result creates the address "unix2.acme.com:jdoe@acme.com".
`ruleno` | Sequence number of the rule. Rules are applied in order. Only the first rule with a pattern that matches the address is applied.

### Guidelines for Creating Gateway Rewriting Rules

- Before creating rewriting rules, you should be familiar with the gateway addressing format. For mail that is passed from eMail Server to the SMTP/MIME mail account, use this format:

      <gateway_name>:<foreign_address>

  Parameter | Description
  --- | ---
  <`gateway_name`> | Name of the gateway process entered when creating the gateway record. See "Creating an SMTP Gateway" for more information.
  <`foreign_address`> | SMTP mailbox address of the recipient. This must adhere to the rules governing SMTP mail addresses.

  For example, if the name of the gateway is `unix2.domain1` and the SMTP mailbox of the recipient address is `jsmith@acme.com`, you would address the message:

      unix2.domain1:jsmith@acme.com

- For mail sent from the SMTP mail account to eMail Server, the `suffix``.``mailer_name` (the name you assigned the SMTP/MIME gateway mailer in the sendmail.cf file) must be added to the user's username. If you use the example provided in step 2 of "Registering the SMTP Gateway with Sendmail", the mailer name is `ofcmail`, and you would use the following format for the user name:

      <username.ofcmail>@<internet_address>

  Parameter | Description
  --- | ---
  <`username`> | A valid eMail Server address. This address may be the user's full address (username.domain_name) or any valid public alias or distribution list.
  <`internet_address`> | The Internet address of the Internet host to which the message is going. Internet addresses for commercial organizations usually use the convention company_name.com.

- Rules apply only to messages and invitations sent from the node in which you define the rules.

- Rules are applied sequentially, starting with Rule 1. Only one rule is applied to each address. The rule applied to an address is the first rule having a pattern that matches the address.

## Configuring the Gateway for Multibyte Support

The eMail Server SMTP/MIME Gateway supports Japanese, Chinese, and Korean multibyte character encoding for incoming and outgoing mail.

To configure the character encoding for SMTP/MIME gateway, you must perform the following tasks:

- Specifying the Language to Support

- Specifying the Character Set and Encoding Types

### Specifying the Language to Support

Modify the ExecArguments parameter value, `-n nls-lang`, for the incoming gateway process to specify the language that you want the gateway to support.

#### Steps for Configuring the Gateway for Multibyte Support

This task can be performed through either the Administration Tool GUI, or the OOMGR command-line interface.

##### In the Administration Tool GUI

1. Start the Administration Tool GUI.

2. In the navigation tree, select Messaging System > Domains > domain_name > Gateways > gateway_name > gateway_process_in.

3. In the right pane, enter the following command in the Executable Arguments text box:

       '-f <config_file> -n <nls_lang>'

   See Also: "Variables for Configuring the Gateway for Multibyte Support" for more information about the parameters in this dialog box

4. Click Apply.

##### In OOMGR

1. Start OOMGR.

2. Enter the following command at the OOMGR prompt:

       IOFCMGR>modify process server=<gateway_name_in.text>
       2>instance=<instance_number> to execarguments='-f <config_file>
       3>-n <nls_lang>';

   See Also: "Variables for Configuring the Gateway for Multibyte Support" for more information about the parameters available with this command

### Variables for Configuring the Gateway for Multibyte Support

Variable | Description
--- | ---
<`config_file`> (Optional) | Name of the gateway configuration file (optional). See Also: "Creating the SMTP Gateway Configuration File" for more information about this file
<`gateway_name_in`> | Name of the inbound gateway.
`<instance_number>` (OOMGR only) | Instance of the gateway to process incoming mail.
<`nls_lang`> | NLS_LANG value consisting of three parts: language, territory, and character set. The syntax is: `Language_Territory.Charset` For example: `Japanese_Japan.JA16EUC` `Korean_Korea.KO16KSC5601` `Chinese_China.ZHT16BIG5` See Also: "Supported Languages and Character Sets" for a complete list of Asian languages and character sets supported

### Specifying the Character Set and Encoding Types

After creating a gateway, you need to modify the following three process parameters of the SMTP/MIME gateway:

- `default_charset`, the default encoding type for outbound and inbound messages

- `default_textencoding`, the default encoding type of message encoding

- `default_hdrencoding`, the default encoding type for the MIME header

Refer to "Specifying Multi-value Parameters" for instructions on how to ____.

See Also: "Gateway Process Parameters" for more information about the parameters

##### Example:

``

- `default_charset iso-2022-JP`

- `default_textencoding 7bit`

- `default_hdrencoding B` (`B` specifies base64 and `Q` indicates quoted-printable.)

### Supported Languages and Character Sets

The following table lists the database character sets and the character encoding for Japanese, Chinese, and Korean languages that are supported by the SMTP/MIME gateway.

Language Encoding | Database Character Set | Encoding Method | Character Size
--- | --- | --- | ---
Japanese | JA16SJIS | ISO-2022-JP | 7-bit
| JA16EUC | ISO-2022-JP | 7-bit
Simplified Chinese | ZHS16CGB231280 | HZ-GB-2312 | 7-bit
| ZHS16CGB231280 | HZ-GB2312-80 | 7-bit
| ZHS16CGB231280 | CN-GB | 8-bit
| ZHS16CGB231280 | ISO-2022-CN | 7-bit
| ZHS16CGB231280 | ISO-2022-CN-EXT | 7-bit
Traditional Chinese | ZHT32EUC | BIG5 | 8-bit
| ZHT32EUC | CN-BIG5 | 8-bit
| ZHT32EUC | ISO-2022-CN | 7-bit
| ZHT32EUC | ISO-2022-CN-EXT | 7-bit
| ZHT16BIG5 | CN-BIG5 | 8-bit
| ZHT16BIG5 | BIG5 | 8-bit
| ZHT16BIG5 | ISO-2022-CN | 7-bit
| ZHT16BIG5 | ISO-2022-CN-EXT | 7-bit
Korean | KO16KSC5601 | ISO-2022-KR | 7-bit

## Configuring Multiple SMTP Gateways

If you want to run multiple gateways on one node to distribute the workload or specify different parameters for different gateways such as the language parameters, then you must register and configure additional instances of the gateway process. This procedure assumes that you've already registered and configured one gateway process.

Note: Configuring multiple gateways may require additional configuration of Sendmail. Refer to the Sendmail documentation for more information about how to configure it for multiple gateways.

1. In $ORACLE_HOME/office/config/node_sid, create a gateway configuration file for each additional gateway. Name the new files unx2.cfg, unx3.cfg, etc.

   See Also: "Creating the SMTP Gateway Configuration File"

2. You may want to specify a different mailer name for the new gateway in the sendmail.cf file.

   See Also: "Registering the SMTP Gateway with Sendmail" for more information about the mailer Sendmail documentation for more information about mailers.

3. Set the configuration file name to the new inbound mail server by setting the ExecArguments parameter for the gateway process to:

       execarguments='-f <config_file>'

   Refer to "Setting a Parameter for a Registered Process" for instructions.

## Removing (Deregistering) an SMTP/MIME Gateway

When you install an SMTP/MIME Gateway, you register the gateway with sendmail, the standard UNIX mail transfer agent. If you want to remove a gateway from your eMail Server system, you must deregister the gateway before deleting it. Deregistering the gateway removes the gateway's processes. If you do not deregister the gateway, ghost processes will continue. These processes must then be stopped manually. The Administration Tool automatically deregisters before deleting the gateway.

### Steps for Removing (Deregistering) an SMTP/MIME Gateway

This task can be performed through either the Administration Tool GUI, or the OOMGR command-line interface.

#### In the Administration Tool GUI

1. Start the Administration Tool GUI.

2. In the navigation tree, select Messaging System > Domains > domain_name > Gateways > gateway_name.

3. In the toolbar, click (Remove).

#### In OOMGR

1. Start OOMGR.

2. Deregister the gateway by entering the following command at the OOMGR prompt:

       IOFCMGR> deregister gateway name=<gateway_name>

3. Delete the gateway by entering the following command at the OOMGR prompt:

       IOFCMGR> delete gateway name=<gateway_name>

## Storing Messages Encrypted with S/MIME

Messages being sent through the gateway can be stored in either encoded, or decoded format. This is important of you want to support the S/MIME standard for verifying the authenticity of a client. You can specify this format by modifying the `store_body` parameter.

Decoded format means that a message is broken down into parts, such as the header and body, decoded, and then stored in different database tables. Most clients understand how to retrieve decoded messages from these tables. However, if you are supporting S/MIME, messages with digital signatures will lose their signatures so authentication verification cannot happen.

Encoded format means that the gateway stores the message exactly as it is received in encoded format. This preserves encryption and digital signatures for S/MIME, but this format is currently only understood by the IMAP4 and POP3 protocol servers. Other clients may not be able to retrieve these messages.

You also have the option to save messages in both encoded and decoded formats to support all types of clients, but this can significantly increase the amount of database space used to save messages.

See Also: Oracle eMail Server Understanding and Planning Guide for more information about S/MIME. "Gateway Process Parameters" for more information about the `STORE_BODY` parameter.

## Rejecting Incoming Spam Messages

You can configure Sendmail 8.8 or higher to reject unwanted junk mail (spam) from e-mail addresses and domains that you specify. When you do this, the unwanted messages are not delivered and are automatically returned to the sender.

Note: You must have Sendmail 8.8 to use the antispam features. If you do not have Sendmail 8.8, you can download it from `ftp.sendmail.org` For documentation on Sendmail 8.8, go to the Sendmail Web site at `http:// www.sendmail.org.`

### Steps for Rejecting Incoming Spam Messages

This task must be done manually using a text editor.

1. Log in as root.

2. Use any text editor to create the following files:

   - /etc/mail/Spammers for rejecting e-mail addresses

   - /etc/mail/SpamDomains for rejecting entire domains

3. In the /etc/mail/Spammers file, list all of the e-mail addresses for users whose messages you want to reject, with one address on each line.

   For example:

       ckent@acme.com
       llane@acme.com
       jolsen@acme.com

4. In the /etc/mail/SpamDomains file, list all of the domains with messages you want to reject, with one domain on each line.

   For example:

       acme.com
       acme-pro.com
       junkmail.com

5. Use any text editor to open your sendmail.cf file (usually located in either /etc/ or /etc/mail/).

6. Add the following lines at the beginning of the sendmail.cf file:

       #Files to keep spammers information
       F{SpamDomains} /etc/mail/SpamDomains
       F{Spammers} /etc/mail/Spammers

7. Add the following lines at the end of the sendmail.cf file:

       ###############################################
       #############  STOP THE SPAMMERS  #############
       ###############################################

       Scheck_mail
       R$={Spammers}	$#error $@ 5.7.1 $:	"550 We don't accept junk mail"
       R<$={Spammers}>	$#error $@ 5.7.1 $:	"550 We don't accept junk mail"
       R<$={Spammers}.>	$#error $@ 5.7.1 $:	"550 We don't accept junk mail"
       R$*	$: $>3 $1
       R$*<$*@$={SpamDomains}.>$*	$#error $@ 5.7.1 $:	"550 We don't accept junk mail from your domain"
       R$*<$*@$={SpamDomains}>$*	$#error $@ 5.7.1 $:	"550 We don't accept junk mail from your domain"

   Note: You must press the Tab key where indicated by [tab] to separate the columns in this file.

8. Kill the Sendmail process and start it again.

   On Windows NT, see the Windows NT documentation for instructions.

   On Solaris:

   1. To locate the Process ID of the existing Sendmail, enter the following command:

          $ ps -ef|grep sendmail

   2. To terminate the Sendmail process, enter the following command:

          $ kill -9 <process_id>

   3. To restart Sendmail, enter the following:

          $ /usr/lib/sendmail -bd -q30m

## Preventing Use of the Server as a Mail Relay

You can configure Sendmail 8.8 or higher to prevent junk-mail senders from using your server machine as a mail relay to forward unwanted spam messages by only delivering messages to or from a local machine.

### Steps for Preventing Use of the Server as a Mail Relay

This task must be done manually using a text editor. There are two methods for completing this task.

#### Method 1: Preventing use of the server as a mail relay when the Sendmail resides on a machine that is also the mail server in a system and handles all user messages

1. Use any text editor to open your sendmail.cf file (usually located in either /etc/ or /etc/mail/).

2. Add all the hostnames and nicknames of your machine to the Cw line found at the beginning of the sendmail.cf file.

   For example:

       Cw acme us.acme.com acme-sun acme-sun.us.acme.com

3. Add the following lines at the end of the sendmail.cf file:

       Scheck_rcpt
       R$* [tab] $: $>3 $1
       R$+<@$=w>$* [tab] $@ok
       R$+<@$=w.>$* [tab] $@ok
       R$+<@$=w.LOCAL>$* [tab] $@ok
       R$*  [tab] $#error $@ 5.7.1 $: [tab] "550 we do not support relaying"

   Note: You must press the Tab key where indicated by [tab] to separate the columns in this file.

4. Kill the Sendmail process and start it again.

   On Windows NT, see the Windows NT documentation for instructions.

   On Solaris:

   1. To locate the Process ID of the existing Sendmail, enter the following command:

          $ ps -ef|grep sendmail

   2. To terminate the Sendmail process, enter the following command:

          $ kill -9 <process_id>

   3. To restart Sendmail, enter the following:

          $ /usr/lib/sendmail -bd -q30m

#### Method 2: Preventing use of the server as a mail relay when Sendmail resides on a machine that acts as a gatekeeper for an internal network of machines

An internal machine will be considered as an outsider by the gatekeeper. eMail Server uses a more complicated check_rcpt rule set example to handle this situation:

1. Log in as root.

2. Use any text editor to open the file /etc/mail/LocalIP.

3. In the file, add the maximal common parts of the IP addresses of all of the internal machines, with one address on each line (include 127.0.0.1 for your local host).

   For example:

       130.35.9
       130.35.10
       127.0.0.1

4. Use any text editor to open your sendmail.cf file (usually located in either /etc/ or /etc/mail/).

5. Add the following line at the beginning of the sendmail.cf file:

       F{LocalIP} /etc/mail/LocalIP

6. Add the following lines at the end of the sendmail.cf file:

       Scheck_rcpt
       # first: get client addr
       R$+ [tab] $: $(dequote "" $&{client_addr} $) $| $1
       R0 $| $* [tab] $@ ok [tab] no client addr: directly invoked
       R$={LocalIP [tab] $* $| $* [tab] $@ ok
       # not local, check rcpt
       R$* $| $* [tab] $: $>3 $2
       # remove local part, maybe repeatedly
       R$+ [tab] $:$>removelocal $1
       # still something left?
       R$*<@$+>$* [tab] $#error $@ 5.7.1 $: 550 we do not support relay
       Sremovelocal
       # remove RelayTo part (maybe repeatedly)
       R$*<@$=w>$* [tab] $: $>removelocal $>3 $1 $3
       R$*<@$=w.LOCAL>$* [tab] $: $>removelocal $>3 $1 $3
       R$*<@$*>$* [tab] $@ $1<@$2>$3
       # dequote local part
       R$- [tab] $: $>3 $(dequote $1 $)
       R$*<@$*>$* [tab] $: $>removelocal $1<@$2>$3

   Note: You must press the Tab key where indicated by [tab] to separate the columns in this file.

7. Kill the Sendmail process and start it again.

   On Windows NT, see the Windows NT documentation for instructions.

   On Solaris:

   1. To locate the Process ID of the existing Sendmail, enter the following command:

          $ ps -ef|grep sendmail

   2. To terminate the Sendmail process, enter the following command:

          $ kill -9 <process_id>

   3. To restart Sendmail, enter the following:

          $ /usr/lib/sendmail -bd -q30m

## Configuring Sendmail for to Check for Viruses

If you are using virus-checking software with Sendmail, configure it as necessary.

See Also: Oracle eMail Server Release Notes for more information about supported virus-checking software

| Copyright © 2001 Oracle Corporation. All Rights Reserved. |
| Library | Service | Index