View Full Version : Cannot send mail with postfix

Jul 19, 2013, 03:36 AM

I'm trying to send through the Mac terminal:

date | mail -s testing test@gmail.com

In mail.log I get the following error:

"Jul 19 10:19:17 oris-imac.home postfix/error[707]: 165009630728: to=<test@gmail.com>, relay=none, delay=31, delays=0.61/31/0/0, dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=smtp.gmail.com type=MX: Host not found, try again)
Jul 19 10:19:46 oris-imac.home postfix/master[682]: master exit time has arrived"

I looked for a solution online but couldn't find any one that was useful for me, but I guess it's a DNS issue.

Anyone know what can I do to solve this?


Jul 19, 2013, 06:24 PM
Where did you look? What have you tried? Looks like a DNS problem but could be anything.

1) Is there a difference between the nameservers you are seeing in /etc/resolv.conf and what appears in System Preferences > Network for the DNS Server? For that matter, /var/run/resolv.conf and /private/etc/resolv.conf should all match too.

2) Maybe it’s a problem with lookupd. You can restart it with “sudo dscacheutil -flushcache”.

3) Have you installed anything to block ports like PeerGuardian, Little Snitch or done anything firewallish?

4) Is the behavior different at home vs. school or a corporate network? Do you run your own DNS?

5) Anything else in /var/log/mail.log that looks interesting?

Info and things to do and check here (http://www.riverturn.com/blog/?p=239) and here (http://ubuntuforums.org/showthread.php?t=882203). Post some output of the commands you ran.

Info : http://benjaminrojas.net/configuring-postfix-to-send-mail-from-mac-os-x-mountain-lion/ and http://www.zenddeveloper.com/how-to-send-smtp-mails-with-postfix-mac-os-x-10-8/

Jul 20, 2013, 06:52 AM
While I'm testing the points you brought up (Thanks!), I'll add that I changed system preferences -> network -> advanced -> DNS to google's public DNS server and it now works.

Anything I need to do to make it work without it?