Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    set postix to send e-mail via the my domain name


    I have centos server with postfix.

    I have set the following in postfix

    postconf -n

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    html_directory = no
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mailbox_size_limit = 10024000000
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    mydomain =
    myhostname =
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases.postfix
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
    relay_domains =
    sample_directory = /usr/share/doc/postfix-2.6.6/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    unknown_local_recipient_reject_code = 550

    I want that in recipient should get the email from the only

    but when I check the recipents e-mail header I still found the following localhost.localdomain

    getting the following

    Received: from localhost.localdomain ( [])
    by (Postfix) with ESMTP id 4BAE415A03EA
    for <>; Wed, 15 May 2013 12:26:03 +0530 (IST)
    Subject: RFQ(609) for Sodium Iodide 100% from Ahm_VendX
    Date: Wed, 15 May 2013 12:26:03 +0530
    X-Mailer: Perl script ""
    using Mail::Sender 0.8.22 by Jenda Krynicky, Czechlands
    running on localhost.localdomain (
    under account "root"
    Message-ID: <>
    MIME-Version: 1.0
    Content-Type: text/html

    I want to remove this entry localhost.localdomain
    what I required to configured in postfix to remove the same.

  2. #2
    You should check your hostname, have you setup hostname or it is still as localhost.localdomain and also check the hosts file entry.

    cat /etc/hosts

  3. #3

    my /etc/hosts entry is localhost.localdomain localhost

    If remove localhost entry postfix having starting problem.

    or i am getting the following error

    warning: host not found: localhost

  4. $spacer_open
  5. #4
    your hosts file's entries should as

    yourIP Hostname
    and comment localhost as below:
    # localhost.localdomain localhost
    Also chack resolve.conf entries and if you have installed also named check named.conf for localhost.

  6. #5

    As I said earlier if I remove the or comment the localhost.localdomain entry I was getting the following error.

    May 15 17:29:11 testing postfix/local[7682]: warning: host not found: localhost

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts