Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd September 2008, 20:40
willjob willjob is offline
Junior Member
 
Join Date: Feb 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with Postfix settings for localhost virtual domains

I have installed Ubuntu 7.10 Server ("The Perfect Setup" + ISPConfig) but I have never have gotten the email/postfix working correctly. All email I send out is always from localhost which causes problems from certain isp's who block this.

I have about 5-6 domains set with ispconfig and from what I can tell ispconfig is setting up the domains correctly for postfix.

I have read through the forums and search via google and have tried some different ideas but have not had any luck getting rid of the localhost. Any additional help would be appreciated. Also, to note if it helps... My server is behind a watchguard firewall running thru the optional port on local network.

Running hostname -f returns jobvillage.com

Here is my main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# 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 (Ubuntu)
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

readme_directory = no

# 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 = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#mydestination = localdomain, localhost, localhost.localdomain, 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
myorigin = mail.jobvillage.com



Here is my local-host-names


###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
jobvillage.com
localhost.jobvillage.com
localhost.com
localhost.localdomain
www.castell.net
www.ableresume.com
www.resumeagent.com
www.jobvillage.com
castell.net
ableresume.com
resumeagent.com
momsofgrace.com
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####






Thanks in advance for your help!
Reply With Quote
Sponsored Links
  #2  
Old 4th September 2008, 16:49
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

You must set the correct sender address in your email client.
__________________
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 4th September 2008, 19:41
willjob willjob is offline
Junior Member
 
Join Date: Feb 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
You must set the correct sender address in your email client.
I have the correct sender address I believe. Here is the email header I sent to my gmail account.
As you can see it is received by: Received: from localhost (mail.jobvillage.com [166.82.95.50]). This happens whether I send from outlook or from roundcube. Thanks.

Header-----

Delivered-To: xxxxx@gmail.com
Received: by 10.181.23.12 with SMTP id a12cs34480bkj;
Tue, 2 Sep 2008 09:09:01 -0700 (PDT)
Received: by 10.141.82.20 with SMTP id j20mr4250644rvl.234.1220371740243;
Tue, 02 Sep 2008 09:09:00 -0700 (PDT)
Return-Path: <jobz1@jobvillage.com>
Received: from localhost (mail.jobvillage.com [166.82.95.50])
by mx.google.com with ESMTP id 4si8226464yxq.9.2008.09.02.09.08.58;
Tue, 02 Sep 2008 09:09:00 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of jobz1@jobvillage.com designates 166.82.95.50 as permitted sender) client-ip=166.82.95.50;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of jobz1@jobvillage.com designates 166.82.95.50 as permitted sender) smtp.mail=jobz1@jobvillage.com
Received: by localhost (Postfix, from userid 1002)
id 3EBE79B565; Tue, 2 Sep 2008 12:08:57 -0400 (EDT)
To: xxxxx@gmail.com
Subject: hello
MIME-Version: 1.0
Date: Tue, 2 Sep 2008 12:08:57 -0400
From: Tripp <jobz1@jobvillage.com>
Message-ID: <1b419c291d89a4784eab281e09c2d656@localhost>
X-Sender: jobz1@jobvillage.com
User-Agent: RoundCube Webmail/0.1-rc2
Reply With Quote
  #4  
Old 5th September 2008, 13:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Received: by localhost (Postfix, from userid 1002)
Is this the problem? If so, what's the value of myorigin from /etc/postfix/main.cf?
__________________
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 5th September 2008, 14:25
willjob willjob is offline
Junior Member
 
Join Date: Feb 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
Is this the problem? If so, what's the value of myorigin from /etc/postfix/main.cf?
Yes.

myorigin = mail.jobvillage.com

Thank you for helping.
Reply With Quote
  #6  
Old 6th September 2008, 12:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Can you post your main.cf?

What's the output of
Code:
telnet localhost 25
?
__________________
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 6th September 2008, 16:12
willjob willjob is offline
Junior Member
 
Join Date: Feb 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

main.cf is in first post.

telnet localhost 25 output --

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 localhost ESMTP Postfix (Ubuntu)
Reply With Quote
  #8  
Old 6th September 2008, 18:05
ralic ralic is offline
Member
 
Join Date: Jun 2008
Posts: 69
Thanks: 0
Thanked 11 Times in 11 Posts
 
Default

In main.cf you have:
Code:
myhostname = localhost
Try setting it to your FQDN, or as you already have myorigin set, you could just use that:
Code:
myhostname=$myorigin
Don't forget to reload postfix after changing main.cf
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
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota... killfrog HOWTO-Related Questions 3 25th September 2009 22:45
combining 'Virtual Users And Domains With Postfix' and 'Domainkeys In Postfix' wherestheph HOWTO-Related Questions 16 27th February 2008 15:06
Question on Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) Horizon HOWTO-Related Questions 12 26th February 2008 21:22
Issues with Postfix using "Virtual Users And Domains With Postfix, Courier And MySQL" Kyse HOWTO-Related Questions 15 6th January 2007 16:35
Virtual Users And Domains With Postfix, Courier And MySQL - "apt-get" and Courier burritonator HOWTO-Related Questions 3 15th March 2006 21:11


All times are GMT +2. The time now is 23:44.


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