2 messages in net.sourceforge.lists.courier-users[courier-users] Suppress mail to loca...
FromSent OnAttachments
Ben KennedyJul 19, 2005 9:20 am 
Sam VarshavchikJul 19, 2005 3:56 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Suppress mail to local users?Actions...
From:Ben Kennedy (be@zygoat.ca)
Date:Jul 19, 2005 9:20:29 am
List:net.sourceforge.lists.courier-users

Hi folks,

I have a number of domains hosted on my box; for each domain there is a system user account, and delivery details provided by authmysql.

In some cases, instead of delivering to a local maildir, mail is forwarded (via 'defaultdelivery' in the mysql) to an external address. This works fine when mail comes in for the virtual domain (ali@domain.com) as provided in the DB.

There is a problem, however, if mail is delivered to the local user account (loca@basil.zygoat.ca). Under normal conditions this oughtn't occur, but it does, for example, on delivery failures to the external address (the forwarded mail bounces back to the local user). I have just discovered in one case several dozen messages queued in a Maildir for a local user spanning the past 10 months.

I want to fail deliveries to the local user accounts, so that in cases such as the above, the bounce propagates back to the original sender.

How can I do this?

One approach seems to be to create a .courier file with something like "| perl -e 'print "sorry, failed.\n"; exit 64;'" in the homedir, but that is inelegant.

I would really prefer a general solution whereby I could refuse all mail to the local machine name (basil.zygoat.ca) except where specifically specified (postmaster, root, and a couple of particular accounts).

-ben