PowerMTA Support Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

PowerMTA 5.5r1 is out!!!!  Please contact support@port25.com for a license and download access.

Author Topic: Close outbound SMTP connection  (Read 63705 times)

elysium3

  • Jr. Member
  • **
  • Karma: +0/-17
  • Posts: 26
Close outbound SMTP connection
« on: May 22, 2012, 05:10:47 AM »

Dear all,

To close all outbound connections, i use service pmta restart command, is there any directive or command to close the outbound SMTP connection to a spoecific ISP and reopen when needed ?

Thank you.
Logged

Port25-Admin1

  • Administrator
  • Hero Member
  • *****
  • Karma: +49/-4
  • Posts: 2361
Re: Close outbound SMTP connection
« Reply #1 on: May 22, 2012, 09:24:39 AM »

No, but you can set max-smtp-out for the given <domain> to 0 and then reload.  At this point PowerMTA will not open any new connections, and as the existing connections close you should get down to 0.
Logged
Port25-Admin1
------------------
Try the following commands:
Quote
pmta show topdomains --errors
pmta show topqueues --errors
pmta --help

When PowerMTA won't start use:
Quote
pmtad --debug
When all else fails-->support@port25.com

Port25-Admin2

  • Global Moderator
  • Hero Member
  • *****
  • Karma: +35/-1
  • Posts: 1527
Re: Close outbound SMTP connection
« Reply #2 on: May 22, 2012, 10:21:52 AM »

You can use the unpublished directive "pmta stop outgoing" to abruptly close all connections, without restarting PowerMTA. 

pmta stop outgoing --queue=yahoo.com/*

will close all active/open connections to yahoo.com across all virtualMTAs

pmta stop outgoing --queue=yahoo.com/mta5

will close all active/open connections to yahoo.com for virtualMTA mta5

Since this is normally not needed, what problem are you trying to resolve?
Logged

elysium3

  • Jr. Member
  • **
  • Karma: +0/-17
  • Posts: 26
Re: Close outbound SMTP connection
« Reply #3 on: May 22, 2012, 01:13:32 PM »

Hello,

Thank you for your response.

In order to avoid closing all active outbound connections, when i get for example connection timeout from one domain,
i think it's convenient to close just the connections to the domain that gives this notification, right?

Thank you.
Logged

Port25-Admin2

  • Global Moderator
  • Hero Member
  • *****
  • Karma: +35/-1
  • Posts: 1527
Re: Close outbound SMTP connection
« Reply #4 on: May 22, 2012, 03:01:35 PM »

If you only want to close active connections to one domain, then it is logical to only close the connections to the one domain.

Connection timeouts occur for a whole variety of reasons of course, and sites normally do not manually get involved with closing connections via the command line.
Logged