Koozali.org: home of the SME Server

Mail to /dev/null?

Offline Alex Schaft

  • ****
  • 97
  • +0/-0
Mail to /dev/null?
« on: June 25, 2007, 09:42:52 AM »
Hi,

How would I set up a forward to /dev/null? We have a default mail from address in our software, which we need to have dissapear :)

Alex
......

Offline Alex Schaft

  • ****
  • 97
  • +0/-0
Mail to /dev/null solved
« Reply #1 on: June 25, 2007, 12:34:11 PM »
Hi,

I modified a copy of /etc/e-smith/templates-user/.qmail/90local in /etc/e-smith/templates-user-custom/.qmail/90local as follows

Code: [Select]

{
    # vim: ft=perl:
    return '# No local delivery'
         unless ($props{EmailForward} =~ /^(local|both)$/);

    my $NullDelivery = $props{ToNull} || 'No';

    my $DeliverTo = './Maildir/';

    if ($NullDelivery eq 'Yes')
    {
        $DeliverTo = "# All to the bit bucket\n/dev/null/";
    }
    else
    {
        $DeliverTo = "# No null\n./Maildir/";
    }
    return $DeliverTo;
}


db accounts setprop nomailuser ToNull Yes

Comments?
......