How to change the "from" email address?

Richard G

Verified User
Joined
Jul 6, 2008
Messages
12,558
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:
What do the headers look like?

On my Mac, if I add [email protected] 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?
 
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)
 
Will correct SPF and DKIM records help to avoid the possibility for an email to end in SPAM folder at Gmail's side?
 
@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: <[email protected]>
Delivered-To: [email protected]
Received: from server.servername.nl
	by server.servername.nl with LMTP
	id wP8lHyJTIl1oDQAAHpO1Kg
	(envelope-from <[email protected]>)
	for <[email protected]>; Sun, 07 Jul 2019 22:16:34 +0200
Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Sun, 07 Jul 2019 22:16:34 +0200
Received: from diradmin by server.servername.nl with local (Exim 4.92)
	(envelope-from <[email protected]>)
	id 1hkDaM-0001jm-6A
	for [email protected]; Sun, 07 Jul 2019 22:16:34 +0200
To: [email protected]
From: accountname <[email protected]>
Sender: accountname <[email protected]>
Reply-To: accountname <[email protected]>
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 protected]> 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.
 
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 [email protected]
 
@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 ([email protected]) 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.
 
Last edited:
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:
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?
 
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.
 
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.
 
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.
 
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. :)
 
Reviving an old thread here - thanks Brent for linking to the archived suggestion

Whats the best method to have this added as a feature?
 
Back
Top