Perl access to email forwarding

Discussion in 'Perl Misc' started by sverne, Mar 16, 2006.

  1. sverne

    sverne Guest

    I can use a control panel provided by most web hosting companies to
    create email forwarding addresses on my account.

    But, I want to accomplish the same thing using a Perl script.

    Most sites run sendmail and they do not allow access to the
    'virtusertable' since it keeps all the forwards for the whole server.

    So, does anyone know of:

    1. What email server software I should look for in a web hosting
    company that would allow this?

    2. A Perl program that can read emails from a catch-all POP3 mailbox
    and read the TO: address and then determine where to forward the
    email/attachment.

    3. Other ways to accomplish this without a dedicated server?

    Thanks in advance
    sverne, Mar 16, 2006
    #1
    1. Advertising

  2. sverne

    l v Guest

    sverne wrote:
    > I can use a control panel provided by most web hosting companies to
    > create email forwarding addresses on my account.
    >
    > But, I want to accomplish the same thing using a Perl script.
    >
    > Most sites run sendmail and they do not allow access to the
    > 'virtusertable' since it keeps all the forwards for the whole server.
    >
    > So, does anyone know of:
    >
    > 1. What email server software I should look for in a web hosting
    > company that would allow this?


    Procmail. Use recipes in .procmailrc

    >
    > 2. A Perl program that can read emails from a catch-all POP3 mailbox
    > and read the TO: address and then determine where to forward the
    > email/attachment.


    use your .forward file on the catch-all POP3 server to launch a Perl
    program
    see Mail::pOP3Client and Mail::Sender

    >
    > 3. Other ways to accomplish this without a dedicated server?
    >
    > Thanks in advance
    >
    l v, Mar 17, 2006
    #2
    1. Advertising

  3. sverne

    Guest

    sverne <> wrote:
    > I can use a control panel provided by most web hosting companies to
    > create email forwarding addresses on my account.


    > But, I want to accomplish the same thing using a Perl script.


    > Most sites run sendmail and they do not allow access to the
    > 'virtusertable' since it keeps all the forwards for the whole server.


    > So, does anyone know of:


    [snip non Perl related question]

    > 2. A Perl program that can read emails from a catch-all POP3 mailbox
    > and read the TO: address and then determine where to forward the
    > email/attachment.


    Plenty of POP3 modules on CPAN.

    > 3. Other ways to accomplish this without a dedicated server?


    Also plenty of SMTP modules on CPAN.

    But... and a big important but, you *cannot* rely on using
    the To: address header for your purposes.

    I know it might seem obvious that if you have a catch-all account
    on a POP3 server, that it should be possible to use the To: field
    to distinguish between mail sent to and .

    However the To: field may not show this information - the
    recipient might have been included in a Cc: or Bcc: or
    as an alias expanded from a mailing list.

    The SMTP protocol does not involve mail headers when mail
    transactions occur.

    Axel
    , Mar 17, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonathan N. Little

    Re: Web form forwarding to email?

    Jonathan N. Little, Jun 7, 2009, in forum: HTML
    Replies:
    1
    Views:
    348
    Adrienne Boswell
    Jun 7, 2009
  2. Andrew Tomazos
    Replies:
    5
    Views:
    548
  3. Max
    Replies:
    12
    Views:
    317
    Jacqui Caren
    Jul 15, 2003
  4. Debashish Mishra

    Port forwarding utility in perl

    Debashish Mishra, Jun 16, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    100
    Joe Smith
    Jun 20, 2004
  5. Lisa
    Replies:
    11
    Views:
    200
    Gunnar Hjalmarsson
    Dec 21, 2004
Loading...

Share This Page