How to change the "from" email address?

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,218
Location
Maastricht
How to change the "from" email address on system emails?

When I receive a mail about a new account in my email client, the "from" is always my Linux accountname, not my company name which would be better.


Is there a way I can change this from within Directadmin?
 
Last edited:

Richard8

Verified User
Joined
Jul 4, 2019
Messages
67
What do the headers look like?

On my Mac, if I add da@user.org to my Contacts list, it will display whatever information I use when I go to check my Mail.

Is this server-side or client-side?
 

Peter Laws

Verified User
Joined
Sep 13, 2008
Messages
1,747
Location
London UK
This is interesting, I wanted to bring this up before...

If the email address is different to the hostname, GMail et al might bung it into spam......

If you offer reseller accounts, this will be an issue.....

(The "Use external smtp server" recurring topic will help here)
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,854
Location
GMT +7.00
Will correct SPF and DKIM records help to avoid the possibility for an email to end in SPAM folder at Gmail's side?
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,218
Location
Maastricht
@zEitEr: Thank you, but that does not help, that is already set to an existing email address.

@Richard8 It look like it's already going wrong server side.

Have a look at these headers, mostly the last part:
Code:
Return-Path: <diradmin@server.servername.nl>
Delivered-To: email@mycompany.com
Received: from server.servername.nl
	by server.servername.nl with LMTP
	id wP8lHyJTIl1oDQAAHpO1Kg
	(envelope-from <diradmin@server.servername.nl>)
	for <email@mycompany.com>; Sun, 07 Jul 2019 22:16:34 +0200
Return-path: <diradmin@server.servername.nl>
Envelope-to: email@mycompany.com
Delivery-date: Sun, 07 Jul 2019 22:16:34 +0200
Received: from diradmin by server.servername.nl with local (Exim 4.92)
	(envelope-from <diradmin@server.servername.nl>)
	id 1hkDaM-0001jm-6A
	for email@mycompany.com; Sun, 07 Jul 2019 22:16:34 +0200
To: email@mycompany.com
From: accountname <email@mycompany.com>
Sender: accountname <email@mycompany.com>
Reply-To: accountname <email@mycompany.com>
X-DirectAdmin-Sender: accountname
So my e-mail address is present, but since my accountname is mentioned at first in the headers, the email client (in this case outlook 2013) is using the accountname instead of the email address.
If I open the mail it will indeed say accountname <email@mycompany.com> but it should not read my accountname to begin with.

@Peter Laws: I'm using a reseller account but do have admin access to the server. I'm using SPF and DKIM and never had issues with sending mail to Gmail.
 

DanielP

Verified User
Joined
Jun 28, 2019
Messages
82
On cPanel servers mail from php (wordpress login for example and other cms that are not use smpt connection) is generated by default from user@hostname

so it teach my users to use (at cloud linux php settingsor php ini, or with php_value in .htaccess where it is supported)

mail.force_extra_parameters = -f sales@domain.com
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,218
Location
Maastricht
@ikkeben: it's mail send from the server, so received by Outlook (from Office) not send from Outlook. The page you point to is sending mails from Thunderbird.
My questions is about the receiving part and the sending part from the server.

@DanielP, thank you, I know about this parameter for php mail. But this is not coming from php mail. As you can see from the log part it's send from directadmin itself (diradmin@server.servername.nl) to my mail account.
So system messages.

For example this happens when I create a new account and then the system sends the account credentials to the user.

I do not have this issue when sending mails from my e-mail addres via the server to a user. It's only happening when the system is sending mails. As it says in my first post, "when I receive a mail about a new account". But it was maybe not that clear.

So I changed the title to make this more clear.
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
641
Location
Netherlands Germany
Last edited:

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,218
Location
Maastricht
Seems to me that should be fixed by DA then, not by me, since the system is sending it like that. It's not an exploit because it are correct system messages and my mail address is presented with it. It's just that the linux accountname should be filtered from the From, Sender and Reply-to address.

I didn't do anything, got the default dovecot and dovecot.conf and should be up to date.
 
Last edited:

ikkeben

Verified User
Joined
May 22, 2014
Messages
641
Location
Netherlands Germany
sorry to be unclear didn't mean exploit for you / this topic but as example some of such info's ( from) could be in those configs.

As it is a default and working as .. in DA.

Then a feature request but don't know sure about that, to have a possible configuration for that in the GUI?
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,218
Location
Maastricht
Yep you're right, it's a default of DA. Softaculous is doing it the correct way. I don't know why DA is doing it this way.
Indeed a feature request might be the best.

As I don't know how to change this. As far as I've seen there is no way to change this in the GUI.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,218
Location
Maastricht
Exactly, thank you!

However, resellers should be able to change this themselves. I could only change this because I'm lucky enough to also have the admin password.
 

bdacus01

Verified User
Joined
Jul 22, 2017
Messages
572
Location
Murfreesboro
Exactly the same as mentioned here: #3 Or I miss anything?
Alex
Yes your guide seems to cover and highlight Email. Which is needed. However you have to set Name as well. The field below Email. Name defaults to admin. The user needs to put some acceptable real name here for it to be in the headers.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,218
Location
Maastricht
zEitEr said:
Exactly the same as mentioned here: #3 Or I miss anything?
Yes it's missing something. The circle is made through the name so I did not notice that this was changable to and the instructions say:

Scroll the page down to the its middle and find a row with "E-Mail"
Change the email address and click "Save E-mail" button.
Instructions say to change the email address. I did not want to change the e-mail but I wanted to change the from name. Due to line through it didn't notice that. And it was not mentioned in the instructions.

So it might be a good idea to adjust the instructions, change the line around and state both email address and from name could be changed. :)
 
Top