Current error code is "Premature end of script headers:" and 500 internal server error in the browser ... though script has been partially read form has not continued on to the completion (thank you in this case) page.
The extent of my editing of the script is changing approved recipients emails and domains and locations of abuse logs ....
Odd thing is it seems to have started working now ...
Anyone explain which part are the script headers and could I have corrupted them by some fault in file handling ... am editing in textpad and renaming file to .txt before uploading to ensure it ftps as asci
Any tips appreciated ... taken lots of time today ... works fine in other incarnations I must be missing something
re: "did it start working again after you uploaded a copy after an edit? "
Sure did .. I am wondering if I am corrupting it slightly with the editor .. have tried recently editing it as .pl file only and then only renaming in wexplorer to .txt to ensure asci ftp upload .. I hate this script! :-) as soon as I have an alternative for those sites its going!
however there is a background issue that I am sorting out now ... the scripts now reads fine in some circs .... so I know its chmoded etc right ...
(seems related with the email address of the recipient) ..
when I send the result to myself (a form change) the script runs fine and form and script work correctly .. but when I change the form to the intended recipient at my client it fails 500 internal server (the address is in the valid recipients & domains part) and I am now getting bounced failed emails saying "user unknown" well its not a user its an external email address ...
thats another issue altogether I think .. perhaps not a script issue ...
I am thinking a way round it may be to create a user and send the form output to user@localhost then set up some aliases as I want the resulting mail enquiry to goto multiple email addresses anyhow.
Anyhow thanks for response .. any tips are appreciated .. I have an unusual domain set up for this domain name anyhow which may be the cause of the issue .. the web server is on my server but mail is set to go directly to the IP of the clients adsl connection
---------------------
Storyteller yes I looked there pretty quickly and in the error email sent to me (as postmaster)
what I am getting in the failed mail is
Final-Recipient: RFC822; whatever@clientdomain.com
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Unix; 550 5.1.1 User unknown
But that address is set in my "allowed recipients" & allowed domains and I used to be able to send to it ...
in the access log I am getting
"POST /cgi-bin/renamedformmailfile.pl HTTP/1.1" 500 620
and in the error log things like
- Premature end of script headers:
- malformed header from script. Bad header=whatever@clientdomain.com.
depending on what / whom I try to send the form to .. its a bit bizzare ... the last instance of "Premature end of script headers:" went away on its own .. I made no change to the script but changed the forms send-to address to one I know the server will send out to.
The thing that is different about this clientdomain which may have some bearing on the matter is that its set up on the nameserver as
webserver at local server IP & then via virtual server statement to the web files etc
while an MX5 mail.clientdomain.com and an A record points mail.clientdomain.com at the clients always on adsl router's IP address so effectvely my server does not handle this domains mail at all and should I thought just send the mail resulting from the form / script to clientdomain.com
---------------
netcommr I dont think it is looking for a local user at all times as I have been able to send to third party domains when I have permitted it by "allowed recipients" in the script ... though something funny is up now for sure ..
I will probably test this again though as if it does and I can get the form to work fine to a local user I may try to send it there and then use some kind of alias to send out to the addresses I want it to go to (need some thinking about) .. its bizarre a bit because I have other applications like this working fine and have also tried conversions of their scripts (installed years ago) they also now fail though they work where they are.
I suppose a valid question is ...
I have pointed mail away from my server using MX and A records ... so I guess I dont need anything in the mailserver part of my domain set up for this clientdomain .. because I am not handing mail here anymore .. but perhaps its a mail issue .. the server does not know to use outside dns details for sending the mail on ..
---------------
claus sorry you are way over my head there .. simple code mods configurations if you like are all I do at the moment with that script ... dont know without further details what you are referring to.
in the form itself also never had to before. i.e its working on other domians without this change to email addresses .. held in the script or form.
I have no clue about your specific problem, I just started learning Perl a bit ago myself, just trying to make claus' pointer a bit more clear. :)
AFAIK you only have to escape (put the "\") for double-quotes (""), but single quotes ('') are not evaluated for variables or arrays. So if you have 'blah@blah.blah' w/ single quotes, you won't have to escape the "@", but if they are "blah@blah.blah" you will.
Jordan
Actually you've got an error code:
Final-Recipient: RFC822; whatever@clientdomain.com
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Unix; 550 5.1.1 User unknown This error code is the recieving mailserver "@clientdomain.com" reporting back to you that it has received a mail from you but had some problems with it.
The RFC822 is a standard for email, so your mail did state the recipient properly with the address "whatever@clientdomain.com" - it's being handled the way it's supposed to, you can find the standard text here, but it's very dull reading: [faqs.org...]
The 550 is the same as a 404 on the web. Like a webserver that cannot find a page to deliver, this mailserver cannot find a user to deliver to. It means that this address "whatever@clientdomain.com" is not valid - there is no such user "whatever" on the mail system.
It's not the user on the sending web-system, it's the user on the receiving mail-system. There is no such email account it claims.
Don't know if this is any help to you, but it's about all i can identify from the description posted.
/claus
551 User not local; please try <forward-path>
551 replies look like they can be issued for these commands:
RCPT
VRFY
So...doing a bit of poking around turned up a customer service case [support.earthlink.net] from Earthlink that looks relevant:
Error Message
There was an error transfering your mail. I said RCPT to:(address) and then SMTP server said 551: We do not relay.
Cause
The computer attempting to send email can not be verified as connected directly to Earthlink. For example, the computer sending mail is behind a firewall or has authenticated into another ISP. The relaying denied is a conscious effort to stop spammers from using our mail servers.
Solution
Switching the outgoing mail server to a non-EarthLink server or connect directly to an EarthLink POP may solve this problem.
So...putting all this together, I would guess that your formmail script is trying to relay the mail through some server that cannot verify (VRFY) that the connection is local -- i.e., the mail server thinks you are trying to foward mail through it w/o being connected to it, and wants you to connect to it first or else connect directly to the server that the foward is pointing to.
I can only figure two possible solutions if this is an accurate diagnosis of the problem:
1. Login to the mail server before you send the mail (or if it is your own local daemon, figure out how to enable fowarding).
2. Use a different mail server.
Jordan
[cs.cf.ac.uk...]
I know that you are modifying another script and that this script will not do the tasks you are accomplishing with the other script. However, this script will printout the conversation between your mailserver and the responding one (see bottom of page) - that's very neat and it may help you diagnosing problems.
/claus
I just found out that my client is having issues with their adsl connection and has been able to browse but not send or receive email from their co network.
I am tempted to feel that my issue is directly related.
I did not think the script I am using relied on any answerback from my server or others to execute. I thought that if it found a valid email address (according to the email addresses I configured into it as valid) it would just send the mail and move to the configured thank you page. Any rejected mail then being sent back to the sender email from address, (email being a required form field)
However it may be smarter than I thought.
This may be the first time i have tried the form / script with a dodgy server at the recipient end :-(
Perhaps I will have to take them back to pop3, take mail.myclient.com back into my server so I know I cannot loose enquiries.
I dont see a place to discuss setting up of always on broadband connections, email accounts and domain issues here in webmasterworld ..
Its a topic I need to get a good handle on as it affects most of my clients now.