from adress problem

imp@sioc.org imp@sioc.org
Wed, 13 Feb 2002 13:56:21 +0000


Hello,

hosting multi-domain I wanted that the mail got the @domain corresponding to 
the mail.domain.net relative to their name, for example mail.nsvf.net

for that a friend give me an add-on to servers.php to have a dynamic @domain :

there is the code :

$mydomain_array=explode(".",$SERVER_NAME); 
for ($i=0;$i<count($mydomain_array)-2;$i++) array_shift($mydomain_array); 
$mydomain=implode(".",$mydomain_array); 

$servers['_prompt'] = array( 
    'name' => 'Choose a mail server:' 
); 


there is my configure end part.


$servers['imap'] = array(
    'name' => $mydomain,
    'server' => 'sioc.org',
    'protocol' => 'imap',
    'port' => 143,
    'folders' => 'INBOX/',
    'namespace' => '',
    'maildomain' => $mydomain,
    'smtphost' => 'sioc.org',
    'realm' => $mydomain,
    'preferred' => ''
);


end whatever I did all messages come from @sioc.org

Then i try to put a die(""); into the servers.php to see if the file 
servers.php is really used, and it's look like the servers.php is not use in 
the mail sending process because the mail sending still works with the from 
adress of the other domain (@sioc.org).

Please help me.