Skip to content

Instantly share code, notes, and snippets.

View fumionaito's full-sized avatar

Fumio Naito fumionaito

  • Subio Inc.
  • Tokyo, Japan
View GitHub Profile
@fumionaito
fumionaito / dele.exp
Last active January 23, 2024 15:31
Script to delete all mails on POP3 server.
#!/usr/bin/expect
set timeout 20
spawn telnet $env(POP3_SERVER) $env(POP3_PORT)
expect +OK; send "USER $env(POP3_USER)\r"
expect +OK; send "PASS $env(POP3_PASS)\r"
expect +OK; send "STAT\r"
set x 1
while { $x <= 10000 } {
expect +OK {