How to properly set sendmail?

Discussion in 'Server Operation' started by Jsusnik7, Jul 31, 2013.

  1. Jsusnik7

    Jsusnik7 New Member

    I would like to send mails from my PHP application built with Codeigniter with sendmail and all works out of the box. But there are also few problems with sendmail on my server, because I don't know how to setup it properly. This is the source code from message which is sent with CodeIgniter:

    Code:
    Delivered-To: mymail@domain.name
    Received: by xxx.xxx.xxx.xxx with SMTP id xxxxxxxxxxxxxxx;
            Wed, 31 Jul 2013 02:54:36 -0700 (PDT)
    X-Received: by xxx.xxx.xxx.xxx with SMTP id xxxxxxxxxxx.xx.xxxxxxxxxxx;
            Wed, 31 Jul 2013 02:54:36 -0700 (PDT)
    Return-Path: <sendermail@domain.name>
    Received: from host.name ([xxx.xxx.xxx.xxx])
            by mx.google.com with ESMTPS id xxxxxxxxx.xxx.2013.07.31.02.54.35
            for <mymail@domain.name>
            (version=TLSv1 cipher=RC4-SHA bits=128/128);
            Wed, 31 Jul 2013 02:54:36 -0700 (PDT)
    Received-SPF: neutral (google.com: xxx.xxx.xxx.xxx is neither permitted nor denied by best guess record for domain of sendermail@domain.name) client-ip=xxx.xxx.xxx.xxx;
    Authentication-Results: mx.google.com;
           spf=neutral (google.com: xxx.xxx.xxx.xxx is neither permitted nor denied by best guess record for domain of sendermail@domain.name) smtp.mail=sendermail@domain.name
    Received: from host.name (localhost [127.0.0.1])
        by host.name (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id xxxxxxxxxxxx
        for <mymail@domain.name>; Wed, 31 Jul 2013 12:03:00 +0200
    Received: (from www-data@localhost)
        by host.name (8.14.3/8.14.3/Submit) id xxxxxxxxxxxx;
        Wed, 31 Jul 2013 12:03:00 +0200
    X-Authentication-Warning: host.name: www-data set sender to sendermail@domain.name using -f
    User-Agent: CodeIgniter
    Date: Wed, 31 Jul 2013 12:03:00 +0200
    From: "Test mail" <sendermail@domain.name>
    To: mymail@domain.name
    Subject: =?utf-8?Q?Email_Test?=
    Reply-To: "sendermail@domain.name" <sendermail@domain.name>
    X-Sender: sendermail@domain.name
    X-Mailer: CodeIgniter
    X-Priority: 3 (Normal)
    Message-ID: <xxxxxxxxxxxxxx@domain.name>
    Mime-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 8bit
    
    ----Here is the mail content----
    
    I want to hide my hostname, www-data@localhost, sendmail version & OS, x-authentication-warning, recieved-spf and authentication results. What do I have to do to properly setup sendmail, to hide those things?

    Thank you for help! :)
     

Share This Page