On 11/19/2013 09:33 PM, Arne Berglund wrote:

On 2013-11-19 11:09, Micha Silver wrote:

Hi all:

We've switched to RC Mail some weeks ago, and our clients are very pleased. But I've hit a wall getting the vacation plugin to work. Here are the details (somewhat long, sorry...)

I have the config.ini setup as follows:

[default]
driver = "ftp"
subject = "Out of Office"
body = "default.txt"
server = "mail.arava.co.il"
passive = True

[dotforward]
binary = "/usr/bin/vacation"
flags = ""
message = ".vacation.msg"
database = ".vacation.db"
alias_identities = true
set_envelop_sender = false
always_keep_message = true

If I connect to the mail server with a regular ftp client, I can successfully upload a .forward file, with either passive or active ftp, using either binary or ascii transfer. So the vsftpd daemon is working OK. However when a user tries to use the vacation plugin interface, she gets:

CONFIGURATION ERROR

Vacation plugin: Cannot upload .forward. Check permissions and/or server configuration
Please read the INSTALL instructions!

In the roundcubemail errors logfile I see:

[19-Nov-2013 20:48:41 +0200]: PHP Error: Vacation plugin: Cannot upload .forward. Check permissions and/or server configuration in /var/www/html/roundcubemail/plugins/vacation/lib/ftp.class.php on line 0 (POST /?_task=settings&_action=plugin.vacation-save?_task=&_action=)

and the exchange in the vsftpd log file shows:

Tue Nov 19 18:48:41 2013 [pid 27825] CONNECT: Client "10.40.40.1"
Tue Nov 19 18:48:41 2013 [pid 27825] FTP response: Client "10.40.40.1", "220 Welcome to Internet Arava FTP service."
Tue Nov 19 18:48:41 2013 [pid 27825] FTP command: Client "10.40.40.1", "USER micha"
Tue Nov 19 18:48:41 2013 [pid 27825] [micha] FTP response: Client "10.40.40.1", "331 Please specify the password."
Tue Nov 19 18:48:41 2013 [pid 27825] [micha] FTP command: Client "10.40.40.1", "PASS <password>"
Tue Nov 19 18:48:41 2013 [pid 27824] [micha] OK LOGIN: Client "10.40.40.1"
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP response: Client "10.40.40.1", "230 Login successful."
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP command: Client "10.40.40.1", "PASV"
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP response: Client "10.40.40.1", "227 Entering Passive Mode (10,40,40,3,238,90)"
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP command: Client "10.40.40.1", "TYPE I"
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP response: Client "10.40.40.1", "200 Switching to Binary mode."
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP command: Client "10.40.40.1", "SIZE .forward"
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP response: Client "10.40.40.1", "550 Could not get file size."
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP command: Client "10.40.40.1", "SIZE .vacation.db"
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP response: Client "10.40.40.1", "550 Could not get file size."
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP command: Client "10.40.40.1", "TYPE A"
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP response: Client "10.40.40.1", "200 Switching to ASCII mode."
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP command: Client "10.40.40.1", "QUIT"
Tue Nov 19 18:48:41 2013 [pid 27826] [micha] FTP response: Client "10.40.40.1", "221 Goodbye."

It seems that the file upload is aborting as soon as it switches to ASCII mode (even though I tried to specify passive = True in config.ini). However, as I said, uploading with a regular ftp client works as expected, in either mode.

Any ideas are most welcome.

Thanks,
Micha

I'm baffled by this, Micha.


Me too! :-(


Your config is virtually identical to mine. I changed log mode to vsftp, mine just walks right through the process, never tries ASCII as far as I can see.

I think my next step would be try a manual FTP transaction from the command line of the RC server, if possible.


No problems here:


[root@mail tmp]# pwd
/tmp
[root@mail tmp]# cat .forward
tsvibar@gmail.com
[root@mail tmp]# ftp localhost
Connected to Arava-Mail.
220 Welcome to Internet Arava FTP service.
504 Unknown AUTH type.
504 Unknown AUTH type.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): micha
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put .forward
local: .forward remote: .forward
227 Entering Passive Mode (127,0,0,1,238,138)
150 Ok to send data.
226 File receive OK.
18 bytes sent in 3.5e-05 seconds (5e+02 Kbytes/s)
ftp> quit
221 Goodbye.
[root@mail tmp]# ll /home/micha/.forward
-rw-r--r-- 1 micha micha 18 Nov 19 22:09 /home/micha/.forward
[root@mail tmp]#



I can't imagine what I'm missing.


-- 
Arne Berglund
System Administrator, Internet Services
Lane Education Service District
Eugene, OR
____________