Hello, I searched the forums and found this thread and I am having a similar problem but his solution will not work for me.http://www.howtoforge.com/forums/showthread.php?t=52737&highlight=mail+php postqueue -p dig mx robertday.ca Now then is this because I haven't set mail up for this website? Or because I named the server server1.example.com Or is it something else? I tried changing the dns zone on godaddy but it won't accept just my ip address. Should I reinstall the server with a better name anyway?
Thats the problem. You should have replaced server1.example.com with the real name of your server during installation. To fix that, edit the files: /etc/hosts /etc/hostname /etc/mailname /etc/postfix/main.cf and replace the hostname with the real hostname of your server, e.g. server1.robertday.ca and make sure that server1.robertday.ca exists as dns A-Record in DNS which points to the IP address of your server.
Okay that worked for 1 email it went into my spam but now it won't send another. I have attached a screenshot of my GoDaddy DNS manager with the black smudge being the static IP for the server. Here are postqueue -p and dig mx robertday.ca again. How do I go about removing mail from the queue?
If i get this right, you are sending mails with in this case a php script, right? Because looking at the queue message this looks for me like your server does not reach the destination mailserver, as the connections times out. Did you check your message log for maybe dropped outbound connections? You may test this via If you see any response, just enter "quit" and hit enter. Does sending mails to other recipients work for you? Eventhough I think it does not make a difference, did you try sending to the same thing just via the mail command. Regarding the queue handling, here's a short manual:
I just remembered that I am behind a router which is probably the cause of my problems. Nvm about the ports they are TCP:20,21,22,25,53,80,110,143,443,3306,8080,8081,10000 UDP:53,3306 Taken from the ISP Config Firewall
If you are on a dynamic IP, you're most likely blacklisted (please check http://www.mxtoolbox.com/blacklists.aspx ), and you should set up relaying: http://www.howtoforge.com/postfix_relaying_through_another_mailserver