2009/4/8 wen.yongzheng <wen.yongzh...@adways.net>: > I can set catchall mailbox in virtual_mailbox_map like this: > @domain.name domain.name/catchall/ > > But I really do not want to check or read the catchall mails, The only > thing I want to do is to remove all mails in catchall maildir. I wonder > if I can set my catchall mailbox directly to /dev/null or remove at once.
Using a catchall is a bad idea, especially if noone is going to read the mail (people who mistype an email address won't know that they made a mistake). There are valid uses for a catchall, however, like training spam filters, or doing benchmarking. I'd put the catchall entry in virtual_alias_maps, but you might then have to duplicate all the addresses from virtual_mailbox_maps so the mail is accepted. If this is okay, you can use the alias and rewrite it to a "local address". Then you add an entry to /etc/aliases (or /etc/postfix/aliases): catchall: /dev/null