Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Ok so I'm trying to forward mail from my ubuntu server (lets call it to a external gmail account using postfix.

The problem is when I send mail using another gmail and yahoo account to, and I check var/log/, nothing shows up.

However when I use sendmail in the terminal and send to the same address I get the following written into the log as well as the mail actually sending and ending up in my inbox:

Jan  4 00:02:48 Machine postfix/local[6520]: 6C82DB80C4A: to=<>, relay=local, delay=0.01, delays=0/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Jan  4 00:02:48 Machine postfix/qmgr[6497]: 6C82DB80C4A: removed
Jan  4 00:09:58 Machine postfix/pickup[6496]: B206CB80C46: uid=0 from=<root>
Jan  4 00:09:58 Machine postfix/cleanup[6540]: B206CB80C46: message-id=<20140104050958.B206CB80C46@Machine>
Jan  4 00:09:58 Machine postfix/qmgr[6497]: B206CB80C46: from=<>, size=265, nrcpt=1 (queue active)
Jan  4 00:09:59 nightMachine postfix/smtp[6542]: B206CB80C46: to=<>, orig_to=<>,[]:25, delay=14, delays=13/0/0.22/0.69, dsn=2.0.0, status=sent (250 2.0.0 OK 1388812199 qd7si6471164igb.62 - gsmtp)
Jan  4 00:09:59 Machine postfix/qmgr[6497]: B206CB80C46: removed

Is there a reason for this? How would I fix it?

I was following this tutorial.


# See /usr/share/postfix/ for a commented, more complete version

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = Machine
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =, Machine, localhost.localdomain, localhost
relayhost = 
mynetworks = [::ffff:]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = mail/

#added the following for mail server :O!!
virtual_alias_domains = 
virtual_alias_maps = hash:/etc/postfix/virtual

result when I do a dig mx query in terminal:

;; ANSWER SECTION:        21600   IN      MX      10

telnet 25

Connected to
Escape character is '^]'.
220 Machine ESMTP Postfix (Ubuntu)
share|improve this question
1) Don't use a domain name you don't own. Either use your own (which will give the people helping you a better chance of doing so) or use which is specifically meant to be used in such cases. 2) Do you have an A or CNAME record for (I would have been able to check that, had you used your own domain name instead of a random one you don't own.) – Jenny D Jan 4 '14 at 20:19
Sorry, I changed the name for privacy reasons. And no it is only listed as an MX, do I perhaps need to make a CNAME record for mail? – bnynn Jan 4 '14 at 20:25
A lot of people do that, and it makes it really hard to help with anything DNS related. I do understand your point, but it's also important to make sure you don't cause problems for either the people helping you or for the people who own the domain you used. If I hadn't recognised "", I might have spent some time checking their DNS and mailservers to no use. (And not everyone here is from the US and thus won't necessarily know that a name is a well-known company in the US; I only recognised tacobell because I did a translation for them some 12 years ago!) – Jenny D Jan 4 '14 at 20:34
I am terribly sorry! I had no idea that using that name would cause so much confusion! I will definitely consider this for future posts. Thank you. – bnynn Jan 4 '14 at 20:39
I know you didn't mean anything bad, that's why I wanted to explain. I will see if we can get a note about that into the help section, on "how to ask questions", to make it easier for people to know how to obfuscate names when they need to. – Jenny D Jan 5 '14 at 11:44
up vote 2 down vote accepted

You've set your MX record to "". That means that when any mailserver tries to send mail to you, they will do a DNS lookup to find Since that doesn't exist, the sending system doesn't know where to send the email.

To fix this, do either of the following two things:

  1. Remove your MX record entirely. As long as you don't have an MX record, the sending system will instead do a DNS lookup for, and since that does resolve to the server running your mailserver, that will work.
  2. In addition to the MX record, create an A or CNAME record for

It should look like his for an A record:

mail     A

(except, of course, the IP address should be the actual IP of the server, not the loopback address)

and like this for a CNAME:

mail     CNAME
share|improve this answer
Heh, thanks :-) I'm not a genius, but I've been running email systems for a couple of decades now... – Jenny D Jan 5 '14 at 11:43

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.