Title: cannot receive email on ubuntu email server
Tags: email;postfix;mail-server
Question: I setup the email server. I am able to send out mail but when I try to receive mail by sending an email to myself from another email, it doesn't work. The other email I receive a mailer-daemon and this one shows as a reject.

This is the error that i get in (```/var/log/mail.log```):

```Jun 24 19:17:31 localhost postfix/smtpd[13352]: connect from mail-lb0-f173.google.com9563591850]
Jun 24 19:17:31 localhost postfix/trivial-rewrite[13329]: warning: do not list domain socialbaked.com in BOTH mydestination and virtual_mailbox_domains
Jun 24 19:17:31 localhost postfix/smtpd[13352]: NOQUEUE: reject: RCPT from mail-lb0-f173.google.com9563591850]: 550 5.1.1 <bbowers@example.net&gt;: Recipient address rejected: User unknown in local recipient table; from=<bbowers@example.net&gt; to=<bbowers@example.net&gt; proto=ESMTP helo=<mail-lb0-f173.google.com&gt;
Jun 24 19:17:31 localhost postfix/smtpd[13352]: disconnect from mail-lb0-f173.google.com9563591850]
Jun 24 19:19:38 localhost postfix/master[2102]: daemon started -- version 2.7.0, configuration /etc/postfix
Jun 24 19:19:39 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jun 24 19:19:39 localhost dovecot: auth-worker(default): mysql: Connected to 9563591850 (mail)
Jun 24 19:19:41 localhost postfix/master[2102]: reload -- version 2.7.0, configuration /etc/postfix
```

Comment: thanks that helped. i need to verify that this worked. where do i check to see if i received the email? i dont see any errors in the log and it shows a from address being mine.

Comment: By default, the mail should be spooled to `mbox` files in `/var/spool/mail` named after the recipient.

Comment: Have you checked [this](http://serverfault.com/questions/179419/postfix-recipient-address-rejected-user-unknown-in-local-recipient-table)?


Here is another answer: The following line from the error log gives valuable info:

```localhost postfix/smtpd[13352]: NOQUEUE: reject: RCPT from mail-lb0-f173.google.com9563591850]: 550 5.1.1 <bbowers@example.net&gt;: Recipient address ejected: User unknown in local recipient table; from=<bbowers@example.net&gt; o=<bbowers@example.net&gt; proto=ESMTP helo=<mail-lb0-f173.google.com&gt;
```

Postfix should relay all mail to other servers on the internet, it does not actually receive mail for any domains. As in the error log example.com should be forwarded to the mail server for example.com. The solution, is to remove $mydomain from postfix config /etc/postfix/main.cf in line:

```mydestination = $mydomain, localhost.$mydomain, localhost
```

Source: serverfault


Here is another answer: For me, the issue was that I also had a DNS issue.  To fix this, I used 

``` dpkg-reconfigure postfix
```

From within the terminal window and changed the "local networks" field answer to include the IP of my public IP for the server.  

Afterwards, I ran ```service postfix reload``` and ```service postfix restart``` and all was well.


{'source': 'StackExchangeDataset', 'subset': 'askubuntu.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2012:00:06/24/12', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<email><postfix><mail-server>', 'Title': 'cannot receive email on ubuntu email server', 'ViewCount': 5156, 'id': 155575, 'user_AboutMe': '<p>Laravel is life</p>\n', 'user_AccountId': 203843.0, 'user_DisplayName': 'Exploit', 'user_Reputation': 223.0, 'user_Views': 14.0, 'user_id': 72899.0}}