Hello, I hope that you will understand my question, as my english is not as good as it should be. Only the web service is used on the server, the mail server is on another server. If i try to send email using mail() (php function) to [email protected], the mail are not sent. I think that the server try to delivred them locally. I didn't register the domain in the email panel. in the /var/log/maillog, postfix seems to try to send it to the good server (the ip is not my server) but the mails are not sent... How can i fix it ? Thanks.
1) Which ispconfig version do you use? 2) Have you used mydomain.com as server hostname or anywhere in /etc/postfix/main.cf or in /etc/mailname?
I am using ISPConfig Version: 3.0.2.1 the domain is not use in for the hostname (i can see it using 'hostname', it's enough ?) and neither in /etc/postfix/main.cf or in /etc/mailname mydomain.com was on a previous server (not using ispconfig) and the mails were sent correctly, that is why i think that the problem comes from my server. here is the logfile when i try to send an email to [email protected]
If you see it when you run the hostname command, then the domain is used as hostname which will confuse postfix. Please change the hostname of your server so that it is soemthing like: server.yourdomain.com and not just: yourdomain.com You can find the instructions to change the hostname in the perfect setup guide. Additionally, please post the output of the command: netstat -tap | grep smtp
unsing hostname command, the response is not mydomain.com netstat -tap | grep smtp says : tcp 0 0 localhost.localdomain:smtp *:* LISTEN 8578/smtpd the smtp is working, as i can send email to other domain (eg: gmail, or anyone that are not registered as a website (there is not only mydomain.com on the server)
Please post the file /etc/hosts, the output of the commands: hostname hostname -f the postfix main.cf file and the content of /etc/mailname
hostname says : s10 hostname -f says: localhost.localdomain cat /etc/hosts says (i replace xxxx by my main domain, which is not mydomain.com) 127.0.0.1 localhost.localdomain localhost s10 ::1 localhost6.localdomain6 localhost6 88.190.11.86 s10.xxxxxxx.eu s10 main.cf (all comments removed) : queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mail_owner = postfix inet_interfaces = localhost mydestination = $myhostname, localhost.$mydomain, localhost unknown_local_recipient_reject_code = 550 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases.postfix mailq_path = /usr/bin/mailq.postfix setgid_group = postdrop html_directory = no manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix-2.3.3/samples readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES mailname : don't have one (looking with locate mailname, and it's not found)
Yes this IP is their remote mail server... That's is why i think that everything is fine, but my client tells me that he doesn't recevive "my" emails. By the way, thanks to try to help me
The mailbox exists on the remote server, i am sure of it because i mail to my client to this address (and the script was working fine on the previous server). but, yes, what i read on the logfile, this is that the email is sent, and the remote server doesn't recevive it.. I will try some change, try other things. Anyway, thanks you a lot for spending time on my problem ! if i resolv it, i will post the solution.