Add option for POP3 last command
authorJamie Cameron <jcameron@webmin.com>
Thu, 12 Apr 2007 23:28:11 +0000 (23:28 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 12 Apr 2007 23:28:11 +0000 (23:28 +0000)
dovecot/edit_mail.cgi
dovecot/lang/en
dovecot/save_mail.cgi

index c0e6637..9b04d09 100755 (executable)
@@ -89,6 +89,16 @@ if (&find("pop3_uidl_format", $conf, 2)) {
                3);
        }
 
+# Allow POP3 last command
+if (&find("pop3_enable_last", $conf, 2)) {
+       $last = &find_value("pop3_enable_last", $conf);
+       @opts = ( [ 'yes', $text{'yes'} ], [ 'no', $text{'no'} ] );
+       print &ui_table_row($text{'mail_last'},
+               &ui_radio("pop3_enable_last", $last,
+                 [ @opts,
+                   [ '', &getdef("pop3_enable_last", \@opts) ] ]), 3);
+       }
+
 print &ui_table_end();
 print &ui_form_end([ [ "save", $text{'save'} ] ]);
 
index 19630d1..8dacffb 100644 (file)
@@ -150,6 +150,7 @@ mail_uidl_courier1=Courier verion 1, old Cyrus
 mail_uidl_courier2=Courier verion 2
 mail_uidl_tpop3d=tpop3d
 mail_euidl=Missing or invalid UIDL format
+mail_last=Allow use of POP3 LAST command?
 
 log_net=Changed Networking and Protocols
 log_login=Changed User and Login Options
index 0784971..96c6b9b 100755 (executable)
@@ -52,6 +52,10 @@ if (&find("pop3_uidl_format", $conf, 2)) {
        &save_directive($conf, "pop3_uidl_format", $uidl);
        }
 
+# LAST command
+&save_directive($conf, "pop3_enable_last",
+               $in{'last'} ? $in{'last'} : undef);
+
 &flush_file_lines();
 &unlock_file($config{'dovecot_config'});
 &webmin_log("mail");