Abilitazione autoreply per fuori ufficio

From RVM Wiki
Revision as of 08:23, 6 August 2007 by Gabriele.vivinetto (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installazione su Debian Sarge.

Si vuole abilitare la funzione di vacation con un messaggio di autoreply abilitabile dalle Opioni di Squirrelmail.

Si utilizza un Plugin chiamato autoreply, che presuppone l'accesso alla home directory dell'utente via Ftp.

Il sistema di vacation si basa proprio su vacation.


Installazione del Plugin plugin

cd /tmp
wget http://www.squirrelmail.org/plugins/autorespond-0.4-1.2.10.tar.gz
cd /usr/share/squirrelmail/plugins
sudo tar -xvzf /tmp/autorespond-0.4-1.2.10.tar.gz
sudo mv autorespond-0.4/ autorespond
rm -f /tmp/autorespond-0.4-1.2.10.tar.gz

Abiltazione del Plugin

Abilitare il plugin dal programma di configurazione di SquirrelMAil:

sudo /etc/squirrelmail/conf.pl

Scegliere 8. Plugins

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >> 8

Abilitare il plugin Autoresponder (18)

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins
    1. ip_users

  Available Plugins:
    2. translate
    3. info
    4. delete_move_next
    5. squirrelspell
    6. spamcop
    7. filters
    8. calendar
    9. abook_take
    10. fortune
    11. administrator
    12. newmail
    13. bug_report
    14. sent_subfolders
    15. mail_fetch
    16. listcommands
    17. message_details
    18. autorespond

R   Return to Main Menu
C   Turn color on
S   Save data
Q   Quit

Command >> 18

Uscire, salvare e testare navigando su http://your-squirrelmail-location/src/configtest.php

Installazione server Ftp

Occorre che ci sia un server Ftp installato che permetta il login degli utenti con scrittura nella loro home directory unix, con password unix. Se non esiste già un server Ftp installato, installare vsftpd

sudo apt-get install vsftpd

Disabilitare l'anonymous Ftp, abilitare l'accesso agli utenti locali, abilitare la scrittura modifcando in /etc/vsftpd.conf

#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES

Riavviare vsftpd

sudo /etc/init.d/vsftpd stop; sudo /etc/init.d/vsftpd start

Provare a loggarsi come user locale con password unix e a creare e cancellare una directory nella propria home:

ftp localhost
Connected to localhost.
220 (vsFTPd 2.0.3)
Name (localhost:root): wcolombo
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwx------   29 1010     100          4096 Jun 03 14:21 Maildir
226 Directory send OK.
ftp> mkdir test
257 "/home/wcolombo/test" created
ftp> rmdir test
250 Remove directory operation successful.
ftp> quit
221 Goodbye.


Installazione vacation

sudo apt-get install vacation


Test vacation

Loggarsi in SquirrelMail.

Nelle Opzioni, appare il menu

Auto Response: Reply or Forward

Cliccare su "Reply" e customizzare il messaggio.

Confermare con "Finish"

Appare un messaggio di conferma:

New settings saved:  	New mail will be kept here in your Inbox.
Senders will get an automatic reply.

Verificare che i files .vacation.msg e .forward siano stati scritti correttamente:

 ls /home/wcolombo/
total 28
drwx------   3 wcolombo users 4096 2005-06-03 17:13 .
drwxrwsr-x  17 root     staff 4096 2005-06-03 16:59 ..
-rw-r--r--   1 wcolombo users  704 2005-01-24 12:49 .bash_profile
-rw-r--r--   1 wcolombo users 1290 2005-01-24 12:49 .bashrc
-rw-------   1 wcolombo users   31 2005-06-03 17:13 .forward
drwx------  29 wcolombo users 4096 2005-06-03 16:21 Maildir
-rw-------   1 wcolombo users  361 2005-06-03 17:13 .vacation.msg

Mandare una email all'utente. Si deve ricevere l'autoreply, solo la prima volta.


Customizazione del Messaggio predefinito

Il messaggio predefinito è customiabile modificando il file vi /usr/share/squirrelmail/plugins/autorespond/config.php

$AUTORESPOND_OPTS['default_message'] = <<<EOmesg
Hello.  I'm away from my mailbox right now, but I will read
your message when I return.  Thank you for your patience.

PS:  This automatic response is only sent after your first
message.  It won't be sent again in the near future, even if
you send more email before I return.

Best regards.

    -- {$GLOBALS['username']}
EOmesg;

ATTENZIONE: Ricordarsi di disabilitare l'autoreply quando non più necessario !!!