[imp] Re: Using $imp['user'] to define a Spam reporting address

Peter Arien peter.arien at cc.kuleuven.ac.be
Sun May 23 07:11:40 PDT 2004


John

John Brook wrote:
> Problem:
>  I think that this line:
> $conf['spam']['email'] = 'spam-' . $imp['user'] . '@myserver.com';
> 
> should do the job just fine. But it doesn't  8-(  Mail gets sent to
> spam- at myserver.com, which causes Exim to spew an error!

I use the Auth-class for this. From the docs (on http://dev.horde.org/):

Method getBareAuth (line 509)

mixed getBareAuth( )

Return the curently logged-in user without any domain information (e.g., 
bob at example.com would be returned as 'bob').

Info
return - The user ID of the current user, or false if no user is logged in.
access - public

Your spam-report-address would become somthing like
$conf['spam']['email'] = 'spam-'.Auth::getBareAuth().'@myserver.com';

Greetings

Peter Arien



More information about the imp mailing list