Author Topic: Usernames and return addresses  (Read 4347 times)

Offline sottwell

  • Newbie
  • *
  • Posts: 2
Usernames and return addresses
« on: February 02, 2007, 01:23:24 PM »
I am on a server that "mangles" the username, making it "hostname-username".

This means that instead of new mail's return address being "username@hostname.com" it becomes "hostname-username@hostname.com".

The actual email address for the user is "username@domain.com"; it's only the login username that is mangled.

I've been trying to figure out the configuration options as I suspect there may be some way of mapping the actual email address to the return address, instead of using the login username.

I can hack the code to remove the prefix, but I'd prefer to use a configuration setting if there is one that will solve this problem.


Offline sottwell

  • Newbie
  • *
  • Posts: 2
Re: Usernames and return addresses
« Reply #1 on: February 03, 2007, 12:30:27 AM »
Ok, if anybody else has this issue, perhaps this will help them.

In program/include/main.inc, after the comment at line 588, add these two lines:
Code: [Select]
 $user_name = substr($user_name, strpos($user_name, "-")+1);
  $user_email = substr($user_email, strpos($user_email, "-")+1);
This will work, as long as the "prefix" added by your system does not have a hyphen in the prefix. My system uses the domain's account name, and it does not allow a prefix in the account name, so it's fine for my situation.