]> Pileus Git - ~andy/fetchmail/commitdiff
Change CRLF to LF in contrib/delete-later. Reported by Petr Uzel.
authorMatthias Andree <matthias.andree@gmx.de>
Sat, 28 Jun 2008 22:52:07 +0000 (22:52 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Sat, 28 Jun 2008 22:52:07 +0000 (22:52 -0000)
svn path=/branches/BRANCH_6-3/; revision=5210

NEWS
contrib/delete-later

diff --git a/NEWS b/NEWS
index 415e96ddaea230222c925008fd6e466053f5498c..50aa22712602318d597ee2ebf87522fcd21816b1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -115,6 +115,7 @@ fetchmail 6.3.9 (not yet released):
 * Add sslcommonname option (rcfile and commandline) as a way to work around
   misconfigured upstream SSL servers that use the wrong certificate name. It
   specifies which CommonName fetchmail expects and logs. (Daniel Richard G.)
+* Changed CRLF to LF line endings in contrib/delete-later (reporter: Petr Uzel)
 
 # DOCUMENTATION:
 * Add fetchmail-SA-2007-02.txt and fetchmail-SA-2008-01.txt.
index 50c705c9789f9738ed3c7d6e3feacc1a311efe4e..4db6973225c1494164e026a4d5bc5037c3fde86f 100644 (file)
@@ -1,56 +1,56 @@
-#!/usr/bin/expect -f\r
-\r
-# MySQL database connection settings\r
-set CRDB_host     localhost\r
-set CRDB_DB       test\r
-set CRDB_username root\r
-set CRDB_password root\r
-\r
-# set eiter one to 1 for verbose output\r
-log_user 0\r
-set comments 0\r
-\r
-package require mysqltcl\r
-\r
-# connect to MySQL database\r
-set handle [::mysql::connect -host $CRDB_host -user $CRDB_username -password $CRDB_password]\r
-\r
-# get server/usernames to clean up\r
-set userlist [::mysql::sel $handle "SELECT UserID, server, username, password, retaindays from $CRDB_DB.fetchmail_user" -flatlist]\r
-\r
-# loop through all users in database\r
-foreach {userid server username password days} $userlist {\r
-  if {$comments==1} { send_user "\r\nWorking on accound #$userid\r\n*******************************\r\n" }\r
-  eval spawn telnet -l fetchmail_cleanup $server 110\r
-  expect "ready"\r
-  send "USER $username\r"\r
-  expect "password"\r
-  send "PASS $password\r"\r
-  expect "OK"\r
-  send "STAT\r"\r
-  expect "+OK "\r
-  expect -re "\[0-9]* "\r
-  set anz $expect_out(0,string)\r
-  if {$comments==1} { send_user "message count: $anz \r\n" }\r
-  set i 0\r
-  while { $i < $anz } {\r
-    incr i\r
-    send "UIDL $i\r"\r
-    expect -re "\\\+OK $i \(.*\)\r"\r
-    set uid $expect_out(1,string)\r
-    ::mysql::exec $handle "insert ignore into $CRDB_DB.fetchmail values ($userid,'$uid',now());"\r
-    set age [::mysql::sel $handle "SELECT DATEDIFF(now(),Fetchdate) from $CRDB_DB.fetchmail where UserID=$userid and UID='$uid'" -list]\r
-    if {$comments==1} { send_user "Message #$i: UID: $uid , age: $age \r\n" }\r
-    if {$age > $days} {\r
-      send "DELE $i\r"\r
-      expect "deleted"\r
-      if {$comments==1} { send_user "Message $i deleted.\r\n" }\r
-    }\r
-  }\r
-  send "quit\r"\r
-  expect "signing off"\r
-  ::mysql::exec $handle "delete from $CRDB_DB.fetchmail where DATEDIFF(now(),Fetchdate)>($days*2) and UserID=$userid;"\r
-}\r
-::mysql::close $handle\r
-exit\r
-\r
+#!/usr/bin/expect -f
+
+# MySQL database connection settings
+set CRDB_host     localhost
+set CRDB_DB       test
+set CRDB_username root
+set CRDB_password root
+
+# set eiter one to 1 for verbose output
+log_user 0
+set comments 0
+
+package require mysqltcl
+
+# connect to MySQL database
+set handle [::mysql::connect -host $CRDB_host -user $CRDB_username -password $CRDB_password]
+
+# get server/usernames to clean up
+set userlist [::mysql::sel $handle "SELECT UserID, server, username, password, retaindays from $CRDB_DB.fetchmail_user" -flatlist]
+
+# loop through all users in database
+foreach {userid server username password days} $userlist {
+  if {$comments==1} { send_user "\r\nWorking on accound #$userid\r\n*******************************\r\n" }
+  eval spawn telnet -l fetchmail_cleanup $server 110
+  expect "ready"
+  send "USER $username\r"
+  expect "password"
+  send "PASS $password\r"
+  expect "OK"
+  send "STAT\r"
+  expect "+OK "
+  expect -re "\[0-9]* "
+  set anz $expect_out(0,string)
+  if {$comments==1} { send_user "message count: $anz \r\n" }
+  set i 0
+  while { $i < $anz } {
+    incr i
+    send "UIDL $i\r"
+    expect -re "\\\+OK $i \(.*\)\r"
+    set uid $expect_out(1,string)
+    ::mysql::exec $handle "insert ignore into $CRDB_DB.fetchmail values ($userid,'$uid',now());"
+    set age [::mysql::sel $handle "SELECT DATEDIFF(now(),Fetchdate) from $CRDB_DB.fetchmail where UserID=$userid and UID='$uid'" -list]
+    if {$comments==1} { send_user "Message #$i: UID: $uid , age: $age \r\n" }
+    if {$age > $days} {
+      send "DELE $i\r"
+      expect "deleted"
+      if {$comments==1} { send_user "Message $i deleted.\r\n" }
+    }
+  }
+  send "quit\r"
+  expect "signing off"
+  ::mysql::exec $handle "delete from $CRDB_DB.fetchmail where DATEDIFF(now(),Fetchdate)>($days*2) and UserID=$userid;"
+}
+::mysql::close $handle
+exit
+