Configuring the mail server

Before running the S/MIME sample applications.

  1. Install and configure a mail server.

  2. To use your PKI infrastructure, create an Entrust Profile (.epf file) for both the sender and the recipient.

  3. Copy the etjava/lib/mailcap.default file into the the lib folder of your Java installation.

  4. Copy the etjava/lib/mailcap file into the the lib folder of your Java installation.

  5. Edit the etjava/examples/data/smime/smime_example.ini file.

  6. Set the following file content.

    [SMimeSend]
    ; Host name of the mail server
    host=localhost
     
    ; Email address of the message recipient
    to=RSAUser2@javatkexamples.entrust.com
     
    ; Email address of the message sender
    from=RSAUser1@javatkexamples.entrust.com
     
    ; Path to epf file for message sender
    Profile=data/userdata/RSAUser1.epf
     
    ; Entrust password for message sender
    password=~Sample7~
     
    ; path to an entrust.ini file, if you have your own infrastructure
    inifile=Entrust.ini
     
    ; The following three porperties are only used if the specified
    ; inifile is loaded.
     
    ; The attribute that contains a user's certificate, do not change.
    attrToFind=userCertificate
     
    ; Directory Search Base for retrieving certificates
    ; e.g. ou=PKI7,o=Java Toolkit Samples,c=CA
    searchbase=<X500 searchbase>
     
    ; Directory Search expression for retrieving certificates
    ; e.g. cn=*
    searchexpr=<LDAP search expression>
     
    ; a file that contains the certificate of the recipient, used
    ; if inifile cannot be loaded.
    recipientCertificate=data/userdata/RSAUser2Encryption.cer
     
    ;Uncomment the next line to set a path to a different mailcap file
    ;mailcap = /etjava/lib/mailcap
     
     
    [SMimeShow]
    ; Path to epf file for message recipient
    Profile=examples/data/userdata/RSAUser1.epf
     
    ; Entrust password for message recipient
    recipient_password=~Sample7~
     
    ; Host name of the mail server
    host=localhost
     
    ; Mail protocol to use
    protocol=pop3
     
    ; Recipient's user name at the mail server
    user=RSAUser2
     
    ; Recipient's mail server password
    user_password=mailpassword
     
    ; Name of mailbox for recipient
    mbox=INBOX
  7. Save the file.