<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WEB-NES-BAY &#187; Mail</title>
	<atom:link href="http://webnesbay.com/tag/mail/feed/" rel="self" type="application/rss+xml" />
	<link>http://webnesbay.com</link>
	<description>Learn Tips and tricks on Linux, Hacking, linux, PHP, Perl, Web, Hardware</description>
	<lastBuildDate>Sun, 11 Apr 2010 05:12:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hacking Trick: Send E-Mails as Anonymous</title>
		<link>http://webnesbay.com/hacking-trick-send-e-mails-as-anonymous/</link>
		<comments>http://webnesbay.com/hacking-trick-send-e-mails-as-anonymous/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 16:52:01 +0000</pubDate>
		<dc:creator>WEBNESBAY</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Accurate Record]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[Anonymous Email]]></category>
		<category><![CDATA[Anonymous Note]]></category>
		<category><![CDATA[Email Addresses]]></category>
		<category><![CDATA[Free Smtp Servers]]></category>
		<category><![CDATA[hack email]]></category>
		<category><![CDATA[hacking trick]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Pcsc]]></category>
		<category><![CDATA[Send An Email]]></category>
		<category><![CDATA[Send Email]]></category>
		<category><![CDATA[Server Telnet]]></category>
		<category><![CDATA[Smtp Server]]></category>
		<category><![CDATA[Software Application]]></category>
		<category><![CDATA[Type Telnet]]></category>
		<category><![CDATA[Uic]]></category>

		<guid isPermaLink="false">http://webnesbay.com/?p=592</guid>
		<description><![CDATA[It is necessary to send an email anonymously sometimes.  My definition of anonymous includes the email addresses appearing as if they have been sent from whatever address you specify as well as no accurate record of your IP in the headers of the mail that could be traced back to you.  The method that follows supports my definition of anonymous.   All you need to accomplish this is telnet and a SMTP server.
Telnet is a software application that connects one [...]


Related posts:<ol><li><a href='http://webnesbay.com/send-and-receive-hotmail-through-evolution-in-ubuntu/' rel='bookmark' title='Permanent Link: Send and Receive Hotmail through Evolution in ubuntu'>Send and Receive Hotmail through Evolution in ubuntu</a></li>
<li><a href='http://webnesbay.com/yahoo-hacking-programs-are-they-needed/' rel='bookmark' title='Permanent Link: Yahoo Hacking Programs &#8211; Are They Needed?'>Yahoo Hacking Programs &#8211; Are They Needed?</a></li>
<li><a href='http://webnesbay.com/how-to-setup-a-dns-server-with-bind-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: How to setup a DNS server with bind in Ubuntu linux'>How to setup a DNS server with bind in Ubuntu linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span><span>It is necessary to send an email anonymously sometimes.  My definition of anonymous includes the email addresses appearing as if they have been sent from whatever address you specify as well as no accurate record of your IP in the headers of the mail that could be traced back to you.  The method that follows supports my definition of anonymous.   All you need to accomplish this is telnet and a SMTP server.</span></span></p>
<p>Telnet is a software application that connects one machine to another, allowing you to log on to that other machine as a user.  If you don&#8217;t have telnet, you can easily download it for free from the web</p>
<p>Free SMTP servers links below.</p>
<p><a style="color: #006699;" href="http://www.gr0w.com/help/email_help_smtp_servers.htm" target="_blank">http://www.gr0w.com/help/email_help_smtp_servers.htm</a><br />
<a style="color: #006699;" href="http://www.uic.edu/depts/accc/ecomm/smtpmove/isps.html" target="_blank">http://www.uic.edu/depts/accc/ecomm/smtpmove/isps.html</a><br />
<a style="color: #006699;" href="http://www.thebestfree.net/free/freesmtp.htm" target="_blank">http://www.thebestfree.net/free/freesmtp.htm</a><br />
<a style="color: #006699;" href="http://www.registerdirect.co.nz/help/smtp_servers.html" target="_blank">http://www.registerdirect.co.nz/help/smtp_servers.html</a><br />
<a style="color: #006699;" href="http://www.bu.edu/pcsc/email/remote/smtplist.html" target="_blank">http://www.bu.edu/pcsc/email/remote/smtplist.html</a></p>
<p>Once you&#8217;ve selected a server, open the command prompt, and type:   telnet xxxxxx.com 25</p>
<p>(Obviously replace the x&#8217;s with the SMTP server you&#8217;ve selected) now type the following:</p>
<p>HELO targetsmailserver.com<br />
MAIL FROM: <a style="color: #006699;" href="mailto:whoever@whatever.com">whoever@whatever.com</a><br />
RCPT TO: <a style="color: #006699;" href="mailto:target@address.com">target@address.com</a><br />
DATA<br />
from: <a style="color: #006699;" href="mailto:whoever@whatever.com">whoever@whatever.com</a><br />
to: <a href="mailto:target@address.com">target@address.com</a><br />
subject: whatever<br />
received: xxx.xxx.xxx.xxx<br />
x-header: xxx.xxx.xxx.xxx<br />
The body of the message goes here<br />
.</p>
<p>*Note 1: Remember to end with &#8220;.&#8221; on a line by itself as directed.<br />
*Note 2: Adding x-header and received allows you to alter the IP information found in the headers of the mail, making it untracable and totally anonymous**<br />
*Note 3: There are ISPs that have port 25 (SMTP) blocked. Be sure your settings and ISP allow connections to port 25. If all else fails, get the SMTP sever address from your ISP</p>


<p>Related posts:<ol><li><a href='http://webnesbay.com/send-and-receive-hotmail-through-evolution-in-ubuntu/' rel='bookmark' title='Permanent Link: Send and Receive Hotmail through Evolution in ubuntu'>Send and Receive Hotmail through Evolution in ubuntu</a></li>
<li><a href='http://webnesbay.com/yahoo-hacking-programs-are-they-needed/' rel='bookmark' title='Permanent Link: Yahoo Hacking Programs &#8211; Are They Needed?'>Yahoo Hacking Programs &#8211; Are They Needed?</a></li>
<li><a href='http://webnesbay.com/how-to-setup-a-dns-server-with-bind-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: How to setup a DNS server with bind in Ubuntu linux'>How to setup a DNS server with bind in Ubuntu linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://webnesbay.com/hacking-trick-send-e-mails-as-anonymous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run IMAP with PERL</title>
		<link>http://webnesbay.com/run-imap-with-perl/</link>
		<comments>http://webnesbay.com/run-imap-with-perl/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 05:30:01 +0000</pubDate>
		<dc:creator>WEBNESBAY</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Imap]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[run]]></category>

		<guid isPermaLink="false">http://webnesbay.com/?p=301</guid>
		<description><![CDATA[IMAP is handling mail in many cases. For example, POP3&#8217;s single mailbox model can lead to thousands of large messages in a single location, making access and control of the mailbox tough. IMAP, however, is designed specifically for leaving the messages on the server, classified in various mailboxes. Also, IMAP can check for new mail over an existing IMAP connection, while POP3 has to open a new connection every time when it contacts server.
Let&#8217;s run IMAP using PERL. I use [...]


Related posts:<ol><li><a href='http://webnesbay.com/send-sms-using-perl/' rel='bookmark' title='Permanent Link: Send sms using perl'>Send sms using perl</a></li>
<li><a href='http://webnesbay.com/send-and-receive-hotmail-through-evolution-in-ubuntu/' rel='bookmark' title='Permanent Link: Send and Receive Hotmail through Evolution in ubuntu'>Send and Receive Hotmail through Evolution in ubuntu</a></li>
<li><a href='http://webnesbay.com/send-email-with-attachments-in-perl/' rel='bookmark' title='Permanent Link: send email with attachments in perl'>send email with attachments in perl</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>IMAP is handling mail in many cases. For example, POP3&#8217;s single mailbox model can lead to thousands of large messages in a single location, making access and control of the mailbox tough. IMAP, however, is designed specifically for leaving the messages on the server, classified in various mailboxes. Also, IMAP can check for new mail over an existing IMAP connection, while POP3 has to open a new connection every time when it contacts server.</p>
<p>Let&#8217;s run IMAP using PERL. I use <code>ifrom</code> for listing, printing, and moving messages on an IMAP server. I also run it nightly for backing up my IMAP mail</p>
<h2><a name="1"><span><strong>Listing Inbox Mails</strong></span></a></h2>
<p>Invocation of <code>ifrom</code> is just so, without any options. It will access your INBOX mailbox on the IMAP server and list your mails in a numbered list. The <code>-host</code> option tells <code>ifrom</code> which IMAP server to contact.</p>
<p>Note that <code>ifrom</code> uses the <code>AppConfig</code> module, which provides for default values, among other nice features.</p>
<p>Authentication in <code>ifrom</code> is done with plain LOGIN</p>
<p>The authinfo file is used by other programs, and the format is variable depending on what those programs need; <code>ifrom</code> parses it looking for the machine, login, password, and port keywords. If any of those keywords are not specified, the defaults are used. The authinfo file overrides the <code>-user</code> and <code>-password</code> command-line switches. Make sure your authinfo file is only readable by you!</p>
<p>The machine name is your IMAP server&#8217;s name. The machine name in the authinfo file has to match exactly the name given to <code>ifrom</code> with the <code>-host</code> switch.</p>
<p>When <code>ifrom</code> connects to the server, it sets the <code>Peek</code> variable to 1, so that messages we examine are not marked read.</p>
<p>Next, <code>ifrom</code> opens the mailbox specified by the <code>-mailbox</code> switch. This is INBOX by default: the standard IMAP main mailbox.</p>
<p>After all this trouble, <code>ifrom</code> prints out messages using this format:</p>
<p>Follow the link to the Authmechanism capability of the <code>Mail::IMAPClient</code> package in Resources. You can use CRAM-MD5 authentication with the <code>-crammd5</code> switch; no other mechanisms are supported by <code>Mail::IMAPClient</code>, so I did not bother to set up a generic <code>-authentication</code> switch. Note that you can implement your own authentication; see the <code>Mail::IMAPClient</code> documentation.</p>
<pre>if ($config-&gt;CRAMMD5())
{
 my $authmech = "CRAM-MD5";
 if ($imap-&gt;has_capability($authmech))
 {
  print "Switching to $authmech authentication\n";
  $imap-&gt;Authmechanism($authmech);
 }
}

You can specify your name and password from the command line with the <code>-user</code> and <code>-password</code> switches, or through an authinfo (AKA netrc) file. The authinfo file stores a list of authentication options, such as:
</pre>
<pre>maachine imap.yourserver.here login webnesbay password test1234
machine imap.yourserver.there password test1234 port 244</pre>
<p><strong>Print a message header</strong></p>
<pre>printf "%5d %-35.35s %s\n", $count, $address,
   ((defined $data-&gt;{Subject}-&gt;[0]) ? $data-&gt;{Subject}-&gt;[0] : '');</pre>
<pre>
</pre>
<pre>
The sender's address in <code>$address</code> is extracted from the full user name whenever possible, using a simple regular expression match.

If you give <code>ifrom</code> the <code>-dump</code> switch, it will also print the message's contents after the header. This is very useful if you don't have time to launch your e-mail application to see the contents of a last-minute message. It's okay to interrupt <code>ifrom</code> while it's printing a large message; the message will not be deleted or otherwise affected, since we opened the server with the <code>Peek</code> option set to 1.

Note that the <code>-dump</code> switch uses the <code>body_string()</code> function, whereas the <code>-backup</code> option we'll see later uses the <code>message_string()</code> function.
<h3><strong>Moving Mails</strong></h3>

Occasionally, you want to move messages from one mailbox to another. If there are many messages and your mail client loses the connection to the IMAP server while moving them (as happens often over a slow network link), this capability is for you. Just use the <code>-mailbox</code> and <code>-to</code> options. It's that simple. Run <code>ifrom</code> like this:
</pre>
<pre>ifrom -mailbox newmail -to archive

<a name="code5"><strong>How the messages get moved by Perl
</strong>
<pre>foreach my $message (@msg_list)
 {
  $count++;
  if ($config-&gt;TO)
  {
   die "Could not move message $message: $!" unless $imap-&gt;move($config-&gt;TO, $message);
   print "Moved message $message to " . $config-&gt;TO, "\n";
   $imap-&gt;expunge() if $config-&gt;EXPUNGE_OFTEN;
   last if $count &gt;= $config-&gt;N;
  }
 }

 if ($config-&gt;TO)
 {
  $imap-&gt;expunge();
 }
Moving messages in IMAP does not respect the <code>Peek</code> setting. Even if it is set to 1, <code>Peek</code> is only relevant to looking at messages. Moving the messages will always delete their originals after the copies have been made in the destination mailbox, as implemented by <code>Mail::IMAPClient</code>.
<h3><a name="3"><span>Expunging and deleting mailboxes</span></a></h3>
<h3><a name="3"><span> </span></a></h3>

The <code>-expunge_often</code> flag is for moving messages when you are on an unreliable link and could get disconnected any time. It ensures that after every message is moved, <code>expunge()</code> will be called (otherwise, the message will remain in the mailbox). It is better, however, to use plain <code>expunge()</code> after all the messages are moved, in combination with the <code>-n</code> flag. That way, <code>expunge()</code> will be called after every 10, 15, or however many messages you specify, are moved.
I also gave <code>ifrom</code> the <code>-delete_mailbox_really</code> option. When given that option, <code>ifrom</code> will delete whatever mailbox is named by the <code>-mailbox</code> switch, so don't use it on the default INBOX mailbox! The Perl code involved couldn't be simpler
When moving messages above, you must have noticed the mysterious <code>expunge()</code> function. It simply tells the IMAP server to flush the mailbox, removing all messages marked as deleted. Normally, when listing messages, we don't mark them as deleted because we have <code>Peek</code> set to 1. The <code>move()</code> function, however, will mark them as deleted as mentioned above. In order to really delete those messages, the <code>expunge()</code> function must be called.

<a name="code6"><strong>Deleting a mailbox</strong></a>
</pre>
<pre>if ($config-&gt;DELETE_MAILBOX_REALLY)
{
 $imap-&gt;delete($config-&gt;MAILBOX)
  or warn "Could not delete mailbox " . $config-&gt;MAILBOX . "\n";
}</pre>
<p></a></pre>
<h3><strong><a name="4"><span>Backing up IMAP mail</span></a></strong></h3>
<p>To back up your mail using <code>ifrom</code>, just give it the <code>-backup</code> flag. The <code>-savedir</code> switch is also important &#8212; set it to wherever you want the saved messages to go. Everything else &#8212; authentication, host, port, and so on &#8212; works just like the regular <code>ifrom</code>. The <code>-mailbox</code> parameter doesn&#8217;t work, because <code>ifrom</code> backs up all the mailboxes. I could have had a special <code>-backup_mailbox</code> flag to override &#8220;all mailboxes,&#8221; but frankly I never needed it.</p>
<h3>Back up your mails</h3>
<pre>
</pre>
<pre>
</pre>
<pre><a name="code5">
<pre>
</pre>
<pre> foreach my $message (@msg_list)
  {
   my $filename = "$dir/$f/$message";
   next if -e $filename;
   print "saving message $f/$message to $filename\n" if $config-&gt;VERBOSE;
   my $data_fh = new IO::File $filename, "w";
   my $data = $imap-&gt;message_string($message);
   warn "Empty message data for $f/$message" unless defined $data &amp;&amp; length $data;
   $data_fh-&gt;print($data);
  }

The <code>body_string()</code> function used by the <code>-dump</code> switch earlier skips the messages headers, which are usually not interesting when you're looking at e-mail quickly.
I have already used the <code>ifrom</code> backups several times, when I've lost important mail by accident. It's a load off my mind to know that even if the ISP that runs my IMAP server should lose my mailboxes (it's happened to me before), I will lose at most one day's worth of mail.

Reference: IBM.com</pre>
<p></a></pre>


<p>Related posts:<ol><li><a href='http://webnesbay.com/send-sms-using-perl/' rel='bookmark' title='Permanent Link: Send sms using perl'>Send sms using perl</a></li>
<li><a href='http://webnesbay.com/send-and-receive-hotmail-through-evolution-in-ubuntu/' rel='bookmark' title='Permanent Link: Send and Receive Hotmail through Evolution in ubuntu'>Send and Receive Hotmail through Evolution in ubuntu</a></li>
<li><a href='http://webnesbay.com/send-email-with-attachments-in-perl/' rel='bookmark' title='Permanent Link: send email with attachments in perl'>send email with attachments in perl</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://webnesbay.com/run-imap-with-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
