Author Topic: Change Sender Domain when sending SMTP?  (Read 542 times)

Offline dwoolridge

  • Newbie
  • *
  • Posts: 2
Change Sender Domain when sending SMTP?
« on: January 27, 2022, 06:14:00 PM »
Hello,

I recently changed my home e-mail server PC from Windows to Linux.  Please bear with me, I know enough to be dangerous, but don't know all I should about e-mail setup & configuration.  I think I've backed myself into a corner with my e-mail setup...

I'm able to send e-mails using Mozilla Thunderbird, but I can't figure out how to get Roundcube 1.5.0 to work.

I get the following response from my e-mail service (Charter.net) when sending from Roundcube.  Charter is expecting the sender to be 'JohnDoe@charter.net', but Roundcube is using "JohnDoe@192.168.0.5" as the sender.
Code: [Select]
SMTP Error (550): Failed to set sender 'JohnDoe@192.168.0.5', sender rejected.
I had set up my e-mail with the default_host to be 192.168.0.5 because of my home network and how I'm using No-IP for outside access to my dynamic IP address.

Is there a way to change the domain of the sender when sending from Roundcube SMTP?

Here are the settings that I'm using...

Code: [Select]
$config['smtp_server'] = 'ssl://mobile.charter.net';
$config['smtp_port']   = 587;
$config['smtp_user']   = 'JohnDow@charter.net';
$config['smtp_pass']   = '[hidden]';
$config['default_host'] = '192.168.0.5';

I had tried changing 'default_host' to 'charter.net', but then I couldn't log in to Roundcube (spinning wheel with "Loading..." message for a long time and then "Connection to storage server failed").

For Reference, the SMTP configuration that works with Mozilla to send e-mails:
Code: [Select]
Server Name:  mobile.charter.net
Port:         587
User Name:    JohnDoe@charter.net
Password:     [hidden]
Security:     SSL/TLS


Any help would be appreciated.





Offline alec

  • Hero Member
  • *****
  • Posts: 1,310
Re: Change Sender Domain when sending SMTP?
« Reply #1 on: January 28, 2022, 01:51:08 AM »
Just update the email address in user identities. Also, set username_domain.

Offline dwoolridge

  • Newbie
  • *
  • Posts: 2
Re: Change Sender Domain when sending SMTP?
« Reply #2 on: January 30, 2022, 01:34:36 PM »
Thanks so much alec!

Changing the e-mail address in "Settings-->Identities-->JohnDoe@192.168.0.5"  to JohnDoe@charter.net did the trick.

I did not have to set the "username_domain" for it to work for me.