[Postfix] Forward address to trash

Discussion in 'Server Operation' started by Daanoz, Oct 1, 2010.

  1. Daanoz

    Daanoz New Member

    Hello,

    I am using postfix configured using the following configuration: http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04-p2

    It works perfect, except on a certain domain i'm using a catch-all for various purposes. But on a certain mail account I keep recieving a lot of spam (lets call it [email protected]), I don't need the account so I want to trash it upon arrival.

    I thought up two way's of doing it, but my guess is that there is a better way.
    • Forward it to a non existing mail adres
    • Create a mail account for that address and use a cron to empty it

    Maybe there is a way to make the forwarding table forward it to the trashcan?

    - Daanoz
     
  2. falko

    falko Super Moderator ISPConfig Developer

    I'm not sure if it works, but you could try this line in /etc/aliases:

    Code:
    [email protected]: /dev/null
    Run
    Code:
    newaliases
    afterwards and restart Postfix.
     
  3. Daanoz

    Daanoz New Member

    Yeah, i've found that method before, but as i'm using a mysql database to map my users/domains/forwards/alliases that doesn't work...
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Can't you use the same method in your database?
     
  5. Daanoz

    Daanoz New Member

    I can, but it looks like it is trying to forward it to "/dev/null". Mail delivery fails and a bounce is sended...

    -- Daanoz
     
  6. falko

    falko Super Moderator ISPConfig Developer

    You could create a new system user, forward spam to that user and then use the /etc/aliases method for the system user.
     

Share This Page