#1  
Old 26th December 2008, 20:38
kkonline kkonline is offline
Junior Member
 
Join Date: Aug 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mail Header and Postfix

Hi,
Whenever I send mail it has the following header which takes the mail to spam
Code:
 
 Delivered-To: amigovista@gmail.com
Received: by 10.141.129.17 with SMTP id g17cs376644rvn;
        Fri, 26 Dec 2008 11:05:47 -0800 (PST)
Received: by 10.210.142.10 with SMTP id p10mr177422ebd.95.1230318345065;
        Fri, 26 Dec 2008 11:05:45 -0800 (PST)
Return-Path: <mailer@mysite.com>
Received: from mail.mysite.org (mysite.org [203.54.237.227])
        by mx.google.com with ESMTP id p10si16333536gvf.20.2008.12.26.11.05.43;
        Fri, 26 Dec 2008 11:05:44 -0800 (PST)
Received-SPF: neutral (google.com: 203.54.237.227 is neither permitted nor denied by best guess record for domain of mailer@mysite.com) client-ip=203.54.237.227;
Authentication-Results: mx.google.com; spf=neutral (google.com: 203.54.237.227 is neither permitted nor denied by best guess record for domain of mailer@mysite.com) smtp.mail=mailer@mysite.com
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by mail.mysite.org (Postfix) with SMTP id 66C3B4D0100
	for <amigovista@gmail.com>; Fri, 26 Dec 2008 18:52:59 +0000 (UTC)
To: amigovista@gmail.com
From: mailer@mysite.com
Subject: Hey my first email
Message-Id: <20081226185300.66C3B4D0100@mail.mysite.org>
Date: Fri, 26 Dec 2008 18:52:59 +0000 (UTC)

This is my first email on debian postfix after installing configuring it.
It was easy. See you
Now I want Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) to be replaced by mysite.org and then check if mail reaches the inbox.

I have postfix running on debian etch. How do I do the required changes
Code:
telnet mysite.org 25
Trying 203.54.237.227...
Connected to mysite.org.
Escape character is '^]'.
220 mail.mysite.org ESMTP Postfix (Debian/GNU)
mail from:<mailer@mysite.com>
250 2.1.0 Ok
rcpt to:<amigovista@gmail.com>
data
To: amigovista@gmail.com
From: mailer@mysite.com
Subject: Hey my first email
This is my first email on debian postfix after installing configuring it.
It was easy. See you
554 5.7.1 <amigovista@gmail.com>: Relay access denied
554 5.5.1 Error: no valid recipients
221 2.7.0 Error: I can break rules, too. Goodbye.
Connection closed by foreign host.
but
debian:~# telnet localhost 25 works fine (send mail atleast to spam!!!)
Reply With Quote
Sponsored Links
  #2  
Old 27th December 2008, 13:15
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What's in /etc/postfix/main.cf?

How did you set up your email account?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 27th December 2008, 18:15
kkonline kkonline is offline
Junior Member
 
Join Date: Aug 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.mysite.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = mail.mysite.org, debian.4.x86_64, localhost.4.x86_64, localhost
relayhost = 
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-names
The emails are configured using ispconfig and I use swiftmailer to send the mails
Reply With Quote
  #4  
Old 28th December 2008, 13:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What's in /etc/mailname?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 28th December 2008, 13:20
kkonline kkonline is offline
Junior Member
 
Join Date: Aug 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it's mysite.org
Reply With Quote
  #6  
Old 29th December 2008, 12:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What are the outputs of
Code:
hostname
and
Code:
hostname -f
?

What's the output of
Code:
postconf -d | grep localhost.localdomain
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 29th December 2008, 15:47
kkonline kkonline is offline
Junior Member
 
Join Date: Aug 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

debian:~# hostname
Code:
debian.4.x86_64
debian:~# hostname -f
Code:
mysite.org
debian:~# postconf -d | grep localhost.localdomain
debian:~#
Reply With Quote
  #8  
Old 29th December 2008, 16:28
kkonline kkonline is offline
Junior Member
 
Join Date: Aug 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just edit /etc/hostname. and now in the email header it shows
Code:
Received: from [208.8.237.227] (mysite.org [127.0.0.1])
	by mail.mysite.org (Postfix) with ESMTP id 48EB44D00FE
	for <testmail@gmail.com>; Mon, 29 Dec 2008 15:07:06 +0000 (UTC)
After changing /etc/hostname localhost.localdomain was replaced by mysite.org but the ip still is 127.0.0.1 which i think should be 208.8.237.227

my /etc/hosts is
Code:
127.0.0.1       mysite.org  localhost.localdomain   localhost debian.4.x86_64
The /etc/resolve.conf gives

Code:
nameserver 127.0.0.1
search vpsfarm.com
Is this ok?

Last edited by kkonline; 29th December 2008 at 17:02.
Reply With Quote
  #9  
Old 30th December 2008, 13:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

I think it shows 127.0.0.1 because you're sending the email directly from the server using a webmail application. This should be ok.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 14:33
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 11:14
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 17:51
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 09:40


All times are GMT +2. The time now is 00:04.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.