quinta-feira, 4 de março de 2021

Configuring SAP SMTP service

 SAP ECC permits sending and receiving of messages, including email. NetWeaver ABAP comes with everything needed to set up the configuration. What is needed is an external email infrastructure to have a usable mail configuration in SAP that allows for sending and receiving email:

  • External SMTP server. Acts as a SMTP server between SAP and the receiver. This is the email server used to send emails. This can be the official SMTP server of the corporation or any other valid one, like Yahoo.
  • Route for incoming emails. As the MX DNS entry for a domain normally points to the SMTP server mentioned above, the SAP SMTP server won’t receive emails automatically. A forwarding rule between the SMTP server and the SAP SMTP server needs to be configured.

/wp-content/uploads/2013/09/smtp1_281080.jpg

Configuration of SMTP in SAP

Title

Link

SAP Note: 455140

https://service.sap.com/sap/support/notes/455140

SAP Help

http://help.sap.com/saphelp_nw70/helpdata/en/af/73563c1e734f0fe10000000a114084/content.htm

The steps are pretty simple. All are to be executed in the SAP system. I used the NPL Gateway Demo system for this.

1. Open the port for SMTP

Transaction: RZ10

In case this was not done before, import the profiles

/wp-content/uploads/2013/09/smtp2_281099.jpg

Select the right profile (here: instance profile) and the Extended maintenance option.

/wp-content/uploads/2013/09/smtp3_281100.jpg

To receive emails on an SMTP port, ICM needs to be configured to

    1. Open the port and to
    2. Use protocol SMTP

Add an entry for SMTP in the instance profile. Here, the port used is 25000.

/wp-content/uploads/2013/09/smtp4_281101.jpg

Save changes to instance profile.

/wp-content/uploads/2013/09/smtp5_281102.jpg

Then save and activate the changes.

/wp-content/uploads/2013/09/smtp6_281103.jpg

Warning message informs that a ICM restart is needed to activate the changes.

/wp-content/uploads/2013/09/smtp7_281104.jpg

Looking in the profile file on the server:

/wp-content/uploads/2013/09/smtp8_281105.jpg

ICM profile file is changed, change is persisted in the file but ICM does not pick up the new configuration automatically. A restart of ICM is needed.

Transaction: SMICM

/wp-content/uploads/2013/09/smtp9_281106.jpg

The Restart option didn’t work for me, a hard exit with a start activated the change. But I am not Basis person.

/wp-content/uploads/2013/09/smtp10_281107.jpg

Confirm the restart of ICM.

/wp-content/uploads/2013/09/smtp11_281108.jpg

Check the SMTP service details. They have to match the new configuration.

/wp-content/uploads/2013/09/smtp12_281109.jpg

Verifying the ICM parameters using SAP MMC.

/wp-content/uploads/2013/09/smtp13_281110.jpg

2. Create system user for receiving emails

Transaction: SU01

/wp-content/uploads/2013/09/smtp14_281111.jpg

Make sure the users in the SAP system have an email address configured.

/wp-content/uploads/2013/09/smtp15_281112.jpg

Here I am using tobias@mydomain.com

With this configuration, email send to the SAP SMTP server will be picked up and delivered into the user’s inbox.

3. Configure SMTP service

Transaction: SICF

/wp-content/uploads/2013/09/smtp16_281113.jpg

Check that the virtual SMTP server is configured

/wp-content/uploads/2013/09/smtp17_281163.jpg

The logon data has to be configured to use the above created SMTPUSER

/wp-content/uploads/2013/09/smtp18_281164.jpg

Handler list

/wp-content/uploads/2013/09/smtp19_281165.jpg

Save the changes and activate the service.

/wp-content/uploads/2013/09/smtp20_281166.jpg

Configure the SMTP server and outbound and inbound flow

  1. SMTP server

Transaction: SCOT

Set the default domain

/wp-content/uploads/2013/09/smtp21_281168.jpg

This domain matches the email domain of the users.

  1. Outbound

View: Nodes view

Set the outgoing SMTP server

/wp-content/uploads/2013/09/smtp22_281169.jpg

Note: This is the SMTP server the SAP system will use to actually send the emails. Emails get send to this SMTP server and from there they are being send to the actual recipient. That is, the server defined has the responsibility to lookup the MX entry of the receiving domain.

Set the address type this node does accept

/wp-content/uploads/2013/09/smtp23_281170.jpg

Note: In the address area, insert the valid format of email addresses. When you insert * the node will accept every email address. To make this node only accept email addresses for a specific user, put <username>@domain.tld

/wp-content/uploads/2013/09/smtp24_281171.jpg

Result in node view

/wp-content/uploads/2013/09/smtp25_281172.jpg

Now the node is configured to accept outgoing emails. What is missing is a job that picks up the emails from the outgoing queue and sends them. Create a job that will send the queued messages

View: Job view

/wp-content/uploads/2013/09/smtp26_281173.jpg

/wp-content/uploads/2013/09/smtp27_281174.jpg

Select SAP&CONNECTALL or SAP&CONNECTINT for sending internet email

/wp-content/uploads/2013/09/smtp28_281175.jpg

To run the job immediately, select “Start immediately”. To schedule a job so it is executed at a defined interval, select “Schedule”

/wp-content/uploads/2013/09/smtp29_281176.jpg

To schedule

/wp-content/uploads/2013/09/smtp30_281177.jpg

/wp-content/uploads/2013/09/smtp31_281178.jpg

Result

/wp-content/uploads/2013/09/smtp32_281179.jpg

  1. Inbound

As long as the virtual SMTP server is activated and the system user has the right permission AND a user with the correct email address exists, inbound processing of emails will work.

Source: https://blogs.sap.com/2013/09/17/configuring-sap-smtp-service/

Nenhum comentário:

Postar um comentário