Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Stop Processing Mail Queue

Discussion in 'E-mail Discussion' started by postcd, Jun 25, 2016.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    694
    Likes Received:
    15
    Trophy Points:
    68
    Thank You,
    isnt there any other way to stop processing mailqueue? Because i would like to stop it by the script that is checking mail queue size automatically periodically.. so i will not be infront of computer at time i need to stop mailqueue processing..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    694
    Likes Received:
    15
    Trophy Points:
    68
    >You can block the SMTP port

    Wouldn't this cause queued emails be removed from queue because of some "internal" failure?

    When i do: netstat -penta|grep exim
    I see exim listen at 25,465,587

    I read that "SMTP generally uses port 25 for connections, port 587 is actually the preferred port for outbound SMTP traffic"

    iptables -L INPUT|egrep "smtp|25|465|587"
    ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:smtp

    Im also using csf firewall which has seemingly related command:

    csf -td, --tempdeny ip ttl [-p port] [-d direction] [comment]
    Add an IP to the temp IP ban list. ttl is how long to blocks for
    (default:seconds, can use one suffix of h/m/d). Optional port.
    Optional direction of block can be one of: in, out or inout
    (default:in)

    ( csf -td 127.0.0.1 86400 -p 587 -d out ??)

    Please which command do you suggest me to execute in my bash script to stop mail queue processing or simply prevent sending out e-mails in queue? Thx

    Example reject command
    iptables -A OUTPUT -p tcp --dport 25 -j REJECT
    iptables-save
    but unsure how to undo it and if its safe in ip table
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 postcd, Jun 26, 2016
    Last edited: Jun 26, 2016
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,117
    Likes Received:
    1,932
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice