bvstone

MAILTOOL Updated to Support Multiple Mail Routers for Failover

Posted:

MAILTOOL Updated to Support Multiple Mail Routers for Failover

MAILTOOL has been updated to v10.70.  The main update for this version is allow the user to specify a file containing a list of mail routers (and other settings for the router) in case of a failure.

To use a mail router file you need to specify *STMF for the Mail Router (MAILRTR) paramter on the MAILTOOL command and on the Router Stream File(RTRSTMF) parameter you will specify either *DFT or the fully qualified path to the router file.

If you are using the MAILTOOL ILE functions you will set value mail_router to *STMF and set value mail_router_stmf to either *DFT or the fully qualified path to the router file.

Both options allow the use of *DFT for the mail router file setting.  This value will first search for the file:

/bvstools/mailtool/config/<USERID>/routers.json

If this file isn't found then MAILTOOL will look for:

/bvstools/mailtool/config/routers.json

The router file layout will consist of a JSON array that specifies 1 or more mail routers that you can use.

{
  "mail_routers": [
    {
      "mail_router": "first.smtp.mail.com",
      "from_email": "email@domain.com",
      "perform_mx_lookup": "*NO",
      "use_ssl": "*YES",
      "smtp_port" : "465",
      "smtp_auth_user" : "userid",
      "smtp_auth_password" : "password",
      "sequence": 10
    },
    {
      "mail_router": "second.smtp.mail.com",
      "from_email": "email@domain.com",
      "perform_mx_lookup": "*YES",
      "use_ssl": "*TLS",
      "smtp_port" : "587",
      "smtp_auth_user" : "userid",
      "smtp_auth_password" : "password",
      "sequence": 20
    }
  ]
}

The only required value in each JSON array element is the mail_router setting.  The rest of the settings are optional and will default to the value used on the command.

If any of the secondary mail routers use a different sign on id and password, the from_email, smtp_auth_user and smtp_auth_password should be specified in the mail router element.

The values of *G4G_XOAUTH and *G4MS_XOAUTH can be used for the smtp_auth_user value to specify to use OAuth 2.0 authentication for your Google or Outlook account, respectively.  In this case the smtp_auth_password value does not need to be set.

 


Last edited 03/11/2017 at 12:26:17




Reply




© Copyright 1983-2024 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, CKEditor and running on the IBM i (AKA AS/400, iSeries, System i).