|
Post by omega on Feb 16, 2007 5:45:08 GMT 7
The question is: where can I modify the "from address" in the Thecus system? There does not seem to be a configuraiton file anywhere. The from address is constructed in the script /img/bin/logevent/email using this formula: from_addr=admin@$hostname.$nicdomain where $hostname = the output of the hostname command = hostname of your N5200 $nicdomain = the doamin name you've configured for the first network interface (this is the WAN interface per default). So knowing this you should be able to adjust the from address by changing the configuration.... Andreas
|
|
jk
New Member
Posts: 15
|
Post by jk on Feb 18, 2007 6:41:37 GMT 7
I finally got the mail notification to work. There were a number of problems.
I modified the email script by turning on msntp --debug and writing the results to a log file. This finally allowed me to figure it all out.
Hostgator needs lots of things setup correctly:
AUTH = LOGIN (nothing else works)
You must have a valid account in the mail From: field. It is vital that the header data be valid, not just the --from parameter. I had to create a subdomain and account to match the fields setup by the email script. admin@HOSTNAME.NICDOMAIN. (I was baffled for a while on why my test e-mails from the command line were being rejected. It was because I was not setting the From: field in the test message itself.)
You cannot have a '+' in the login name, it gets converted to a ' '.
Andreas - Thanks for all the help on this. I would have never figured it out without you and your modules.
-J
|
|
|
Post by omega on Feb 18, 2007 7:00:11 GMT 7
Hi jk, your welcome and I'm happy that your e-mails are now accepted by your provider.... So what are your conclusions precisely? Are there any modifications needed for the email script? This is still not clear to me.... And sorry about the "From:" field in the e-mail, I should have you told about that - some providers (maybe most of them) rely on that fields to be valid. Depending on your answers there are still two basic tasks to do: 1) Write Thecus what modification the email script might need. 2) Write a summary for the Thecus Wiki on how to trace problems and what configuration settings might help to get e-mail working for a specific provider. Maybe you could help doing these tasks? Andreas
|
|
jk
New Member
Posts: 15
|
Post by jk on Feb 18, 2007 7:16:06 GMT 7
Andreas, Here is the e-mail I just sent to Thecus:
Hi, I spent quite a bit of time trying to get the e-mail notification working. The biggest problem I found was that the both the 'SMTP account ID' AND the 'From' field in the mail header had to be validatable by my hosting provider to allow it to accept my e-mails. Also, a '+' sign in the account ID gets converted to a ' ' so you cannot have an account name with a + character. I finally figured all this out by shadowing the your email script so I could modify it and using the --debug flag on msmtp and writing the results to a temporary log file. I had to add a subdomain and account to my domain for this all to work. Thank goodness for this forum: thecususergroup.proboards106.com/index.cgi and this guys modules: onbeat.dk/thecus/index.php/N5200_Resources If you made the following changes to your notification scheme I could have had this debugged very quickly. - Add a 'From:' field to allow me to set the from field to what ever I wanted. That way I would not need to make special accommodations to my website to support the server.
- Don't strip + from the account ID (or have a list of invalid characters)
- Have a 'Show Log' checkbox near the 'TEST' button that when checked would run the script (msmtp) with --debug and redirect the results to a temporary log file that is then show in a 'test results' window on the browser. This file could be created with '>' so it would only hold the last 'TEST' and there would not be a problem with the file growing large.
I think #3 is the most important. It would help *anybody* debug mail problems. Keep the firmware updates coming they are big improvements in every version. Also please keep supporting the installable modules, I would have never gotten this working without them.
I would be happy to update your wiki. Where would you like me to post the info? -J
|
|
|
Post by thecususer on Feb 19, 2007 3:09:52 GMT 7
I have also gotten my email notifications to work by following the pointer provided by Andreas. I discovered that the "SMTP server" is also used as the mail server for emails. I need to set it properly to point to my mail server. Also, the hostname and domain name must be valid in the network in order for emails to work. Thanks.
|
|