Mail replies are not appearing in my Alaveteli install

50 views
Skip to first unread message

Radhouane Fazai

unread,
Apr 29, 2013, 11:36:23 AM4/29/13
to alavet...@googlegroups.com
Hello all ,

I have an Alaveteli Site  , where mail replies ( from FOI officers ) dont apear in the site .

I checked  many times the config on exim  and  I can't figure out the problem .

Here are my configs , some one might have run into this and help is much appreciated .


   Testing mail delivery
 
   $ exim -bt foi+request-1234@localhost
     R: alaveteli for foi+request-1234@localhost
     foi+request-1234@localhost -> |/home/marsoum/current/script/mailin
     transport = alaveteli_mailin_transport

    Exim configs

 /etc/exim4/conf.d/main/04_alaveteli_options
         ALAVETELI_HOME=/home/marsoum/current
         ALAVETELI_USER=www-data
         log_file_path=/var/log/exim4/exim-%slog-%D
         MAIN_LOG_SELECTOR==+all -retry_defer
/etc/exim4/conf.d/router/04_alaveteli
     alaveteli_request:
       debug_print = "R: alaveteli for $local_part@$domain"
       driver = redirect
       data = ${lookup{$local_part}wildlsearch{/home/marsoum/current/config/aliases}
       }
       pipe_transport = alaveteli_mailin_transport

/etc/exim4/conf.d/transport/04_alaveteli

alaveteli_mailin_transport:
   driver = pipe
   command = $address_pipe ${lc:$local_part}
   current_directory = /home/marsoum/current
   home_directory = /home/marsoum/current
   user = www-data
   group = www-data

Testing with dummy fixture

$ cp spec/fixtures/files/incoming-request-plain.email /tmp/
$ perl -pi -e 's/^To:.*/To: <foi+request...@marsoum41.org>/' /tmp/incoming-request-plain.email

$ ./script/mailin < /tmp/incoming-request-plain.email
$ echo $?
0

Other details

 The user www-data owns /home/marsoum directory (and all subdirectories)
 ALAVETELI_HOME/files/raw_emails wasn't created until I used the  the dummy email reply mail above  ( and contains only that email )
 mail log gets pulled and appear  in the backend  as follows :
 

2013-04-28 11:10:06 [2438] cwd=/home/marsoum/releases/20130428024202 5 args: /usr/sbin/sendmail -i -t -f foi+request...@marsoum41.org
2013-04-28 11:10:06 [2438] 1UWUAw-0000dK-Ma <= foi+request...@marsoum41.org U=marsoum P=local S=1283 id=ogm-3+517d49...@marsoum41.org T="Freedom of Information request - Salaire des imams" from <foi+request...@marsoum41.org> for radho...@gmail.com
2013-04-28 11:10:07 [2439] 1UWUAw-0000dK-Ma => radho...@gmail.com F=<foi+request...@marsoum41.org> P=<foi+request...@marsoum41.org> R=dnslookup T=remote_smtp S=1320 H=gmail-smtp-in.l.google.com [2607:f8b0:4003:c02::1a]:25 X=TLS1.0:RSA_ARCFOUR_SHA1:16 CV=no DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=mx.google.com" C="250 2.0.0 OK 1367165406 oi2si10015250obc.201 - gsmtp" QT=1s DT=1s
2013-04-28 18:15:57 [3179] cwd=/home/marsoum/releases/20130428220633 5 args: /usr/sbin/sendmail -i -t -f foi+request...@marsoum41.org
2013-04-28 18:15:57 [3179] 1UWap3-0000pH-KB <= foi+request...@marsoum41.org U=nobody P=local S=1283 id=ogm-3+517dad...@marsoum41.org T="Freedom of Information request - Liste des Etablissements" from <foi+request...@marsoum41.org> for radho...@gmail.com
2013-04-28 18:15:59 [3180] 1UWap3-0000pH-KB => radho...@gmail.com F=<foi+request...@marsoum41.org> P=<foi+request...@marsoum41.org> R=dnslookup T=remote_smtp S=1317 H=gmail-smtp-in.l.google.com [2607:f8b0:4003:c02::1a]:25 X=TLS1.0:RSA_ARCFOUR_SHA1:16 CV=no DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=mx.google.com" C="250 2.0.0 OK 1367190958 rm9si2287227oeb.27 - gsmtp" QT=2s DT=1s


 Any Idea how to fix that ?
 ps : I added Arabic language and French language to transifex if any one is interested in using Alaveteli in the Arab or French speaking world    
 


Yehuda Bar-Nir

unread,
Apr 29, 2013, 12:20:34 PM4/29/13
to alavet...@googlegroups.com
Hi Radhouane,
I had a similar problem with getting reply emails to appear. My issue turned out to be related to permissions (The owner of the alaveteli source tree was not www-data in my case), but it looks like you covered that corner. What helped me track the issue is to look at the application log file. you can find it under <alaveteli-source>/log/development.log (or production.log if you are set-up like that). Look for lines that start with: "Received mail:" and see if you see anything interesting there.
Also, make sure that port 25 is open on your server. You can test it by typing:
telnet <server-address> 25
At the terminal of your client computer. Note that the last test might fail if your ISP is blocking port 25, so you might get a misleading result from this test.

About the Arabic translation, you will probably want to display pages in Arabic using RTL page layout. I have a few fixes related to that in my fork I am waiting for Rails 3 in order to push the changes back upstream. You can take a look at my work for now under: https://github.com/hasadna/alaveteli/commit/b21ea1c3d61e287eda58e6f3f74c51182c4cc797

Yehuda


2013/4/29 Radhouane Fazai <radho...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Alaveteli Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alaveteli-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Louise Crow

unread,
Apr 29, 2013, 12:24:56 PM4/29/13
to alavet...@googlegroups.com
Hi Radhouane,

I think one problem here is in the configuration of your mail server. If I use 'host' to do a DNS look up for a mail server for marsoum41.org, I get the following response, pointing me to mail.masoum41.org:

$ host -t mx marsoum41.org
marsoum41.org mail is handled by 5 mail.marsoum41.org.

But if I then try to connect to mail.marsoum41.org on port 25 to check that it is accepting mail, the connection is refused:

$ telnet mail.marsoum41.org 25
Trying 198.101.146.154...
telnet: connect to address 198.101.146.154: Connection refused

So I think the first issue to resolve is that incoming mail is not currently being accepted by your mailserver - check that mail.marsoum41.org is the server that you want to receive incoming mail, and that it is configured to receive mail from the internet.

Hope that's useful,

Louise

Radhouane Fazai

unread,
Apr 29, 2013, 12:49:16 PM4/29/13
to alavet...@googlegroups.com

Thank you Yhuda  and Louise  and sorry for opening another message  about incoming mail , gonna try the fixes you proposed
$ perl -pi -e 's/^To:.*/To: <foi+request-3-b2c6be1b@marsoum41.org>/' /tmp/incoming-request-plain.email

$ ./script/mailin < /tmp/incoming-request-plain.email
$ echo $?
0

Other details

 The user www-data owns /home/marsoum directory (and all subdirectories)
 ALAVETELI_HOME/files/raw_emails wasn't created until I used the  the dummy email reply mail above  ( and contains only that email )
 mail log gets pulled and appear  in the backend  as follows :
 

2013-04-28 11:10:06 [2438] cwd=/home/marsoum/releases/20130428024202 5 args: /usr/sbin/sendmail -i -t -f foi+request-3-b2c6be1b@marsoum41.org
2013-04-28 11:10:06 [2438] 1UWUAw-0000dK-Ma <= foi+request-3-b2c6be1b@marsoum41.org U=marsoum P=local S=1283 id=ogm-3+517d49de9a410-a25a@marsoum41.org T="Freedom of Information request - Salaire des imams" from <foi+request-3-b2c6be1b@marsoum41.org> for radho...@gmail.com
2013-04-28 11:10:07 [2439] 1UWUAw-0000dK-Ma => radho...@gmail.com F=<foi+request-3-b2c6be1b@marsoum41.org> P=<foi+request-3-b2c6be1b@marsoum41.org> R=dnslookup T=remote_smtp S=1320 H=gmail-smtp-in.l.google.com [2607:f8b0:4003:c02::1a]:25 X=TLS1.0:RSA_ARCFOUR_SHA1:16 CV=no DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=mx.google.com" C="250 2.0.0 OK 1367165406 oi2si10015250obc.201 - gsmtp" QT=1s DT=1s
2013-04-28 18:15:57 [3179] cwd=/home/marsoum/releases/20130428220633 5 args: /usr/sbin/sendmail -i -t -f foi+request-3-b2c6be1b@marsoum41.org
2013-04-28 18:15:57 [3179] 1UWap3-0000pH-KB <= foi+request-3-b2c6be1b@marsoum41.org U=nobody P=local S=1283 id=ogm-3+517dadad8924e-d8c3@marsoum41.org T="Freedom of Information request - Liste des Etablissements" from <foi+request-3-b2c6be1b@marsoum41.org> for radho...@gmail.com
2013-04-28 18:15:59 [3180] 1UWap3-0000pH-KB => radho...@gmail.com F=<foi+request-3-b2c6be1b@marsoum41.org> P=<foi+request-3-b2c6be1b@marsoum41.org> R=dnslookup T=remote_smtp S=1317 H=gmail-smtp-in.l.google.com [2607:f8b0:4003:c02::1a]:25 X=TLS1.0:RSA_ARCFOUR_SHA1:16 CV=no DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=mx.google.com" C="250 2.0.0 OK 1367190958 rm9si2287227oeb.27 - gsmtp" QT=2s DT=1s
Reply all
Reply to author
Forward
0 new messages