Find the answer to your Linux question:
Results 1 to 5 of 5
Hi 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 = ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    28

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


    Hi

    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 = mail.example.com
    myhostname = mail.example.com
    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 mail.example.com only

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

    getting the following

    Received: from localhost.localdomain (mail.example.com [69.64.65.166])
    by mail.example.com (Postfix) with ESMTP id 4BAE415A03EA
    for <XXX@gmail.com>; Wed, 15 May 2013 12:26:03 +0530 (IST)
    To: XXX@gmail.com
    From: xxxx@gmail.com
    Subject: RFQ(609) for Sodium Iodide 100% from Ahm_VendX
    Date: Wed, 15 May 2013 12:26:03 +0530
    X-Mailer: Perl script "Sendmail.pl"
    using Mail::Sender 0.8.22 by Jenda Krynicky, Czechlands
    running on localhost.localdomain (127.0.0.1)
    under account "root"
    Message-ID: <20130515_065603_018647.xxxx@gmail.com>
    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
    Linux Newbie
    Join Date
    Jan 2013
    Posts
    116
    You should check your hostname, have you setup hostname or it is still as localhost.localdomain and also check the hosts file entry.

    Code:
    cat /etc/hosts

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Posts
    28
    hi

    my /etc/hosts entry is

    1.2.3.4 mail.example.com
    127.0.0.1 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
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Jan 2013
    Posts
    116
    your hosts file's entries should as

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

  6. #5
    Just Joined!
    Join Date
    Jan 2008
    Posts
    28
    HI

    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
  •