Perl access to email forwarding

S

sverne

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
 
L

l v

sverne said:
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
 
A

axel

sverne said:
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 (e-mail address removed) and (e-mail address removed).

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top