[SOLVED] Stop accepting email except from localhost

Discussion in 'Tips/Tricks/Mods' started by morktadela, Feb 25, 2021.

  1. morktadela

    morktadela New Member

    Hi,

    i have a little vps server with Ispconfig 3. It servers 2 low traffic webs and do some heavy process work at mornings.
    Some days ago this "heavy work" (just process some data from php) take to long execute.
    Looking at htop it shows 2 proceses of amavisvd-new at 49% each of cpu and memory all full.
    Just revieving mail.log i've notice a lot of incoming mail that i don't really want.
    Then, I need to stop postfix accepting mail, i want that postfix ignore o simply not process, but in other hand, the internal process always send email via php when it finish, then i need that process local mail.

    Thanks
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    The easiest way is probably to close ports 25/465/587 in your firewall; local submission will still work, and loopback connections (ie. localhost addr) would still succeed.

    Another option would be to set 'mynetworks=127.0.0.0/8' and 'smtpd_client_restrictions=permit_mynetworks,reject'.
     
  3. morktadela

    morktadela New Member

    You saved my day.
    Thank you so much
     

Share This Page