DA sending mail from wrong email address

Richard G

Verified User
Joined
Jul 6, 2008
Messages
12,744
Location
Maastricht
I don't know exactly since when this is happening, but some time ago this problem did not occur.

When users create an account via my hosting script, all goes well.

But when I login to my reseller account and create a new user account, the login credentials will also be send to my customer.
So far so good.

However, today I discovered this email is not being send from [email protected] but from [email protected]

In this case "hostingcompany.nl" is the company I have the reseller account from (but I do have admin access and root access too).
So DA is sending in fact from diradmin@hostname instead of from [email protected] or any other email address of mine.

How can this be fixed?
 
Hello,

I don't know that you have tried this.

Login in as admin, Click on Show all users > admin/reseller > admins/reseller's data and change email there.
 
Thank you.
But it is login as admin, click on show resellers and then view resellers data.

But it already contains my email address.

So email adresses of me and the admin are present and filled in. But still DA is sending it from the wrong email address.
Looks to me that this could be a DA bug.
 
Seems more users have this problem.
http://www.directadmin.com/forum/showthread.php?t=19546

What I wonder is why DA is using the diradmin account to send out mail and not the accountname of the user (or in my case reseller) which is doing the action in DA.
It should be that way and it's stupid to put a hostname in DNS for this function so that should not be necessary.
 
I was already afraid that might be the case.
Then this is on every DA installation, so in that case I'm going to suggest a feature.
 
I just took the time to do this:

I created a new reseller.

I modified the reseller to show an email address I wanted to use; from a domain NOT on this server.
I modified the reseller name to the one I wanted it to use, as by default it's the username.

I logged in as that reseller and created a new user with a new domain, and sent the welcome email to another address I own, also on a different server.

When I got the email it came from:
Code:
Reseller Name <[email protected]>
as it should have.

First thing to check is to make sure you're running latest versions of everything, including SpamBlocker Version 4 exim.conf file for DirectAdmin.

Jeff
 
I am running the latest version of everything. I don't know for sure if I'm using Spamblocker Version 4 exim.conf because I made some changes needed in the exim.conf.
diradmin is on the trusted userlist.

But imho it is a DA problem, not an exim problem. I just checked the logs and found this:
2011-05-12 18:58:42 cwd=/usr/local/directadmin 2 args: /usr/sbin/sendmail -t
2011-05-12 18:58:42 1QKZDm-0003q7-Sz <= [email protected] U=diradmin P=local S=1894
So sendmail is sending under username diradmin instead of username myreselleraccountname.
 
Last edited:
You might want temporary (it must be done with installation) add server.hostingdomain.nl in DNS in order to delegate it. That won't make your messages to come out from [email protected], but at lest they will get delivered.
 
I know this is possible as temporary fix, but I was looking for a real solution.
But thank you for thinking about a solution.

Seems mod_ruid is causing some of the problem.
Checking with some Dutch collegues, I will let you know.
 
Last edited:
Yes, it really is a DA issue (working as designed). So my feature request was correct to do, it is not mod_ruid.

I tried changing some things with mod_ruid, but that only changes the title in the displayed "from addres" (uses my accountname then) but not in the header, it will look like this then:

Return-Path: <[email protected]>
Received: from mail-in1.tiscali.nl (195.241.79.165) by mail-9-nl.tiscali.it (7.3.140)
id 4DC0CF4301C80729 for [email protected]; Sat, 21 May 2011 02:35:14 +0200
Received: from ns1.hostingdomein.nl ([78.46.xx.xx] helo=server.hostingdomein.nl)
by mail-in1.tiscali.nl with esmtp
id 1QNa9x-0008Sa-O3
for [email protected]; Sat, 21 May 2011 02:35:13 +0200
Received: from diradmin by server.hostingdomein.nl with local (Exim 4.76)
(envelope-from <[email protected]>)
id 1QNa9w-0005Ak-RF
for [email protected]; Sat, 21 May 2011 02:35:13 +0200
To: [email protected]
From: hostingfun <[email protected]>
Sender: hostingfun <[email protected]>
Reply-To: hostingfun <[email protected]>
X-DirectAdmin-Sender: hostingfun

So as you can see the "envelope from" and return-path is still diradmin@hostname. Which is normal because directadmin is running as user diradmin. And in spite of the fact that you are logged in with your username, DA will do actions (including sending mail) under the diradmin username.

I don't know how JLasman can have it working correctly like stated above, as also my Dutch collegues have the same header as I have, and most other users do to, because there are a couple feature requests about this.

You can workaround the header by adding your hostname to DNS. Then the mail will be accepted, but still be send from diradmin@hostname instead of from your own domain name as it should be.

P.s. you can second my request here:
http://www.directadmin.com/forum/showthread.php?t=40359
 
Last edited:
As I wrote previously; this works for me; it sends email from the email address set up as the reseller email's address. For emails sent by the admin account, change the address in the admin login's reseller level.

Jeff
 
Sorry Jeff, I guess you are one of the exceptions.
Problem is reproduced by several Dutch collegaes. The From address will look fine, but it does not in the headers.

Otherwise I would like to see your headers to verify.
 
Richard, please reply by email as well as here so I'll see your reply before tomorrow. Please let me know which user (admin, reseller, or user) has the problem and I'll send myself an email and check the headers.

My email address is below, in my siglines.

Thanks.

Jeff
 
Hi Jeff... it's both the admin and reseller when creating a useraccount or sending an email via DA.
I did not test any user.

I just tried on another server, same problem:
May 24 02:31:32 server postfix/smtpd[25979]: NOQUEUE: reject: RCPT from ns1.extrxxxx.nl[95.211.130.12]: 450 4.1.8 <[email protected]>: Sender address rejected: Domain not found; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<server5.extrxxxx.nl>
As you can see... other server, normal action because if you create an account or send a mail from the control panel, it will be send as diradmin.
That is normal, because DA is running as user diradmin.
So in the headers it will always be diradmin@hostname instead of [email protected] which would be much better.:)

Email is on the way in a minute.
 
Back
Top