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

Warning: I'm a total *nix n00b. I need to get "catch-all" mail setup on OpenBSD. I'm just using the pre-installed mail service. Especially I want mail sent to `abc-123-def-geh@localhost' to redirect to 'user@localhost'. Is there a way using the pre-installed stuff or do I need some other software? If so: any suggestions on light-weight, easily configured software?

share|improve this question

If the pre-installed service is Postfix or Sendmail, you should be able to edit the /etc/mail/aliases file to your liking. It is in the format of:

[alias name]:[existing account]

So, to create the alias you need, you would edit the file to include:

abc-123-def-geh: user

And then, as root, run the newaliases command.

You can also define groups in this way, and more. See man 5 aliases. Most mail is by default sent to root, so you will probably want to define an alias for root as well.

share|improve this answer
Hum, but I want "catch all" which means I don't know the target email beforehand. I think I'm on to something though... – Jonas Byström May 4 '10 at 15:14

I installed postfix (wasn't that hard but took a couple of hours), added a "catch-all" alias in /etc/postfix/virtual. Done - ta-daa! ;)

And, I had to kill sendmail before starting postfix to be able to run postfix for smtp as well (required for local catch-all unit tests).

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.