1 (edited by wdphd 2015-03-09 18:46:47)

Topic: Received: from localhost (localhost.localdomain [127.0.0.1])

======== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.5
- Related log if you're reporting an issue:
====

Looking at the sent email headers, the above line seems to exist. Also, iredadmin dashboard lists the same.
iRedAdmin    v0.4 (MySQL)
Hostname    localhost.localdomain

$hostname -f gives mail.mydomain.com

I've also added the same to my /etc/hosts file.

I've checked the postfix main.cf file for myorigin & hostname and it exists

//main.cf --postfix

inet_protocols = all
virtual_alias_domains =
myhostname = mail.mydomain.com
myorigin = mail.mydomain.com
allow_percent_hack = no
swap_bangpath = no
mydomain = mydomain.com
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname

Also, the received email headers

Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of user@mydomain.com designates xx.xx.xx.xx as permitted sender) smtp.mail=user@mydomain.com;
       dkim=pass header.i=@mydomain.com
Received: from localhost (localhost.localdomain [127.0.0.1])
    by mail.mydomain.com (Postfix) with ESMTP id EF9E474B43
    for <mygmailinbox@gmail.com>; Mon,  9 Mar 2015 10:27:03 +0000 (UTC)
Authentication-Results: mail.mydomain.com (amavisd-new);
    dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"
    header.d=mydomain.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mydomain.com; h=
    user-agent:message-id:references:in-reply-to:subject:subject:to
    :from:from:date:date:content-transfer-encoding:content-type
    :content-type:mime-version; s=dkim....
X-Virus-Scanned: amavisd-new at mail.mydomain.com
Received: from mail.mydomain.com ([127.0.0.1])
    by localhost (mail.mydomain.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id XVLOsmsMgrJ7 for <mygmailinbox@gmail.com>;
    Mon,  9 Mar 2015 10:27:02 +0000 (UTC)
Received: from mail.mydomain.com (localhost.localdomain [127.0.0.1])
    by mail.mydomain.com (Postfix) with ESMTPSA id D9B31204AC
    for <mygmailinbox@gmail.com>; Mon,  9 Mar 2015 10:27:01 +0000 (UTC)

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

The headers bit is right, because it was scanned by the local server [amavis, spamassassin and clamd] but iRedMail should read your FQDN and not that

3

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

7t3chguy wrote:

The headers bit is right, because it was scanned by the local server [amavis, spamassassin and clamd] but iRedMail should read your FQDN and not that

How do i fix the same?
$hostname --fqdn outputs mail.mydomain.com

4

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

I'm not sure, with what you've provided it seems everything is right, if you would like me to look into it I'd need ssh access

5 (edited by avenger_msoft 2015-03-09 23:21:13)

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

wdphd wrote:

How do i fix the same?
$hostname --fqdn outputs mail.mydomain.com

telnet 127.0.0.1 10025

, write here hostname output?

6

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

avenger_msoft wrote:
wdphd wrote:

How do i fix the same?
$hostname --fqdn outputs mail.mydomain.com

telnet 127.0.0.1 10025

, write here hostname output?

$ telnet 127.0.0.1 10025
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 mail.mydomain.com ESMTP Postfix

7

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

Add to end of file /etc/amavis/50-user one line:

$localhost_name = $myhostname;

8

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

I've just solved this, show me the content of your /etc/hosts file

9

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

avenger_msoft wrote:

Add to end of file /etc/amavis/50-user one line:

$localhost_name = $myhostname;

This sorta worked. This reduced the keyword localhost in the email headers from 4 to 2

10

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

7t3chguy wrote:

I've just solved this, show me the content of your /etc/hosts file

xx.xx.xx.xx            mail.mydomain.com
127.0.0.1               mail.mydomain.com mailserver
127.0.1.1               mail.mydomain.com mailserver
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6


Moving 127.0.0.1               localhost.localdomain localhost from the top of /etc/hosts to the 4th line reduces the localhost keyword to 1 now.

Received: from mail.mydomain.com (localhost.localdomain [127.0.0.1])
    by mail.mydomain.com (Postfix) with ESMTP id 8D51G24F04
    for <myemail@gmail.com>; Tue, 10 Mar 2015 05:16:30 +0000 (UTC)

11

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

 
xx.xx.xx.xx            mail.mydomain.com mailserver
127.0.0.1               mail.mydomain.com localhost.localdomain localhost
127.0.1.1               mail.mydomain.com mailserver
::1             localhost6.localdomain6 localhost6

Should fix it

12

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

7t3chguy wrote:
 
xx.xx.xx.xx            mail.mydomain.com mailserver
127.0.0.1               mail.mydomain.com localhost.localdomain localhost
127.0.1.1               mail.mydomain.com mailserver
::1             localhost6.localdomain6 localhost6

Should fix it

No, Still remains :-/

Received: from mail.mydomain.com (localhost.localdomain [127.0.0.1])
    by mail.mydomain.com (Postfix) with ESMTP id E320624EE3
    for <myinbox@gmail.com>; Tue, 10 Mar 2015 06:08:27 +0000 (UTC)

13

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

I had to reboot my server for it to repair it, please try that

14

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

7t3chguy wrote:

I had to reboot my server for it to repair it, please try that

Unfortunately, tried this too. Still not working. sad

15

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

Show us content of file /var/spool/postfix/etc/hosts please.

16

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

ZhangHuangbin wrote:

Show us content of file /var/spool/postfix/etc/hosts please.

127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

17

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

Change it to

127.0.0.1   mail.mydomain.com localhost.localdomain localhost
::1             mail.mydomain.com localhost6.localdomain6 localhost6

18 (edited by wdphd 2015-03-10 20:29:00)

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

7t3chguy wrote:

Change it to

127.0.0.1   mail.mydomain.com localhost.localdomain localhost
::1             mail.mydomain.com localhost6.localdomain6 localhost6

Oh, thanks. Its working finally smile
Somehow emails to hotmail still ends up in junk.

19

Re: Received: from localhost (localhost.localdomain [127.0.0.1])

Hotmail if I recall correctly, uses a reputation based Spam Filtering system which once you have bad reputation, you have to contact them and prove the legitimacy of your emails