Redirecting emails to another mail server using the CLI

Prev Next

Use the CLI commands in this topic to redirect an email that is held in the deferred queue to another downstream mail server.

To redirect an email to another downstream mail server:

hostname (config) # email-analysis reroute-message queue-id <id>

  1. Go to CLI configuration mode.

    hostname > enable
    hostname # configure terminal
  2. Locate the message queue identification number you want to redirect.

    hostname (config) # show email-analysis message-queue
    --Queue Type--  --Queue ID--  --Size--  --Arrival Time--  --Sender--
                           --Recipient--                --Error--
    hold      4364C21mv6zMtqb1    2053  Fri Nov 30 11:26:54  root@hearst.at2.com
                     king@king6.com
    hold       4364C22JqkzMtqd3    2053  Fri Nov 30 11:26:54  root@hearst.at2.com
                    king@king6.com
    hold       4364C21FD7zMtqZ6    2053  Fri Nov 30 11:26:54  root@hearst.at2.com
                    king@king6.com
    hold       4364C22s1MzMtqdb    2053  Fri Nov 30 11:26:54  root@hearst.at2.com
                    king@king6.com
    hold       4364C20hTDzMtqYk  442856  Fri Nov 30 11:26:54  root@hearst.at2.com
                    king@king6.com
    hold       4364C13rznzMtqfW    2495  Fri Nov 30 11:26:53  root@hearst.at2.com
                    king@king6.com
    hold       4364C170QxzMtqWD    2437  Fri Nov 30 11:26:53  root@hearst.at2.com
                    king@king6.com
  3. Specify the message queue identification number you want to redirect.

    hostname (config) # email-analysis reroute-message queue-id <id>
  4. Specify the original email address of the recipient in the deferred queue you want to redirect.

    hostname (config) # email-analysis reroute-message queue-id <id> receiver-email <email_address>
  5. Specify the SMTP server of the downstream IP address that is used to redirect the email.

    hostname (config) # email-analysis reroute-message queue-id <id> receiver-email <email_address> smtp-server <IP_address>
  6. Specify the SMTP port number of the downstream port that is used to redirect the email.

    hostname (config) # email-analysis reroute-message queue-id <id> receiver-email <email_address> smtp-server <IP_address> smtp-port <port_number>
  7. Verify the status of the email queue.

    hostname (config) # show email-analysis message-queue