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

How can I configure my postfix server to accept mail from I set file this way:

myhostname = andrea-VirtualBox
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname localhost
relayhost =
mynetworks = [::ffff:]/104 [::1]/128
mydomain =
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mail_spool_directory = /var/mail
home_mailbox = Maildir/
recipient_delimiter = +
inet_interfaces =
default_transport = smtp
relay_transport = smtp
virtual_alias_maps = pcre:/etc/postfix/virtual
inet_protocols = all

But I cannot receive on emails, it seems this address doesn't exist. I've reported only lines edited by me, other configuration parameters are set to default value or are commented.

share|improve this question
What's in /etc/postfix/virtual ? – NickW Jun 3 '13 at 14:36
there is only the following andrea-VirtualBox – andPat Jun 3 '13 at 14:40
Is andrea-Virtualbox a user, or a transport? – NickW Jun 3 '13 at 14:41
it is the hostname of my machine – andPat Jun 3 '13 at 14:42
andrea or root are users on my machine, should I write it into virtual instead of andrea-VirtualBox? – andPat Jun 3 '13 at 14:44

Since you are setting up a simple mail server, you just need to remove the virtual_alias_maps = pcre:/etc/postfix/virtual setting and replace it with alias_maps = hash:/etc/alias and add a single line inside it andrea (as you mentioned having a user andrea on the system). After you have done that, you need to run newaliases or postalias /etc/aliases to generate the DB.

Afterwards you should be able to receive messages.

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.