0

I have tried and tried to google my way out of this. This definitely has to be a very common problem because I am half-way intermediate at Linux and etI am complaining about default settings and how to change them.

On the webserver I have a basic php-based contact form. The user has the ability to put his/her name in the from field but Postfix will not take that value and actually use it.

For instance, if I put John Doe in for the from field, the emails headers appear like this

From John@vpsuser.vpslink.com
  • This header does not contain the space nor Doe
  • This header is appended with my server info.

How on earth do I fix this? And if you don't want to tell me how for some reason, then at least point me in the right direction. I have read several people's questions and answers and none of them seem to match up with my situation.

Some sources say to add such-and-such to the access file, or something else to transport. whenever I view these files, they have the appearance of a man file and I am quite confused by it.

Somewhere in the whole postfix system, there is a default setting that takes away spacing and appends the user@hostname string. Where/How can I fix that?

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
dockeryZ
  • 119
  • 5
  • your problem has nothing to do with any postfix "default" settings. you need to check your php form. – Alex P. Jun 11 '13 at 19:20
  • I used this exact php form on another system and the emails came with the expected From header... so it is not a PHP issue IMO – dockeryZ Jun 11 '13 at 19:23
  • Does it have anything at all to do with postfix? I have looked all over for this problem to no avail. – dockeryZ Jun 11 '13 at 20:29
  • A space in the from-address works at your place? Strange. And all users are internal and should mail from the domain vpsuser.vpslink.com? – Nils Jun 11 '13 at 21:19

2 Answers2

1

It seems as though the other host had their postfix (or whatever equivalent it is they used) to allow spaces and allow putting just a name in the From header. That was a shared hosting account so I don't exactly know what they did.

I ended up changing my PHP afterall. I put the name within double quotes and the email address within <> brackets and it works fine now.

dockeryZ
  • 119
  • 5
0

I think your "problem" is described here: ADDRESS_REWRITING_README. This document describes some default rewrite-rules (including the logic for changing incomplete or malformed from-addresses).

Nils
  • 7,695
  • 3
  • 34
  • 73