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 firstname.lastname@example.org
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:
Where $ContactEmail is email@example.com
How can i correct these problems? This is the message from my mail.log:
Jun 9 18:06:37 YH-Linux01 postfix/local: 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...