send email to a local domain but mailbox are an another server

Discussion in 'Installation/Configuration' started by mateo, Oct 25, 2010.

  1. mateo

    mateo New Member


    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 ?

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Which ispconfig version do you use?
    2) Have you used as server hostname or anywhere in /etc/postfix/ or in /etc/mailname?
  3. mateo

    mateo New Member

    I am using ISPConfig Version:
    the domain is not use in for the hostname (i can see it using 'hostname', it's enough ?)
    and neither in /etc/postfix/ or in /etc/mailname 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]
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    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: and not just:
    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
  5. mateo

    mateo New Member

    unsing hostname command, the response is not

    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 on the server)
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the file /etc/hosts, the output of the commands:

    hostname -f

    the postfix file and the content of /etc/mailname
  7. mateo

    mateo New Member

    hostname says :

    hostname -f says:

    cat /etc/hosts says (i replace xxxx by my main domain, which is not localhost.localdomain localhost s10
    ::1 localhost6.localdomain6 localhost6 s10 (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 =
    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)
  8. falko

    falko Super Moderator ISPConfig Developer

    Is the remote server?
  9. mateo

    mateo New Member

    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 :)
  10. falko

    falko Super Moderator ISPConfig Developer

    Then the problem is on the remote server. The mailbox doesn't seem to exist there.
  11. mateo

    mateo New Member

    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.
  12. falko

    falko Super Moderator ISPConfig Developer

    The remote server does receive it, but according to the mail log, the mail box doesn't exist.

Share This Page