Author Topic: from address in email  (Read 2110 times)

Offline babu

  • Newbie
  • *
  • Posts: 5
from address in email
« on: April 13, 2009, 02:54:35 AM »
Dear All,

Excuse me if its answered somewhere but I dont seem to find answer for this.
In my configuration I have properly configured the variable $rcmail_config['mail_domain'] = 'example.com';

But still the form address includes hostname, e.g  mail.example.com

Any hints or suggestions are welcome.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
from address in email
« Reply #1 on: April 13, 2009, 03:16:52 AM »
I have never used this configuration option. But the comment says it should be an array ...


// This domain will be used to form e-mail addresses of new users
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['mail_domain'] = '';


So I guess you have to define something like ...

$rcmail_config
['mail_domain'] = array("localhost" => "mydomain.com");
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline babu

  • Newbie
  • *
  • Posts: 5
from address in email
« Reply #2 on: April 13, 2009, 03:55:26 AM »
Thanks for reply. I tried using both options but the result is as before.
What I want to do is that I want the mail to be appearing from user@domain.com, but it is appearing as user@host.domain.com.

I first thought that it could be a thing with the SMTP server (postfix in question) but upon sending mail from mailx or telnet the address appears fine.

:-(

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,260
from address in email
« Reply #3 on: April 13, 2009, 03:57:49 AM »
the array is only needed when you are using mutiple hosts, otherwise just a  string works fine. just to check you are trying with new users after you change this setting right? it will not have any effect on users which already exist in RC.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline babu

  • Newbie
  • *
  • Posts: 5
from address in email
« Reply #4 on: April 13, 2009, 04:07:24 AM »
So its not used for modifying the from address as I thought. My mistake.
I have left it undefined now ( only '').
I am not using virtual domains etc and the users are created already.

But I would like to know that what setting than determines that part (user@domain.com) if any.


Thanks.

Offline babu

  • Newbie
  • *
  • Posts: 5
from address in email
« Reply #5 on: April 13, 2009, 04:42:57 AM »
It seems to be getting this from:
$rcmail_config['default_host']

If i set it to
$rcmail_config['default_host'] = 'localhost';
the mail comes as user@localhost.

Previously it was set as
$rcmail_config['default_host'] = 'myhostname.mydomain.com';

But I can't set it as
$rcmail_config['default_host'] = 'mydomain'; because IMAP connection would than fail. In fact I have done that stupid thing.

:-(

Offline babu

  • Newbie
  • *
  • Posts: 5
from address in email
« Reply #6 on: April 13, 2009, 04:53:34 AM »
Ok, I have managed to solve it by adding
masquerade_domains = host.domain.com domain.com
in postfix.

Don't know whether its right or wrong. Will study later.

Thanks for taking trouble to read my posts.:)