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

We had na old notebook runing Ubuntu 12.04 working as a web/ftp/mail server and it worked but since the notebook was a notebook and pretty old and unreliable, a desktop was bought to replace it before it stopped working all together.

Due to issues with the new desktop's vídeo card, we couldn't use Ubuntu 12.04 so we installed Ubuntu 13.10 and wen't about configuring it.

Since we removed the notebook from the network, we kept the same Computer Name and local IP address to make things as close to the old server as possible configuration-wise.

However, something has gone wrong since Postfix is throwing error 451 4.3.0 lookup faillure on every attempt to send a mail, and no email can be received either.

Our file is a copy of the one we were using (and working) on the old server (notice we use EHCP)

# 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 powered by Easy Hosting Control Panel (ehcp) on 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
myhostname =
relayhost = 
mydestination = localhost,
mynetworks =,,,,
virtual_alias_domains = 
virtual_alias_maps = proxy:mysql:/etc/postfix/, proxy:mysql:/etc/postfix/
transport_maps = proxy:mysql:/etc/postfix/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/
virtual_mailbox_maps = proxy:mysql:/etc/postfix/
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,check_client_access hash:/var/lib/pop-before-smtp/hosts,reject_unauth_destination
smtp_use_tls = yes
smtpd_use_tls = yes
smtpd_tls_auth_only = no
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
debug_peer_list = 
sender_canonical_maps = 
debug_peer_level = 1
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $mynetworks $virtual_mailbox_limit_maps $transport_maps

alias_maps = hash:/etc/aliases

smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated,check_client_access hash:/var/lib/pop-before-smtp/hosts,reject_unauth_destination
smtpd_destination_concurrency_limit = 2
smtpd_destination_rate_delay = 1s
smtpd_extra_recipient_limit = 10
disable_vrfy_command = yes
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_error_sleep_time = 1s
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 20

This configuration was working before but now everytime i try to send a mail in squirrelmail it reports:

Message not sent. Server replied: 
Requested action aborted: error in processing
451 4.3.0 <someone@domain.ext>: Temporary lookup failure

And i can't send mail to it from outsider either. Any ideas?

EDIT: Here are some issues MXToolBox reports to my domain, answering hopefully to @Teun Vink:

              BlackList      Mail Server     Web Server    DNS
  Error           4              0               2          0
  Warnings        0              0               0          3
  Passed          0              6               3          12

So the domain is on some blacklist, but that doesn't explain the error at all No mail server issues found (except it's not working) Those two web server errors it's because i don't have HTTPS workin (No SSL Certificate) so the test fails Those 3 DNS warnings we're already there when it was working with the other machine and are related to stuff i can't control:

   SOA Refresh Value is outside of the recommended range
   SOA Expire Value out of recommended range
   SOA NXDOMAIN Value too high

I've searched and as far as i can tell only the guys who sold the retail can change those values and they won't.

Edit2: I half solved the issue.on the new machine postfix was installed but postfix-mysql waasn't so he couldn't connect to the database (rookie mistake). After fixing that, i can now send mails to the outsider without any issues, however i am still not able to receive mails from utside. The sender doesn't get any message warning about the non-delivery but the message doesn't fall in the inbox and the log shows:

Nov 13 15:11:57 m21-traducoes postfix/smtpd[5872]: NOQUEUE: reject: RCPT from re[]: 451 4.3.5 <[212.55.154.
24]>: Client host rejected: Server configuration error; from=<>
 to=<> proto=SMTP helo=<>
Nov 13 15:11:57 m21-traducoes postfix/smtpd[5872]: disconnect from relay4.ptmail[]

Edit3: Removing the smtpd_relay_restrictions parameter from allows me to receive mail from outsider - but (i think) also makes me an open relay - which is a no-no. Ideas?

share|improve this question
by sold the retail i mean sold the domain - sorry – 537mfb Nov 12 '13 at 17:47
The error Server configuration error is from your own machine, is the domain that gets rejected your domain, or one you host in virtual_domains? – NickW Nov 13 '13 at 15:59
The domains being rejected are any outside of my network. in the exemple was sapo but the same happens with gmail, Hotmail, Yahoo and whatnot - see new edit – 537mfb Nov 13 '13 at 16:20
OK - when i remove the smtpd_relay_restrictions line MXToolBox still says i am not an open relay - was i wrong in that assessment or is MXToolBox wrong? If i am wrong it's fixed by commenting that line - otherwise.... – 537mfb Nov 13 '13 at 16:25
quick telnet test indicates closed relay and all working - yay – 537mfb Nov 13 '13 at 16:31

Temporary lookup failures are often caused by DNS problems. Check if DNS is working properly and if you can resolve MX records for the domain you're sending the email to.

share|improve this answer
The email i am sending to is outsider my network - it's my personal email that i use everyday and is managed by a portuguese ISP company - so yes DNS and mx is ok there. As for on the domain i'm configuring this machine on, MXToolBox finds the issues i'm about to report in an edit of the question - mind you this domain had a mail server working from the old machine - still.. – 537mfb Nov 12 '13 at 17:31
Are you sure the resolv.conf is configured correctly for the new machine? – NickW Nov 12 '13 at 17:47
resolv.conf is the same as in the old machine (empty apart from the the comment that comes default with it) - which was working on the old machine – 537mfb Nov 12 '13 at 18:10
@NickW - plewase check my question updates – 537mfb Nov 13 '13 at 15:36
up vote 0 down vote accepted

WEll this was an odd one but i finally figured it out and fixed it in two steps:

1 - checking the mail.log (i should have started there) i noticed postfix was failling to reach the mysql database. A little research and i figured out that postfix was installed but postfix-mysql wasn't. So i just reinstalled the all mail package using:

sudo apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl phpmyadmin apache2 libapache2-mod-php5 php5 php5-mysql libpam-smbpass

This made it so i finally could sendmail to the outside but not receive it.

2 - after much fidgeting and googling i commented out the smtpd_relay_restrictions line in, restarteed postfix and voilá, am receiving mail from the outside. a couple of tests showed commenting the line didn't make me an open relay(not sure why) so good enough for me

It's all working now

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.