DA sending mail from wrong email address

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,248
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 info@mycompany.nl but from diradmin@server.hostingcompany.nl

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 myaccount@mycompany.nl or any other email address of mine.

How can this be fixed?
 

ISOS6

Verified User
Joined
May 7, 2009
Messages
322
Location
Erbil, Tarin Hills, Iraq
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.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,248
Location
Maastricht
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.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,248
Location
Maastricht
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.
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
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 <reseller@example.com>
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
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,248
Location
Maastricht
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 <= diradmin@server.hostingdomain.nl U=diradmin P=local S=1894
So sendmail is sending under username diradmin instead of username myreselleraccountname.
 
Last edited:

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,248
Location
Maastricht
Jeff, any solutions for this?
Because I really would like a fix because mail is rejected by several mailservers:
450 4.1.8 <diradmin@server.hostingdomain.nl>: Sender address rejected: Domain not found
It should be send from info@mydomain.nl then things would be right.
I could add the hostname to DNS but that is not the correct way to do things.
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
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 info@mydomain.nl, but at lest they will get delivered.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,248
Location
Maastricht
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:

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,248
Location
Maastricht
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: <diradmin@server.hostingdomein.nl>
Received: from mail-in1.tiscali.nl (195.241.79.165) by mail-9-nl.tiscali.it (7.3.140)
id 4DC0CF4301C80729 for gebruiker@telfort.nl; 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 gebruiker@telfort.nl; Sat, 21 May 2011 02:35:13 +0200
Received: from diradmin by server.hostingdomein.nl with local (Exim 4.76)
(envelope-from <diradmin@server.hostingdomein.nl>)
id 1QNa9w-0005Ak-RF
for gebruiker@telfort.nl; Sat, 21 May 2011 02:35:13 +0200
To: gebruiker@telfort.nl
From: hostingfun <info@mijndomein.nl>
Sender: hostingfun <info@mijndomein.nl>
Reply-To: hostingfun <info@mijndomein.nl>
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:

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
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
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,248
Location
Maastricht
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.
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
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
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,248
Location
Maastricht
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 <diradmin@server5.extrxxxx.nl>: Sender address rejected: Domain not found; from=<diradmin@server5.extrxxxx.nl> to=<info@anotherdomain.org> 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 whoever@domain.nl which would be much better.:)

Email is on the way in a minute.
 
Top