[imp] Accessing a pop3 server which the username isn't the same as the user e-mail

Rangel Reale rreale@ebrax.com.br
Wed, 3 Apr 2002 11:16:56 -0300


Well, I think I have done it, at least it seems to be working, is this
right?

------------- imp/config/conf.php -------------
$conf['hooks']['from'] = 'imp_getuseremail';

if (!function_exists('imp_getuseremail')) {
        function imp_getuseremail($imp) {
                $upart=explode('-', $imp['user']);
                if (count($upart) == 2) {
                        return $upart[1];
                } else {
                        return $imp['user'];
                }
        }
}
----------------------------------------------

I removed the domain that was before the '-', and only sent the user name to
the function. Is this the right way do it?

[]s
Rangel Reale

----- Original Message -----
From: "Rangel Reale" <rreale@ebrax.com.br>
To: <imp@lists.horde.org>
Sent: Tuesday, April 02, 2002 5:34 PM
Subject: [imp] Accessing a pop3 server which the username isn't the same as
the user e-mail


> Hello!
>
> I am having this problem configuring imp for my domains.
>
> I am using qmail/qpopper as my e-mail server, apache 1.3.23, php 4.0.6 w/
> pear 4.1.0, IMP 3.0.
>
> My site uses virtual domains, and each domain have their e-mails like
> user@domain1.com, otheruser@domain2.com, and so on.
>
> When the pop3 user connects to the site, its login name is "domain-user",
so
> I can have users with the same name on different domains. But the user
> e-mail is user@domain1.com, not domain1-user@domain.com. The
"domain1-user"
> is only his login name.
>
> That is my problem, when user@domain1.com sends an e-mail using imp, it's
> "from" field comes with domain1-user@domain.com instead of his real
e-mail.
> What can I do to make this work, is there a way in IMP?
>
> []s
> Rangel Reale
>
>
>
> --
> IMP mailing list: http://horde.org/imp/
> Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>
>