Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm setting up a forwarding only email server. I want to apply some static forwarding rules to all incoming emails and bounce all other incoming emails (and not store them locally).


myhostname = sputnik.*domain*.com
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
myorigin = /etc/mailname
mydestination = sputnik.*domain*.com, localhost.*domain*.com, , localhost
relayhost = 
mynetworks = [::1]/128 [fe80::%eth0]/64
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
virtual_alias_maps = hash:/etc/postfix/virtual

/etc/postfix/virtual anything anything

Example outcomes:

  • ->
  • ->
  • -> bounce
  • ->
  • -> bounce

Currently instead of bouncing the emails they are getting stored at /var/mail/*username* and the sender isn't alerted that the email didn't go through.

share|improve this question
up vote 1 down vote accepted

The Postfix documentation has an example of this under mail forwarding domains. I'm not sure what's going on with your mydestination line (Postfix doesn't seem to support wildcards here), but you need to list and under virtual_alias_domains (and not under mydestination). Also make sure that you've run postmap on /etc/postfix/virtual.

virtual_alias_domains =,
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.