
9th June 2008, 18:09
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
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...
|

10th June 2008, 14:32
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
|
|
What's in /etc/postfix/main.cf and /etc/hosts? What's the output of ?
|

10th June 2008, 14:42
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
Quote:
Originally Posted by falko
What's in /etc/postfix/main.cf and /etc/hosts? What's the output of ?
|
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
|

11th June 2008, 13:02
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
|
|
What's in /etc/postfix/local-host-names, /etc/mailname, and /etc/aliases?
|

11th June 2008, 13:44
|
|
Member
|
|
Join Date: May 2007
Location: Soest, Netherlands
Posts: 81
Thanks: 1
Thanked 4 Times in 2 Posts
|
|
Quote:
Originally Posted by falko
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
|

12th June 2008, 14:34
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
|
|
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)?
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 06:30.
|
|
Recent comments
1 day 5 hours ago
1 day 10 hours ago
1 day 14 hours ago
1 day 16 hours ago
2 days 6 hours ago
2 days 6 hours ago
2 days 11 hours ago
2 days 18 hours ago
2 days 19 hours ago
2 days 20 hours ago