ITPub博客

首页 > Linux操作系统 > Linux操作系统 > How to setup Internet Mail Gateway: Configuration (Version 4.x)

How to setup Internet Mail Gateway: Configuration (Version 4.x)

原创 Linux操作系统 作者:fengleihen 时间:2009-06-25 17:24:00 0 删除 编辑
How to setup Internet Mail Gateway: Configuration (Version 4.x)
====================================================

Symptom
How is the SAP Internet Mail Gateway installed and configured?

SAP Technology Release 4.0 and higher:
Internet settings via Transaction SO16 are no longer possible because the push
button is missing.
SAP Internet Mail Gateway 3.x does not work anymore.

SAP Technology Release 3.1:
You are no longer to access the Internet Mail Gateway directly via SAPoffice but via
SAPconnect.

Other terms
SAPconnect, SCOT, SCON, configuration, SAP Internet Mail Gateway, SMTP, Sendmail,
MLUNXSND, MLSOMAIL, MLSOMADM

Reason and Prerequisites
In Release 4.0A, the Internet settings for mail were transferred to the
administration environment for external communication.
As of SAP Technology Release 4.0, only the SAP Internet Mail Gateway 4.x can still
be used.

Solution
Preliminary remark

Install SAP Internet Mail Gateway Release 4.0A (or higher). Former versions of the
Gateway, as of R/3 4.0A, are no longer supported. You can receive the relevant
current version of the Internet Mail Gateway from SAP (see note 101573).


Documentation


Read the latest version of the R/3 online documentation for SAPconnect and SAP
Internet Mail Gateway
SAP Library
  -> BC Basis
     -> Basis Services/Communication Interfaces
        -> Communication Interface
           -> BC SAPconnect
           -> SAP Internet Mail Gateway

A short guideline about installing and configuring the Internet Mail Gateway
provides the following points:

1. Profile file
The Internet Mail Gateway is configured via a profile file that can be created and
changed with the aid of program MLSOMADM. The path and name of this profile file
must be notified to the programs MLUNXSND (for outgoing mails) and MLSOMAIL (for
incoming mails).
The profile file is communicated to program MLSOMAIL via the first call parameter
(during the definition of the SAP mailer in the Sendmail configuration file).
There are several ways for the profile file to be communicated to program MLUNXSND:
In older versions of the Internet Mail Gateway, this can only be done by setting the
environment variable GWCONFIG on operating system level. In addition to that, in the
current program versions, the following two directories are searched for the default
profile file mailgw.ini; in this case, it is not necessary to set GWCONFIG:
- in the /SYS/profile directory if the mlunxsnd program is in
/SYS/exe/run
- in the program directory itself

2. RFC destination
As is already the case for 3.1, an RFC destination must be created for outbound
mails in the SAP system. You can choose between the two activation types 'Start'
and 'Registration'. For the Internet Mail Gateway, the activation type 'Start' is
recommended.

              In the case of 'Start', MLUNXSND is started each time the Internet
Mail service is used by a SAPconnect transmission job. If the default profile file
mailgw.ini is used in one of the directories mentioned above, you can start program
MLUNXSND directly. If the profile file is to be entered via the variable GWCONFIG,
you should start a shell script. as follows:

                    #!/bin/csh
setenv GWCONFIG /usr/sap/C11/SYS/exe/run/C11_mailconfig
/usr/sap/C11/SYS/exe/run/mlunxsnd $*

             It is essential to enter '$*' after MLUNXSND to ensure that all RFC
parameters are passed to the program. Assign execute authorizations to the script.
Caution: If problems occur when you start MLUNXSND directly, you should also use a
shell script. (see Note 178580).

In the case of 'Registration', MLUNXSND runs as a daemon on an application server
and registers to the SAP gateway with a unique program identifier. When mlunxsnd is
started, the program identification (program ID), as well as the gateway host and
gateway service must be specified. These can be specified using a saprfc.ini file or
directly as parameters in the command line of MLUNXSND. In the second case, the
command line has the following form.
     mlunxsnd -a -g -x
If the default profile file mailgw.ini is not used in one of the directories
mentioned above, the variable GWCONFIG must be set in the environment of MLUNXSND.
It is recommended to write a shell script, in which the variable is set and MLUNXSND
is called. The script. could look like this:

                    #!/bin/csh
setenv GWCONFIG /usr/sap/C11/SYS/exe/run/C11_mailconfig
/usr/sap/C11/SYS/exe/run/mlunxsnd -aRRNC11 -ghs0011 -xsapgw00 &

              Assign execute authorizations to the script. and start it.

             Setting up the RFC destination in the SAP system:

Call Transaction SM59 ->Create. Enter a name for the destination (for example,
INTERNET MAIL GATEWAY), a connection type T and a description and confirm your
entries by pressing ENTER.

Start:
Select activation type 'Start'
Then, start on 'Explicit Host'.
Specify the name and path of the shell script. as the program.
Specify the entire name of the target machine on which MLUNXSND should run.
Select Destination --> Gateway Options, enter the gateway host and gateway service
and choose OK.
Test the connection and save.
Registration:
Choose 'Registration'
Enter the program ID that was assigned for MLUNXSND
Select Destination --> Gateway Options, enter the gateway host and gateway service
and choose OK.
Test the connection and save.
1. SAPconnect Administration.
Set the communication method INT to SAPCONNECT (3.1: SCON, communication methods,
4.0: SCOT Goto -> Customizing, then communication methods (double-click on the
Button)).

In Transaction SCOT (3.1: SCON) create a node responsible for Internet Mail. Specify
the destination created under point 2 as an RFC destination.
Select "Nodes in operation", DO NOT select "Node can explode path references".
Caution: The Internet Mail Gateway does NOT support the monitoring by the SAP
system. DO NOT select the functions "Nodes should be monitored by the Alert Monitor"
and "Nodes supported: Connection test, status, trace".
Press "Internet settings". Enter an address area (generic ones with '*' are also
possible). Specify 'All formats except for the following' as supported formats and
enter ALI, SCR, OTF, OBJ and URL to the list. (For SAP Technology Releases before
4.6, see note 188677)
2. Schedule a transmission job
If a document is sent in SAPoffice, only one corresponding order is put into the
SAPconnect transmission queue. The SAPconnect transmission job then processes the
queue and sends the documents via the corresponding external communication
components (for example, the Internet Mail Gateway). You must schedule this job in
the SAPconnect administration (4.0: SCOT, View -> Jobs, schedule Goto -> Job; SCOA,
send process). For testing purposes, the transmission process can also be started
manually (4.0: SCOA, send process). SCOA, Dialog).
3. Sender address
In the personal office settings (SO12) of the sender, an Internet address must be
maintained, otherwise, a transmission error occurs.
4. Sendmail Configuration
For incoming mails, Sendmail must be configured in a way that program MLSOMAIL is
called with the correct address information. The necessary entries in sendmail.cf
differ from those for the Internet Mail Gateway 3.x, read the SAPconnect
documentation in this regards and refer to notes 71891 and 116767.
5. Corrections
If you are using the Internet Mail Gateway 4.x with a SAP Technology Release 3.1,
you should implement the attached correction into the SAP system so that received
mails can be transferred to external Internet Mail addresses.



OSS Note 455140 - Configuration E-mail, fax, paging/SMS via SMTP
===================================================
Symptom
How is e-mail, fax or paging/SMS via SMTP configured in the SAP Web Application
Server?
Which prerequisites and settings are required outside the SAP system?

Other terms
INT, FAX, PAG, SAPconnect, SMTP

Reason and Prerequisites
Information is missing.

Solution

General information, architecture, prerequisites, system environment

When e-mails are transferred via SMTP, the SAP Web Application Server communicates
directly with a mail server. No gateway or connector is necessary.
Any SMTP-conforming product can be used as a mail server.

In the outbound direction, the SAP system always transfers the mails to a single
mail server. Its host address and port number can be set.

In the inbound direction, the SAP system can receive mails from any number of mail
servers. Each client can be reached via separate, configurable port numbers. The SAP
system, or its client, is best addressed via an individual subdomain for each client
(for example, "crm-prod.company.com"). The assignment of these subdomains to host
name and port numbers of the SAP system is defined by the routing rules on the mail
servers.
As of Release 6.20, fax and SMS/paging messages can also be sent and received via
SMTP. These are packed in e-mails for this. For sending, the mail server refers to
the domain of the recipients' addresses and directs the e-mails either to a internal
company fax/SMS server (for example "SMS=+491759628717@sms-server.company.com"), or
to an external provider (for example, "FAX=+16105954900@fax-provider.com"). For
receiving, the fax/SMS server or the provider sends e-mails to addresses with the
domain of the SAP system (for example "FAX=+496227751624@crm-prod.company.com").


Configuration
1. Profile parameters
To be able to use the SMTP functions, the profile of the SAP Web Application Server
must be adjusted. We recommend you activate SMTP on all the application servers of
an SAP system. If this is not the case, the SAPconnect send job can only be
scheduled for servers on which SMTP is active. The scheduling then occurs through
the standard job definition (transaction SM36) and not from SAPconnect
administration (transaction SCOT, for a description, see 4.c).
For SMTP, the profile parameters listed below must be set. The <*> placeholder
stands for a number with which the parameters that can occur several times are
numbered sequentially, starting with 0.
a) icm/plugin_<*> = PROT=SMTP,PLG=  (required in 6.10 only!!!)
This loads the SMTP plug-in. This is a dynamic library which implements the SMTP
protocol. specifies the file name of the SMTP plug-in. The program is located
in the execution directory of the SAP Web Application Server instance, has the
name "smtpplugin" and the usual extension for your operating system (".so",".dll",
etc.). As of Kernel Release 6.20, the SMTP library is an integral part of the SAP
Internet Communication Manager. The parameter needs no longer be specified then.
b) icm/server_port_<*> = PROT=SMTP,PORT=
This opens a TCP/IP port for the receipt of mails via the SMTP plug-in.
specifies the number of the port that is to be used. This must not be occupied by
any other program on this host (for example, Sendmail usually uses port 25). If no
mails (including status notifications) are to be received in this SAP system,
can be set to 0.
The TIMEOUT option can be used to define a maximum wait time for a response from the
mail server (in seconds).
c) is/SMTP/virt_host_<*> = :,...;
This defines a "virtual mail host" for receiving mails. If all incoming mails
(including status notifications) are to be received and processed in a single client
of this SAP system, this parameter is not required (an entry is/SMTP/virt_host_0 =
*:* is then taken by default). If several clients are to be able to receive, a
virtual mail host must be created for every client. specifies the name of the
host to which incoming mails are addressed. The "*" value can also be specified here
if the mail distribution is to occur independently of the addressed host. Please
note: If the mail is to be distributed according to host names, those host names
must have different IP addresses assigned. specifies the number of a port to
which incoming mails are addressed. Several ports may be specified for each host,
and several hosts (e.g. with several ports) may be specified for each virtual mail
host. Please note: The parameter line must always be closed by a semicolon (even if
only one host is involved).
The assignment of virtual mail hosts to clients is carried out in the SAP system
(see 3).
             Example
With two clients capable of receiving mail, the profile parameters could read as
follows (as of Release 6.20):

  icm/server_port_0 = PROT=HTTP,PORT=1080
  icm/server_port_1 = PROT=HTTPS,PORT=1443
  icm/server_port_2 = PROT=SMTP,PORT=25000,TIMEOUT=180
  icm/server_port_3 = PROT=SMTP,PORT=25001,TIMEOUT=180
  is/SMTP/virt_host_0 = *:25000;
  is/SMTP/virt_host_1 = *:25001;
1. User administration (transaction SU01)
a) System user
In each client of an SAP system, in which incoming mails (or status notifications
for sent mails) are to be received, a system user must be created to process the
incoming messages. To do this, use transaction SU01 to create a user of the
type "system" and assign the "S_A.SCON" profile to this user.
Important: Contrary to the statements made in the documentation for user types,
users of type "system" are also subject to password expiry which can prevent the
reception of mails. To avoid this, use user type "service" until a correction of the
incorrect behavior. of type "system" is available.
b) User addresses
Each individual user who wants to receive e-mails in an SAP system needs an Internet
mail address. This is also used as a sender address for sending e-mails. In
transaction SU01, enter the Internet mail address of a user in the "E-Mail" field
under "Address". As a domain, use the domain of the SAP system client if possible
(see "General information" above and 4.a), for example "firstname.lastname@crm-
prod.company.com".
2. Client assignment (transaction SICF)
For each client of an SAP system, in which incoming mails (or status notifications
for sent mails) are to be received and, if applicable, processed, an SMTP server
must be created, on which the assignment to a virtual mail host as well as the logon
data are stored. In transaction SICF, an SMTP server (envelope icon) should already
be available in every SAP system. This is delivered by SAP. Use this for the first
client that you want to be able to receive mails and create a new SMTP server for
every other client. You must make the following settings on the SMTP servers:
a) Host data
For "Profile Parameter Number", enter the sequence number of a is/SMTP/virt_host_<*>
parameter from the profile (see 1.c). If you have only one client and therefore did
not create such a parameter in the profile, enter 0.
b) Service data
Enter the client into which the mails received via this virtual mail host are to be
directed, as well as the logon data (user, password, language) of the service user
that was created for inbound mails (see 2.a).
c) Handler list
Enter CL_SMTP_EXT_SAPCONNECT at position 1.
             As of Release 6. 20, the SMTP server must be activated after being
created or changed (Service/Virt.Host --> Activate, or context menu).

1. SAPconnect administration (transaction SCOT)
You have to make the SAPconnect settings separately in each client from which e-
mails are to be sent or in which e-mails are to be received.
a) Default domain
The domain of this SAP system client is defined here, for example, crm-
prod.company.com. It is used for the following purposes: The SMTP plug-in logs on to
the mail server with the domain as ID. The message ID of outgoing mails is compiled
with this domain. If an SAP user who has not entered an Internet mail address in
their user master record sends an e-mail, a sender address is generated from the SAP
user name and this domain, for example SMITHJ@crm-prod.company.com.
b) Node
There are different types of node in SAPconnect:
SMTP node (for the SMTP function of the SAP application server)
HTTP node (for paging/SMS providers using Web services, as of 6.20)
RFC node (for old RFC-compatible e-mail/fax/paging gateways)
                       There is always a single SMTP node in each client. It is
created automatically by the system and cannot be deleted. It is configured as
follows:

Double-click on the node name.
Select "Node in use".
Under "Mail Host" and "Mail Port", specify the mail server to which outbound mails
are to be transferred.
Choose "Set" adjacent to "Internet".
Specify address areas of recipient addresses that are to be reached via this node
(usually "*" if all e-mails are to be sent via SMTP).
For "Output Formats for SAP Documents" the following is recommended:
  SAPscript. / Smart Forms       PDF
  ABAP
List                    
HTM
  Business Object / Link        HTM
  RAW Text

 
                 TXT
                       If fax messages are also to be sent via SMTP:

Choose "Set" adjacent to "Fax".
Specify address areas of recipient addresses that are to be reached via this node
(usually "*" if all faxes are to be sent via SMTP).
For "Output Formats for SAP Documents" the following is recommended:
  SAPscript. / Smart Forms       PDF
  ABAP
List                    
PDF
  Business Object / Link        TXT
  RAW Text

 
                 TXT
For "Conversion into Internet Address", enter the domain of the fax server or fax
provider. The local part of the Internet address is generated automatically by the
system. The address then has the form. "FAX=+recipientnumber@domain".
                       If paging/SMS messages are also to be sent via SMTP:

Choose "Set" adjacent to "Pager(SMS)".
Specify address areas of recipient addresses that are to be reached via this node
(usually "*" if all paging/SMS messages are to be sent via SMTP).
For "Conversion into Internet Address", enter the domain of the paging/SMS server or
paging/SMS provider. The local part of the Internet address is generated
automatically by the system. The address then has the
form. "SMS=+recipientnumber@domain".
                       Caution: To be able to use paging/SMS in the SAP system,
names must be defined for the messaging services to be used (e.g. "SMS"). You can do
this via transaction SA14.

a) Send job
E-mails that are sent from an SAP application are merely put into a queue. A
periodically running background process, the SAPconnect send job, takes the e-mails
from the queue and sends them via the Internet. This job can be scheduled from
SAPconnect administration as follows:
"View" --> "Jobs". Check whether a job is already scheduled (displayed as a calendar
icon).
Choose "Job" --> "Create", and specify a job name.
Place the cursor on the "SAP&CONNECTALL" variant and choose "Schedule Job".
Choose "Schedule periodically".
Specify a time interval (for example 10 minutes) and choose "Create".
b) Receiving
With the settings made so far, SAP users can already receive e-mails in their inbox
in the Business Workplace (transaction SBWP) under the address entered in the user
master record.
If, on receipt of e-mails to a specific address or with specific contents (for
example XML documents), you want to automatically start a program that processes
these e-mails, you can configure this under "Settings" --> "Inbound Processing".
If, on receipt of e-mails to a specific address or from a specific sender, you want
to direct these automatically to another recipient or a distribution list, you can
configure this under "Settings" --> "Inbound Distribution".
1. Settings on the mail server (SAP-external configuration)
To be able to receive mails in the SAP System, you need to set your mail server in a
way that certain mail addresses are forwarded to one or several SAP Systems or
clients. For this purpose, you need to define routing rules that assign a mail host
and/or port to address areas (generic address parts, usually the domain), for
example:
     *@crm-prod.company.com  -->  mySAPWASHost:25000
     *@crm-test.company.com  -->  mySAPWASHost:25001
For the exact setting procedure please refer to the mail serverdocumentation. Note
546147 describes where the documentation can be found for the Microsoft Exchange
2000 Server and what to do if your mail server does not allow routing to other ports
than port 25. 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/139677/viewspace-607560/,如需转载,请注明出处,否则将追究法律责任。

上一篇: va01 screen
请登录后发表评论 登录
全部评论

注册时间:2009-03-31

  • 博文量
    24
  • 访问量
    26398