[imp] hook for virtual user's from address

Markus F. Kraemer markus.kraemer at rz.uni-mannheim.de
Tue Aug 2 23:57:02 PDT 2005



Dale Gallagher wrote:
> Hi there
> 
> I found Daniel Frazier's post which appears to offer a solution to my 
> requirement, but for some reason I cannot get it to work. Pointers would 
> be appreciated - thanks.
> 
> Here's Daniel's post:
> 
> http://archives.free.net.ph/message/20050701.130643.b1042d9b.en.html
> 
> Requirement Summary:
> 
> My users login using their imap/pop3 logins, which are of the form 
> vuser%vhost. I would like the sending From/Return-Path address and 
> "Identity", as it appears on the message compose screen to be vuser at vhost.
> 
> What I've tried:
> 
> In horde/config/hooks.php:
> 
> if (!function_exists('_prefs_hook_from_addr')) {
>    function _prefs_hook_from_addr($user = null) {
>      if (is_null($user)) {
>        $user = Auth::getAuth();
>      }
>      return str_replace('%', '@', $user);
>    }
> }
> 
> In horde/config/prefs.php:
> 
> $_prefs['from_addr'] = array(
>    'value' => '',
>    'locked' => true,
>    'shared' => true,
>    'type' => 'text',
>    'hook' => true,
>    'desc' =>  _("Your From: address:")
> );
> 
> In horde/config/conf.php:
> 
> $conf['hooks']['from_addr'] = true;
> 
> System Summary:
> 
> Linux 2.6.9
> Apache 2.0.54 (compiled with --with-mpm=prefork)
> PostgreSQL 8.0.0
> PHP 5.0.4 configured as follows
> 
> ./configure \
>    --prefix=/usr \
>    --with-imap=../imap-2002e \
>    --with-apxs2=/usr/local/apache2/bin/apxs \
>    --with-config-file-path=/etc \
>    --with-gettext \
>    --with-xml \
>    --with-dom \
>    --with-gd \
>    --with-png-dir \
>    --with-zlib-dir=/usr/lib \
>    --with-jpeg-dir \
>    --with-mime-magic \
>    --with-iconv \
>    --enable-mbstring \
>    --with-mbstring=all \
>    --with-mcrypt \
>    --with-pgsql
> 
> cheers
> Dale

-- 

Mit freundlichen Gruessen

Markus Kraemer

Rechenzentrum Universität Mannheim
L15, 16
68161 Mannheim
eMail: markus.kraemer at rz.uni-mannheim.de
Phone: +49 (0) 621-181-3223
Fax: +49 (0) 621-181-3198
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2817 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.horde.org/archives/imp/attachments/20050802/327f512f/smime.bin


More information about the imp mailing list