From 6d80b813cc6fc16f31db31ffb161d1ffbb7d62bb Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Tue, 12 Aug 2014 12:16:58 +0100 Subject: Add external SMTP check example. --- docs/installing/manual_install.md | 46 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) (limited to 'docs/installing/manual_install.md') diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index 7eac53ae3..20b672856 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -541,7 +541,7 @@ and so it knows to include that in any absolute urls it serves. We have some [production server best practice notes]({{ site.baseurl}}docs/running/server/). -## What next? +## What next? Check out the [next steps]({{ site.baseurl }}docs/installing/next_steps/). @@ -579,10 +579,52 @@ Check out the [next steps]({{ site.baseurl }}docs/installing/next_steps/). 75 The `mailin` script emails the details of any errors to - `CONTACT_EMAIL` (from your `general.yml` file). A common problem is + `CONTACT_EMAIL` (from your `general.yml` file). A common problem is for the user that the MTA runs as not to have write access to `files/raw_emails/`. + If everything seems fine locally, you should also check from another + computer connected to the Internet that the DNS for your chosen + domain indicates that your Alaveteli server is handling mail, and + that your server is receiving mail on port 25. The following + command is a query to ask which server is handling the mail for + the domain `example.com`, which receives the answer `mail.example.com`. + + $ host -t mx example.com + example.com mail is handled by 5 mail.example.com. + + This next command tries to connect to port 25, the standard SMTP + port, on `mail.example.com`, and is refused. + + $ telnet mail.example.com 25 + Trying 10.10.10.30... + telnet: connect to address 10.10.10.30: Connection refused + + The transcript below shows a successful connection where the server + accepts mail for delivery (the commands you would type are prefixed + by a `$`): + + $ telnet 10.10.10.30 25 + Trying 10.10.10.30... + Connected to 10.10.10.30. + Escape character is '^]'. + 220 mail.example.com ESMTP Exim 4.80 Tue, 12 Aug 2014 11:10:39 +0000 + $ HELO X + 250 mail.example.com Hello X [10.10.10.1] + $ MAIL FROM: + 250 OK + $ RCPT TO: + 250 Accepted + $ DATA + 354 Enter message, ending with "." on a line by itself + $ Subject: Test + $ + $ This is a test mail. + $ . + 250 OK id=1XHA03-0001Vx-Qn + QUIT + + * **Various tests fail with "*Your PostgreSQL connection does not support unescape_bytea. Try upgrading to pg 0.9.0 or later.*"** -- cgit v1.2.3 From b4b74eaaf70add887891cad33626a32f24c2736c Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Fri, 22 Aug 2014 13:54:19 +0100 Subject: fixup! Add external SMTP check example. --- docs/installing/manual_install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/installing/manual_install.md') diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index 20b672856..e8a1556dd 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -598,7 +598,7 @@ Check out the [next steps]({{ site.baseurl }}docs/installing/next_steps/). $ telnet mail.example.com 25 Trying 10.10.10.30... - telnet: connect to address 10.10.10.30: Connection refused + telnet: connect to address 10.10.10.30: Connection refused The transcript below shows a successful connection where the server accepts mail for delivery (the commands you would type are prefixed -- cgit v1.2.3 From d3e626ce5876d907fe41849261f957438fdac212 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Fri, 22 Aug 2014 13:59:58 +0100 Subject: fixup! Add external SMTP check example. --- docs/installing/manual_install.md | 76 +-------------------------------------- 1 file changed, 1 insertion(+), 75 deletions(-) (limited to 'docs/installing/manual_install.md') diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index e8a1556dd..bd23b54ee 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -549,81 +549,7 @@ Check out the [next steps]({{ site.baseurl }}docs/installing/next_steps/). * **Incoming emails aren't appearing in my Alaveteli install** - First, you need to check that your MTA is delivering relevant - incoming emails to the `script/mailin` command. There are various - ways of setting your MTA up to do this; we have documented - one way of doing it - [in Exim]({{ site.baseurl }}docs/installing/email/#example-setup-on-exim4), including [a command you can use]({{ site.baseurl }}docs/installing/email/#troubleshooting-exim) to check that the email - routing is set up correctly. We've also documented one way of setting up [Postfix]({{ site.baseurl }}docs/installing/email/#example-setup-on-postfix), with a similar [debugging command]({{ site.baseurl }}docs/installing/email/#troubleshooting-postfix). - - Second, you need to test that the mailin script itself is working - correctly, by running it from the command line, First, find a - valid "To" address for a request in your system. You can do this - through your site's admin interface, or from the command line, - like so: - - $ ./script/console - Loading development environment (Rails 2.3.14) - >> InfoRequest.find_by_url_title("why_do_you_have_such_a_fancy_dog").incoming_email - => "request-101-50929748@localhost" - - Now take the source of a valid email (there are some sample emails in - `spec/fixtures/files/`); edit the `To:` header to match this address; - and then pipe it through the mailin script. A non-zero exit code - means there was a problem. For example: - - $ cp spec/fixtures/files/incoming-request-plain.email /tmp/ - $ perl -pi -e 's/^To:.*/To: /' /tmp/incoming-request-plain.email - $ ./script/mailin < /tmp/incoming-request-plain.email - $ echo $? - 75 - - The `mailin` script emails the details of any errors to - `CONTACT_EMAIL` (from your `general.yml` file). A common problem is - for the user that the MTA runs as not to have write access to - `files/raw_emails/`. - - If everything seems fine locally, you should also check from another - computer connected to the Internet that the DNS for your chosen - domain indicates that your Alaveteli server is handling mail, and - that your server is receiving mail on port 25. The following - command is a query to ask which server is handling the mail for - the domain `example.com`, which receives the answer `mail.example.com`. - - $ host -t mx example.com - example.com mail is handled by 5 mail.example.com. - - This next command tries to connect to port 25, the standard SMTP - port, on `mail.example.com`, and is refused. - - $ telnet mail.example.com 25 - Trying 10.10.10.30... - telnet: connect to address 10.10.10.30: Connection refused - - The transcript below shows a successful connection where the server - accepts mail for delivery (the commands you would type are prefixed - by a `$`): - - $ telnet 10.10.10.30 25 - Trying 10.10.10.30... - Connected to 10.10.10.30. - Escape character is '^]'. - 220 mail.example.com ESMTP Exim 4.80 Tue, 12 Aug 2014 11:10:39 +0000 - $ HELO X - 250 mail.example.com Hello X [10.10.10.1] - $ MAIL FROM: - 250 OK - $ RCPT TO: - 250 Accepted - $ DATA - 354 Enter message, ending with "." on a line by itself - $ Subject: Test - $ - $ This is a test mail. - $ . - 250 OK id=1XHA03-0001Vx-Qn - QUIT - + See the [general email troubleshooting guide]({{ site.baseurl }}docs/installing/email#general-email-troubleshooting). * **Various tests fail with "*Your PostgreSQL connection does not support unescape_bytea. Try upgrading to pg 0.9.0 or later.*"** -- cgit v1.2.3