how email client work?

  • akaash
  • Beginner
  • Beginner
  • akaash
  • Posts: 62
  • Loc: Gujurat,India

Post 3+ Months Ago

Does anybody has idea how the email clients written in perl send the mail,using which packages,how they parse,etc...

my mail server is redhat linux 9.0
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

Perl scripts usually redirect output to sendmail or communicate directly with a SMTP server using standard modules found on CSPAN.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Yup, like rjm says, mostly sendmail, or direct SMTP connection...

If you want to know more about the SMTP Protocol, have a look at RFC821 (I know there is a newer revision of the SMTP protocol out there in the RFC's somewhere, but I'm not sure of the exact number off-hand).
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

I was reading the mail RFCs the other day and found comments made in 1974 raising concern about the inability of destination mail system to control sender messages. Spam! Thirty years ago and still nothing done! :-(
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

lol
  • akaash
  • Beginner
  • Beginner
  • akaash
  • Posts: 62
  • Loc: Gujurat,India

Post 3+ Months Ago

Here the mails are stored in Mbox format for each user on

the mail server. Now how can i transfer those mails to

another backup server. i.e. each user should be able to

transfer only his mails.Do i have to parse each mbox mail

and then transfer or is there any package available for

doing that.
Do i have to user 'c socket programming' for this?

One thing more, the mails should get stored on the backup linux server in the users' respective acc. mbox .
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

Code: [ Select ]
NAME
     mbox - file containing mail messages

   INTRODUCTION
     The most common format for storage of mail messages is mbox
     format. An mbox is a single file containing zero or more
     mail messages.

   MESSAGE FORMAT
     A message encoded in mbox format begins with a From_ line,
     continues with a series of non-From_ lines, and ends with a
     blank line. A From_ line means any line that begins with
     the characters F, r, o, m, space:

        From god@heaven.af.mil Sat Jan 3 01:05:34 1996
        Return-Path: <god@heaven.af.mil>
        Delivered-To: djb@silverton.berkeley.edu
        Date: 3 Jan 1996 01:05:34 -0000
        From: God <god@heaven.af.mil>
        To: djb@silverton.berkeley.edu (D. J. Bernstein)

        How's that mail system project coming along?


     The final line is a completely blank line (no spaces or
     tabs). Notice that blank lines may also appear elsewhere in
     the message.

     The From_ line always looks like From envsender date
     moreinfo. envsender is one word, without spaces or tabs; it
     is usually the envelope sender of the message. date is the
     delivery date of the message. It always contains exactly 24
     characters in asctime format. moreinfo is optional; it may
     contain arbitrary information.

     Between the From_ line and the blank line is a message in
     RFC 822 format, as described in qmail-header(5), subject to
     >From quoting as described below.
  1. NAME
  2.      mbox - file containing mail messages
  3.    INTRODUCTION
  4.      The most common format for storage of mail messages is mbox
  5.      format. An mbox is a single file containing zero or more
  6.      mail messages.
  7.    MESSAGE FORMAT
  8.      A message encoded in mbox format begins with a From_ line,
  9.      continues with a series of non-From_ lines, and ends with a
  10.      blank line. A From_ line means any line that begins with
  11.      the characters F, r, o, m, space:
  12.         From god@heaven.af.mil Sat Jan 3 01:05:34 1996
  13.         Return-Path: <god@heaven.af.mil>
  14.         Delivered-To: djb@silverton.berkeley.edu
  15.         Date: 3 Jan 1996 01:05:34 -0000
  16.         From: God <god@heaven.af.mil>
  17.         To: djb@silverton.berkeley.edu (D. J. Bernstein)
  18.         How's that mail system project coming along?
  19.      The final line is a completely blank line (no spaces or
  20.      tabs). Notice that blank lines may also appear elsewhere in
  21.      the message.
  22.      The From_ line always looks like From envsender date
  23.      moreinfo. envsender is one word, without spaces or tabs; it
  24.      is usually the envelope sender of the message. date is the
  25.      delivery date of the message. It always contains exactly 24
  26.      characters in asctime format. moreinfo is optional; it may
  27.      contain arbitrary information.
  28.      Between the From_ line and the blank line is a message in
  29.      RFC 822 format, as described in qmail-header(5), subject to
  30.      >From quoting as described below.


That information shows you how you may parse an mbox file for individual messages. Now, you mentioned you wanted to transfer messages to a backup server. If so, then you only need the entire mbox file; not the individual messages.

Should you users be left with the responsibility of archiving mail? It may be better to use a schedule task (man cron) to copy these files. A little shell script (man sh) should do the trick.
  • akaash
  • Beginner
  • Beginner
  • akaash
  • Posts: 62
  • Loc: Gujurat,India

Post 3+ Months Ago

Each user should be able to archive the mails by himself. and the archiving should be such that he should be able to archive selected messages only and not the whole mbox file.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 134 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.