[SOLVED] Stop accepting email except from localhost

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

  1. morktadela

    morktadela New Member


    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.

  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    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=' and 'smtpd_client_restrictions=permit_mynetworks,reject'.
  3. morktadela

    morktadela New Member

    You saved my day.
    Thank you so much

Share This Page