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

John Brook jbrook at gmail.com
Sun May 23 13:37:37 PDT 2004


Sorry to follow up my own email...

 I finally worked out a way to do this. I'm using the following line:

$conf['spam']['email'] = 'spam-'.$_SESSION['imp']['uniquser'];

which seems to work, and not mess up the appearance of IMP web pages
at the same time. Result!

            John




On Sun, 23 May 2004 20:40:36 +0100, John Brook <jbrook at gmail.com> wrote:
> 
> Hmmmm. It appears I spoke too soon!
> 
> When I include this line
> 
> $conf['spam']['email'] = 'spam-'.Auth::getAuth().'@myserver.com';
> 
> in my horde2/imp/config/conf.php file then it causes all IMP pages to
> lose any theme info that they might have had, ie. the button graphics
> appear, but none of the background images or colours - text appears
> only in black on a white background.
> 
> Can anyone help?
> 
> Many thanks!
> 
>          John
> 
> 
> 
> 
> On Sun, 23 May 2004 19:05:23 +0100, John Brook <jbrook at gmail.com> wrote:
> >
> > Peter,
> >
> >  Thank you for this pointer! It was very helpful.
> >
> >  Unfortunately the line that you suggested did not work
> > Auth::getBareAuth() caused some kind of error. However Auth::getAuth()
> > works just fine - and incidentally only returns the username section
> > of the ID, not the domain as well. I'll stick with that!
> >
> >          John
> >
> >
> >
> > On Sun, 23 May 2004 16:11:40 +0200, Peter Arien
> > <peter.arien at cc.kuleuven.ac.be> wrote:
> > >
> > > 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