Monday, September 12, 2005

Debugging POP/IMAP/SMTP With Telnet

by damonp on September 12, 2005

in Snippets

POP3

$ telnet host.domain.com 110
Trying x.x.x.x …
Connected to host.domain.com (x.x.x.x).
Escape character is ‘^]’.
+OK POP3 host.domain.com v2003.83rh server ready
USER USERNAME
+OK User name accepted, password please
PASS PASSWORD
+OK Mailbox open, 48 messages
LIST
+OK Mailbox scan listing follows
1 3894
2 11761
3 5499
4 13448
5 10451
RETR 5

QUIT

 

IMAP

$ telnet x.x.x.x 143
Trying x.x.x.x…
Connected to host.domain.com.
Escape character is ‘^]’.
* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS STARTTLS AUTH=LOGIN] host.domain.com IMAP4rev1 2003.338rh at Mon, 12 Sep 2005 14:12:44 -0500 (CDT)
a LOGIN USERNAME PASSWORD
a OK [CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS BINARY UNSELECT SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] User USERNAME authenticated
a EXAMINE INBOX
* 46 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1093716296] UID validity status
* OK [UIDNEXT 610] Predicted next UID
* FLAGS (NonJunk Junk $MDNSent NotJunk $NotJunk JunkRecorded $Junk $Label4 $Label1 $Label2 $Label3 $Label5 \Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS ()] Permanent flags
* OK [UNSEEN 27] first unseen message in /var/spool/mail/xxxxxxx
a OK [READ-ONLY] EXAMINE completed
a FETCH 1 BODY[TEXT]

a LOGOUT
* BYE host.domain.com IMAP4rev1 server terminating connection
a OK LOGOUT completed
Connection closed by foreign host.

 

SMTP

$ telnet x.x.x.x 25
Trying x.x.x.x…
Connected to host.domain.com.
Escape character is ‘^]’.
220 host.domain.com ESMTP Sendmail 8.9.3+Sun/8.9.3; Mon, 12 Sept 2005 12:18:01-0500 (CDT)
HELO me@localhost
250 host.domain.com Hello me [x.x.x.x], pleased to meet you
MAIL FROM:< me@domain >
250 < me@domain >… Sender ok
RCPT TO:< you@domain >
250 < you@domain >… Recipient ok
DATA
354 Enter mail, end with “.” on a line by itself
Hi You!
.

250 QAA00316 Message accepted for delivery
QUIT
221 host.domain.com closing connection
Connection closed by foreign host.

Popularity: 5%

{ 2 comments }

How To Clear Stuck Urchin Tasks

by damonp on September 12, 2005

in SysAdmin

  1. Check the status of the task

    Open the Urchin Configuration GUI and select the following window: Configuration -> Scheduler -> Task History. From this view you will see a Status column. Each item in the “Status” column is a clickable link. The link will open a window that displays the process status when Urchin attempted to process the log file for that profile. Stuck tasks will normally appear as running with a date in the past.

  2. SSH to server.
  3. Stop Urchin daemons with one of the following:
    /etc/init.d/urchin stop
    /usr/local/urchin/bin/urchinctl stop
  4. Change directory to the urchin utils directory:
    cd /usr/local/urchin/utils
  5. Run the following commands, replacing profilename with the selected profile name:
    uconf-driver action=set_parameter table=task name="profilename" cr_runnow=0
    uconf-driver action=set_parameter table=task name="profilename" ct_runstatus=2
    uconf-driver action=set_parameter table=task name="profilename" ct_completed=0
    uconf-driver action=set_parameter table=task name="profilename" ct_status=1
    uconf-driver action=set_parameter table=task name="profilename" ct_lockid=0
  6. Restart the Urchin daemons with one of the following:
    /etc/init.d/urchin start
    /usr/local/urchin/bin/urchinctl start

Popularity: 1%

{ 0 comments }