Tuesday, February 18, 2003

Mail Commands
Memory Tutorials
ODBC
HTTP Reference
Regular Expression Reference


POP3 Command Summary

Minimal POP3 Commands:


USER name valid in the AUTHORIZATION state
PASS string
QUIT

STAT valid in the TRANSACTION state
LIST [msg]
RETR msg
DELE msg
NOOP
RSET

QUIT valid in the UPDATE state

Optional POP3 Commands:

APOP name digest valid in the AUTHORIZATION state

TOP msg n valid in the TRANSACTION state
UIDL [msg]

POP3 Replies:

+OK
-ERR

Note that with the exception of the STAT, LIST, and UIDL commands, the reply given by
the POP3 server to any command is significant only to "+OK" and "-ERR". Any text
occurring after this reply may be ignored by the client.


9. Example POP3 Session

S:
C:
S: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
C: APOP mrose c4c9334bac560ecc979e58001b3e22fb
S: +OK mrose's maildrop has 2 messages (320 octets)
C: STAT
S: +OK 2 320
C: LIST
S: +OK 2 messages (320 octets)
S: 1 120
S: 2 200
S: .
C: RETR 1
S: +OK 120 octets
S:
S: .
C: DELE 1
S: +OK message 1 deleted
C: RETR 2
S: +OK 200 octets
S:
S: .
C: DELE 2
S: +OK message 2 deleted
C: QUIT
S: +OK dewey POP3 server signing off (maildrop empty)
C:
S:

smtp commands
-HELO EHLO STARTTLS RCPT DATA RSET MAIL VRRFY QUIT HELP ETRN


*******************************************************************

Bharath says:
http://www.sharpsoftware.co.uk/total/+
Bharath says:
http://www.sharpsoftware.co.uk/total/
Mohan says:
10Q
Bharath says:
http://www.mindtools.com/pages/main/newMN_TIM.htm
Bharath says:
http://www.premiumhealth.com/memory/links.htmMay - 9 - 2002


**********************************************************************



1) http://teststage.echomail.com/campaigns/library.html
I found lot of previously used newsletters.
Baush & Lomb & apartments.com

2) http://teststage.echomail.com/creative/src/index.asp
Reports about Email campaigns
Tested by sending a mail to my mail address
it has the capability to send Greeting cards,offers,newsletters


3) http://203.197.141.201/emcatalog/
It contain lot of catalog which is custom build
Customer can upload their own images and can create their own

http://teststage.echomail.com/Creative/src/data/ecards/_Birthday/Presents~Girl~and~Boy/spacer.gif


Important Feedback

1) reason for 10 minutes session closing event.
2) clarification ************ in the title bar in many page.
3) EmCatalog search page gives me the 500 error (Internal server error)


***********************************************************************

May - 10 - 2002
================
ODBC - webopedia
Abbreviation of Open DataBase Connectivity, a standard database access method developed by
Microsoft Corporation. The goal of ODBC is to make it possible to access any data from any
application, regardless of which database management system (DBMS) is handling the data. ODBC
manages this by inserting a middle layer, called a database driver , between an application
and the DBMS. The purpose of this layer is to translate the application's data queries into
commands that the DBMS understands. For this to work, both the application and the DBMS must
be ODBC-compliant -- that is, the application must be capable of issuing ODBC commands and the
DBMS must be capable of responding to them. Since version 2.0, the standard supports SAG SQL.

ODBC - MicroSoft
Open Database Connectivity (ODBC) is a widely accepted application programming interface (API)
for database access. It is based on the Call-Level Interface (CLI) specifications from X/Open
and ISO/IEC for database APIs and uses Structured Query Language (SQL) as its database access
language.



*******************************************************************************



1) HTTP Get Request syntax
GET / HTTP/1.1
Connection: Keep-Alive
User-Agent: Mozilla/4.0 (
compatible;
MSIE 4.01;
Windows NT)
Host: www.magelang.com
Accept: image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg

2)HTTP Get Request syntax
GET /servlet/MyServlet?name=Scott&
company=MageLang%20Institute HTTP/1.1
Connection: Keep-Alive
User-Agent: Mozilla/4.0 (
compatible;
MSIE 4.01;
Windows NT)
Host: www.magelang.com
Accept: image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg

3)HTTP Response syntax
HTTP/1.1 200 Document follows
Date: Tue, 14 Apr 1997 09:25:19 PST
Server: JWS/1.1
Last-modified: Mon, 17 Jun 1996 21:53:08 GMT
Content-type: text/html
Content-length: 4435

<4435 bytes worth of data -- the document body>


Head

The HEAD Method

The HTTP HEAD method is very similar to the HTTP GET method.
The request looks exactly the same as the GET request
(except the word HEAD is used instead of GET), but the
server only returns the header information.

HEAD is often used to check the following:

The last-modified date of a document on the server for caching purposes
The size of a document before downloading (so the browser can present progress information)
The server type, allowing the client to customize requests for that server
The type of the requested document, so the client can be sure it supports it
Note that HEAD, like GET, is expected to be safe and idempotent

The POST Method
The POST method passes all of its parameter data in an input stream, removing (GET)this limit.

POST /servlet/MyServlet HTTP/1.1
User-Agent: Mozilla/4.0 (
compatible;
MSIE 4.01;
Windows NT)
Host: www.magelang.com
Accept: image/gif, image/x-xbitmap,
image/jpeg, image/pjpeg, */
Content-type: application/x-www-form-urlencoded
Content-length: 39

name=Scott&company=MageLang%20Institute


*******************************************************************************


Search String Matches with


4Guys 4Guys
4.uys 4luys,4guys,4auys
[1234]Guys 1Guys,2Guys,3Guys,4Guys
[0-9]Guys
4Guys\? 4Guys?
4Guys* 4Guy,4Guys,4Guyss
4Guys? 4Guy,4Guys,(0,or one)
4(Guys)* 4Guys,4GuysGuys,4,4GuysGuysGuys
4{3}Guys 444Guys
^4Guys First Four charaters of line
4Guys$ Last Four charaters of line
[] charecter class,charecter range,[a-c]
Metacharacters are not active inside classes.
[abc$] a,b,c,$,(not eof line) meta meaning will lose inside class
[^a] chr except 'a'.


There are also special zero-width atoms. For example:

a Matches the letter a.
\$ Matches the character $ backslash escapes metacharacters.
\n Matches newline.
[a-z] Matches a lowercase letter.
. Matches any character except \n.
\1 Matches contents of first memory arbitrary length.
\b Word boundary transition from \w to \W.
^ Matches start of a string.
\Z Matches end of a string or before newline at end.


Precedence Operator Description
Highest (), (?:), etc. Parentheses and other grouping Operators
?, +, *, {m,n}, +?, Repitation
^abc Sequence (see below)
Lowest | Alternation


\d Matches any decimal digit; this is equivalent to the class d [0-9]c .
\D Matches any non-digit character; this is equivalent to the class [0-9].
\s Matches any whitespace character; this is equivalent to the class d [\t\n\r\f\v]c .
\S Matches any non-whitespace character; this is equivalent to the class [\t\n\r\f\v].
\w Matches any alphanumeric character; this is equivalent to the class d [a-zA-Z0-9 ] c .
\W Matches any non-alphanumeric character; this is equivalent to the class [a-zA-Z0-9_].

ca+t will match ‘cat’,‘caaat’ but won’t match ‘ct’.

ab*c Matches ac, abc, abbc, abbbc, etc.
abc* Matches ab, abc, abcc, abccc, etc.


ab(c)* Same thing, and memorizes the c actually matched.
ab(?:c)* Same thing, but doesn’t memorize the c.
abc{2,4} Matches abcc, abccc, abcccc.
(abc)* Matches empty string, abc, abcabc, etc.; memorizes abc.


ed|jo Matches ed or jo.
(ed)|(jo) Same thing.
e(d|j)o Matches edo or ejo.
ed|jo{1,3} Matches ed, jo, joo, jooo.

^ed|jo$ Matches ed at beginning, jo at end.
^(ed|jo)$ Matches exactly ed or jo.

^A An A at the beginning of a line
A$ An A at the end of a line
A An A anywhere on a line
$A A $A anywhere on a line
^\^ A ^ at the beginning of a line
^^ Same as ^\^
\$$ A $ at the end of a line
$$ Same as \$$
^.$ a line with any single character is

[0-9] Any digit
[^0-9] Any character other than a digit
[-0-9] Any digit or a -
[0-9-] Any digit or a -
[^-0-9] Any character except a digit or a -
[]0-9] Any digit or a ]
[0-9]] Any digit followed by a ]
[0-99-z] Any digit or any character between 9 and z (51.3)
[]0-9-] Any digit, a -, or a ]

* Any line with a *
\* Any line with a *
\\ Any line with a \
^* Any line starting with a *
^A* Any line
^A\* Any line starting with an A*
^AA* Any line starting with one A
^AA*B Any line starting with one or more A's followed by a B
^A\{4,8\}B Any line starting with four, five, six, seven, or eight A's followed by a B
^A\{4,\}B Any line starting with four or more A's followed by a B
^A\{4\}B Any line starting with an AAAAB
\{4,8\} Any line with a {4,8}
A{4,8} Any line with an A{4,8}


/^Sender|From:\s+(.*)/; WRONG would match:
X-Not-Really-From: faker
Senderella is misspelled

/^(Sender|From):\s+(.*)/; $1 contains Sender or From.
$2 has the data.

/^(?:Sender|From):\s+(.*)/; $1 contains the data.


/te(st)/; Matches test in $_.
/\Ute(st)/; Matches TEST.
/\Qte(st)/; Matches te(st).

$x = 'test';
/$x*/; Matches tes, test, testt, etc.
/test*/; Same thing as /$x*/.

$_ = 'http://www.perl.org/index.html'; Memorize hostname and
m#^http://([^/]+)(.*)#; path following http://.
print "host = $1\n"; host = www.perl.org
print "path = $2\n"; path = /index.html

$_ = 'ftp://ftp.uu.net/pub/systems';
m#^ftp://([^/]+)(/[^/]*)+#; Last fragment of the path goes into $2.
print "host = $1\n"; host = ftp.uu.net
print "fragment = $2\n"; fragment = /systems
but matched /pub first.



(\d{1,3}\.){3}\d{1,3} 206.159.10.1
\s([A-Za-z]+)\s\1 matches a word


http://www.terrorzone.kiev.ua/docs/ora/unix/upt/figs/7972.gif

]* height
textpad regx
1.([a-z]+) ([a-z]+) \2 \1 swap word
2.([^@])@([^.]*).(.*) matches email id
3.(<[^>]*>)([^<>]*)(<[^>]*>) matches html element
4.<[^>]*>([^<>]+)<\s*/[^>]*> mathces data between tag
^[^_]*\n
Search String Matches with

4Guys 4Guys
4.uys 4luys,4guys,4auys
[1234]Guys 1Guys,2Guys,3Guys,4Guys
[0-9]Guys
4Guys\? 4Guys?
4Guys* 4Guy,4Guys,4Guyss
4Guys? 4Guy,4Guys,(0,or one)
4(Guys)* 4Guys,4GuysGuys,4,4GuysGuysGuys
4{3}Guys 444Guys
^4Guys First Four charaters of line
4Guys$ Last Four charaters of line
[] charecter class,charecter range,[a-c]
Metacharacters are not active inside classes.
[abc$] a,b,c,$,(not eof line) meta meaning will lose inside class
[^a] chr except 'a'.


There are also special zero-width atoms. For example:

a Matches the letter a.
\$ Matches the character $ backslash escapes metacharacters.
\n Matches newline.
[a-z] Matches a lowercase letter.
. Matches any character except \n.
\1 Matches contents of first memory arbitrary length.
\b Word boundary transition from \w to \W.
^ Matches start of a string.
\Z Matches end of a string or before newline at end.


Precedence Operator Description
Highest (), (?:), etc. Parentheses and other grouping Operators
?, +, *, {m,n}, +?, Repitation
^abc Sequence (see below)
Lowest | Alternation


\d Matches any decimal digit; this is equivalent to the class d [0-9]c .
\D Matches any non-digit character; this is equivalent to the class [0-9].
\s Matches any whitespace character; this is equivalent to the class d [\t\n\r\f\v]c .
\S Matches any non-whitespace character; this is equivalent to the class [\t\n\r\f\v].
\w Matches any alphanumeric character; this is equivalent to the class d [a-zA-Z0-9 ] c .
\W Matches any non-alphanumeric character; this is equivalent to the class [a-zA-Z0-9_].

ca+t will match ‘cat’,‘caaat’ but won’t match ‘ct’.

ab*c Matches ac, abc, abbc, abbbc, etc.
abc* Matches ab, abc, abcc, abccc, etc.


ab(c)* Same thing, and memorizes the c actually matched.
ab(?:c)* Same thing, but doesn’t memorize the c.
abc{2,4} Matches abcc, abccc, abcccc.
(abc)* Matches empty string, abc, abcabc, etc.; memorizes abc.


ed|jo Matches ed or jo.
(ed)|(jo) Same thing.
e(d|j)o Matches edo or ejo.
ed|jo{1,3} Matches ed, jo, joo, jooo.

^ed|jo$ Matches ed at beginning, jo at end.
^(ed|jo)$ Matches exactly ed or jo.


/^Sender|From:\s+(.*)/; WRONG would match:
X-Not-Really-From: faker
Senderella is misspelled

/^(Sender|From):\s+(.*)/; $1 contains Sender or From.
$2 has the data.

/^(?:Sender|From):\s+(.*)/; $1 contains the data.


/te(st)/; Matches test in $_.
/\Ute(st)/; Matches TEST.
/\Qte(st)/; Matches te(st).

$x = 'test';
/$x*/; Matches tes, test, testt, etc.
/test*/; Same thing as /$x*/.

$_ = 'http://www.perl.org/index.html'; Memorize hostname and
m#^http://([^/]+)(.*)#; path following http://.
print "host = $1\n"; host = www.perl.org
print "path = $2\n"; path = /index.html

$_ = 'ftp://ftp.uu.net/pub/systems';
m#^ftp://([^/]+)(/[^/]*)+#; Last fragment of the path goes into $2.
print "host = $1\n"; host = ftp.uu.net
print "fragment = $2\n"; fragment = /systems
but matched /pub first.



(\d{1,3}\.){3}\d{1,3} 206.159.10.1
\s([A-Za-z]+)\s\1 matches a word
Sendmail Quick Reference

Tips and Tricks for Sendmail

mailq Prints the mail queue’s contents, same as /usr/lib/sendmail bp

newaliases Rebuilds the aliases database file, same as /usr/lib/sendmail bi

hoststat Prints persistent host status info, same as /usr/lib/sendmail -bh

purgestat Purges (zeroes) persistent host status info, same as /usr/lib/sendmail -bH

smtpd Runs in daemon mode, same as /usr/lib/sendmail bd q30

mailq OmaxQueueRunSize=1 - Quickly print the total number of messages within mail queue

/usr/lib/sendmail q Otimeout.queuereturn=99d - Purges the mail queue without timing out any messages. Useful if the mail server has been down longer than the queuereturn value set in the cf.

/usr/lib/sendmail bv foolist grep v deliverable - Prints only undeliverable addresses from in the mail list foolist. Great for use in a shell script to remove badd addresses from a mailing list.

Command Line Switches

-B 7bit - Causes sendmail to clear the high-bit of every incoming byte.

-B 8bitmime Causes sendmail to preserve the high-bit or every incoming byte.

-ba Uses ARPAnet/Grey-Book protocols to transfer mail.

-bD Runs as daemon, like bd, but does not fork and does not detach from controlling terminal.

-bd Runs as daemon, forks and detaches.

-bH - Purges (zeroes) persistent host status info.

-bh - Prints persistent host status info.

-bi - Initializes the aliases database.

-bm Causes sendmail to read and send message (this is the default)

-bp Prints the contents of the mail queue.

-bs Runs sendmail on standard I/O.

-bt Runs sendmail in rule testing mode.

-bv
- Verifies address.

-C /tmp/different.cf Uses different.cf as its configuration file.

-c - Sets HoldExpensive option to true.

-d - set debug mode.

-d0 Shows general config
-d0.1 Prints version
-d.04 Prints local hostname and any aliases for it.
-d0.15 Prints the list of delivery agents declared
-d0.20 Prints address of each network interface
-d8 Traces most DNS lookups
-d8.1 Prints failure of low level MX searches.
-d8.2 Prints calls to getcanonname
-d8.3 - Traces dropped local hostnames
-d8.5 Shows hostnames tried in getcanonname
-d8.8 Shows when MX lookups return the wrong type.
-d11 Traces delivery agent calls
-d11.1 Traces arguments passed to the delivery agent
-d11.2 - Prints the user ID that the delivery agent is invoked as
-d21 Traces rewriting of addresses
-d21.1- Traces general ruleset rewriting
-d21.2 Traces use of $& macro
-d21.3 Shows $> subroutines called
-d21.4 Displays result of rewrite
-d21.15 Shows $digit replacement
-d21.35 shows token by token LHS matching
-d27 Traces aliasing
-d27.1 Traces general aliasing
-d27.2 Traces :include: files, alias self-references, and errors on home
-d27.3 Traces the ~/.forward path and the alias wait
-d27.4 Prints "not safe" when a file is unsafe to trust
-d27.9 Shows uid/gid changes when reading :include: files
-d35 Traces macros
-d35.9 shows macro values as they are defined
-d35.14 Shows macro names being converted to integer id’s
-d35.24 Shows macro expansion
-d37 Traces options and class macros
-d37.1 Traces the setting of options
-d37.8 Traces the adding of words to a class
-d41 Traces the queue
-d41.1 Traces queue ordering
-d41.2 Shows failure to open qf files
-d41.49 Shows skipped queue files
-d41.50 Show every file in queue
-F - Set senders full name

-f
- Set senders address

-h - Set minimum hop count

-i Set IgnoreDots option to true

-M - Set macro

-N - Set return DNS notify information

never Never return the info
success Return on successful delivery
failure Return on failure
delay Return on delayed delivery
-n Supresses aliasing

-O - Set an option (long name)

-o Set an option (short name)

-pUUCP:test Sets protocol in $r macro to UUCP and $s macro to test

-q30m Sets queue processing to every 30 min

-qR@here.com Processes the queue once delivering only mail to @here.com

-R hdrs bounces only the headers

-R full Bounces headers and body

-s Sets SaveFromLine option to true

-T 5d Sets Timeout.queuereturn option to 5 days

-t Gathers a list of recipients from messages headers

-U make this the initial MUA to MTA submission

-V test123456 Sets the DSN ENVID string to test123456

-v Runs sendmail in verbose mode

-X /var/tmp/trace.mail Logs both sides of smtp transactions to trace.mail file.



Rule Testing Mode (/usr/lib/sendmail bt)

? Prints help

.DrUUCP Defines macro r as UUCP

=S5 Prints the contents of ruleset 5

=M Displays list of delivery agents

${name} Prints the value of macro name.

$=w prints the contents of the class macro w

/mx here.com Returns the MX records for here.com in the order they will be utilized

/parse foo Parses the value of the address foo, returns the value of crackaddr(), and the final parsed address including the delivery agent.

/try local foo Rewrites the address foo based on the rules for local delivery

/tryflags HS Sets the flags used by /parse and /try to H for header and S for sender, can also use E for envelope and R for recipient

/canon foo - Transforms the hostname foo into its canonical form

/map aliases foo Looks up foo in the aliases database

3,0 me@foo Runs the address me@foo through rulesets 3 and 0