| 78 | |
| 79 | == Troubleshooting == |
| 80 | |
| 81 | If you cannot get the notification working, first make sure the log is activated and have a look at the log to find if an error message has been logged. |
| 82 | |
| 83 | Notification errors are not reported through the web server, so the user who submit a change or a new ticket never gets notified about a notification failure. The Trac administrator needs to look at the log to find the error trace. |
| 84 | |
| 85 | === ''Permission denied'' error === |
| 86 | |
| 87 | Typical error message: |
| 88 | {{{ |
| 89 | ... |
| 90 | File ".../smtplib.py", line 303, in connect |
| 91 | raise socket.error, msg |
| 92 | error: (13, 'Permission denied') |
| 93 | }}} |
| 94 | |
| 95 | This error usually comes from a security settings on the server: many Linux distributions do not let the web server (Apache, ...) to post email message to the local SMTP server. |
| 96 | |
| 97 | Many users get confused as they try and success to communicate with the SMTP server: |
| 98 | {{{ |
| 99 | telnet localhost 25 |
| 100 | }}} |
| 101 | Trouble is that a regular user may connect to the SMTP server, but the web server cannot: |
| 102 | {{{ |
| 103 | sudo -u www-data telnet localhost 25 |
| 104 | }}} |
| 105 | |
| 106 | In such a case, you need to configure your server so that the web server is authorize to post to the SMTP server. The actual settings depend on your Linux distribution and current security policy. You may find help browsing the Trac MailingList archive. |
| 107 | |
| 108 | Relevant ML threads: |
| 109 | * SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518 |
| 110 | |
| 111 | === ''Suspected spam'' error === |
| 112 | |
| 113 | Some SMTP servers may reject the notification email sent by Trac. |
| 114 | |
| 115 | The default Trac configuration uses Base64 encoding to send emails to the recipients. The whole body of the email is encoded, which sometimes trigger ''false positive'' SPAM detection on sensitive email servers. In such an event, it is recommended to change the default encoding to "quoted-printable" using the `mime_encoding` option. |
| 116 | |
| 117 | Quoted printable enconding works better with languages that use one of the Latin charsets. For Asian charsets, it is recommended to stick with the Base64 encoding. |
| 118 | |