How to activate/deactivate the mail service for a domain/subscription/server-wide

Follow

Comments

4 comments

  • Avatar
    Martin Schenk

    Is it possible to deactivate only sending mails (smtp), but still receiving (imap)?

    0
    Comment actions Permalink
  • Avatar
    ZNet Live

    We checked all the given options but still no resolution occurs.

    0
    Comment actions Permalink
  • Avatar
    ZNet Live

    Domain name: 

    sarathiyouthfoundation.org.in

     

     

    0
    Comment actions Permalink
  • Avatar
    Nico Smit

    Hi,

    My few cents on this; If you'd like to disable the email accounts but like to keep sending emails with PHP for example use this: we always run two cronjobs each night (on system user level) and keep the system setting "Enable mail management functions in Plesk" active so we keep the mail queue functionality. 

    Cronjob 1: disable mail service for all domains:
    Command: /usr/sbin/plesk db -Ne"select name from domains" | while read i; do /usr/sbin/plesk bin mail --off $i && echo "Mail service for $i subscription has been disabled" ;done

    Cronjob 2: disable mail service for all domain aliases:
    Command: /usr/sbin/plesk db -Ne"select name from domain_aliases" | while read i; do /usr/sbin/plesk bin domalias -u $i -mail false && echo "Mail service for $i subscription has been disabled";done

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request