Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th June 2008, 18:09
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default Small error with mail script on my website

I've got a strange problem with a mail script on my website. This script is a contact form that emails me with questions from users. But since i've began using an external mail server, the emails aren't delivered any more. I've done the following things:

- Deleted my old mail accounts on the server
- Deleted the mx records
- set the mailserver (domain -> options -> mailserver) to external

If i'm checking my log files while sending an e-mail, it says that it deliveres it to www-data@YH-Linux01.mydomain.com instead of csd@mydomain.nl what i've entered in the mail form..

YH-Linux01.mydomain.nl is the hostname of my server...

Here is a piece of code of the mail form:

Code:
mail("$ContactWebsiteNaam <$ContactEmail>","$ContactOnderwerp","$Body","$Hoofd");
Where $ContactEmail is csd@mydomain.nl

How can i correct these problems? This is the message from my mail.log:

Code:
Jun  9 18:06:37 YH-Linux01 postfix/local[29337]: AC67F1D005B: to=<www-data@YH-Linux01.mydomain.nl>, relay=local, delay=0.07, delays=0.03/0/0/0.04, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
As you can see, it is not mailed to my domain but to the hostname of my server...
Reply With Quote
Sponsored Links
  #2  
Old 10th June 2008, 14:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

What's in /etc/postfix/main.cf and /etc/hosts? What's the output of
Code:
hostname -f
?
__________________
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 10th June 2008, 14:42
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default

Quote:
Originally Posted by falko View Post
What's in /etc/postfix/main.cf and /etc/hosts? What's the output of
Code:
hostname -f
?
Main.cf:
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 (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

# 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.

message_size_limit = 20971520
myhostname = YH-Linux01.mydomain.nl
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = YH-Linux01.mydomain.nl, localhost.mydomain.nl, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
message_size_limit = 25000000
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

smtpd_helo_required = yes
disable_vrfy_command = yes
strict_rfc821_envelopes = yes

maps_rbl_domains =
            multi.uribl.com,
            dsn.rfc-ignorant.org,
            dul.dnsbl.sorbs.net,
            list.dsbl.org,
            sbl-xbl.spamhaus.org,
            bl.spamcop.net,
            dnsbl.sorbs.net,
            cbl.abuseat.org,
            ix.dnsbl.manitu.net,
            combined.rbl.msrbl.net,
            rabl.nuclearelephant.com

smtpd_recipient_restrictions =
            permit_sasl_authenticated,
            permit_mynetworks,
            reject_invalid_hostname,
            reject_non_fqdn_hostname,
            reject_non_fqdn_sender,
            reject_unknown_sender_domain,
            reject_unknown_recipient_domain,
            reject_maps_rbl,
            check_relay_domains
/etc/hosts:
Code:
127.0.0.1       localhost.localdomain           localhost
xxx.xxx.xxx.xxx  YH-Linux01.mydomain.nl      YH-Linux01
I've hidden the actual IP address

Output of hostname -f:
Code:
YH-Linux01.mydomain.nl
Reply With Quote
  #4  
Old 11th June 2008, 13:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

What's in /etc/postfix/local-host-names, /etc/mailname, and /etc/aliases?
__________________
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 11th June 2008, 13:44
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default

Quote:
Originally Posted by falko View Post
What's in /etc/postfix/local-host-names, /etc/mailname, and /etc/aliases?
Local-host-names:
Code:
localhost
YH-Linux01.mydomain.nl
localhost.YH-Linux01.mydomain.nl
localhost.mydomain.nl
localhost.localdomain
mydomain.nl
and ofcourse the domains of my clients

/etc/mailname:
Code:
YH-Linux01.mydomain.nl
/etc/aliases:
Code:
# Added by installer for initial user
root:   fred
clamav: root
Reply With Quote
  #6  
Old 12th June 2008, 14:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

The problem is that mydomain.nl is listed in /etc/postfix/local-host-names. Did you set the Co-Domain mydomain.nl to external mailserver as well in ISPConfig (go to Co-Domains, select mydomain.nl, and then go to the Options tab)?
__________________
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 13th June 2008, 16:06
jorizzzz jorizzzz is offline
Member
 
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
Send a message via MSN to jorizzzz
Default

Quote:
Originally Posted by falko View Post
The problem is that mydomain.nl is listed in /etc/postfix/local-host-names. Did you set the Co-Domain mydomain.nl to external mailserver as well in ISPConfig (go to Co-Domains, select mydomain.nl, and then go to the Options tab)?
Yes it is set to external mailserver. The ispconfig messages aren't coming in as well... These are sent to the same e-mail address.

What is the best option for this? Remove the entry in local-host-names?
Reply With Quote
  #8  
Old 14th June 2008, 19:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
 
Default

Quote:
Originally Posted by jorizzzz View Post
Yes it is set to external mailserver.
On the Co-Domains tab, or only for the main domain of the site?

Quote:
Originally Posted by jorizzzz View Post
What is the best option for this? Remove the entry in local-host-names?
No, because ISPConfig will overwrite your changes...
__________________
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
procmail can't write Hellbound General 27 8th June 2009 21:51
Postfix reject connections gabrix Server Operation 27 25th January 2007 08:37
Core 4: Error Messages on Fresh Install re CTX/SSL jjw Installation/Configuration 30 6th September 2006 12:16
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs ebbay Installation/Configuration 9 4th March 2006 11:47


All times are GMT +2. The time now is 12:51.


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