Block mail sent to root@userdomains

Discussion in 'Plesk Automation Suggestions and Feedback' started by SteveITS, Apr 27, 2016.

  1. SteveITS

    SteveITS Tera Poster

    Messages:
    277
    I found our mail service node is happily accepting spam sent to root@anyuserdomain and storing it in /var/mail/root, which will of course never be checked and grow forever. What is the best way to turn that off to block the spam? I would prefer to block invalid addresses rather than, say, link the alias to /dev/null and accept and delete the spam.

    Our pre-PPA hosting system (using Sendmail) inserted an @example.com virtmap for all user domains so mail would not be processed by aliases or user IDs.

    Ideally, we would still be able to have the "root" alias forward to an external email address for say crontab or other output, though for crontab specifically, we can of course add a MAILTO directive.
     
    Last edited: May 3, 2016
  2. SteveITS

    SteveITS Tera Poster

    Messages:
    277
    I experimented a bit and setting the alias like so (found online):

    root: "|exit 67"

    ...appears to cause the server to accept the message and then generate a backscatter bounce, so that isn't great.

    Looking at the list of virtual address entries it appears PPA sets up a hidden (not shown on the control panel Mail tab) postmaster@ and root@ alias for each domain, delivering to postmaster@localhost.localdomain and root@localhost.localdomain.
     
  3. JanPPP

    JanPPP Kilo Poster

    Messages:
    25
    Same issue here.
     
  4. SteveITS

    SteveITS Tera Poster

    Messages:
    277
    I looked this and asked around and I don't think there's a way to block the mail at the alias level. An alias of "root: /dev/null" will at least prevent the disk from filling up. With a few hundred domains per email server there's a lot of spam now. :)
     

Share This Page