Exim send emails using server hostname instead of clients domain name??

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
cPanel Access Level
Root Administrator
Hi,

What could be the reason ( or setting ) that our server is using the hostname to send out emails instead of using the clients domain name?

For example: email is sent out as follow: [email protected]

instead of [email protected]

I have also enabled in WHM the setting: Automatically send outgoing mail from the account's IP address instead of the main IP address. Warning: If you turn this setting on you should make sure reverse DNS entries match the ones in /etc/mail_reverse_dns.
 
Last edited:

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Hi,

What could be the reason ( or setting ) that our server is using the hostname to send out emails instead of using the clients domain name?

For example: email is sent out as follow: [email protected]

instead of [email protected]

I have also enabled in WHM the setting: Automatically send outgoing mail from the account's IP address instead of the main IP address. Warning: If you turn this setting on you should make sure reverse DNS entries match the ones in /etc/mail_reverse_dns.
Are these emails being sent via POP, IMAP, Webmail or a script installed on a user's account? If it is a script, is the script explicitly specifying the from address on the email?
 

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
cPanel Access Level
Root Administrator
This happens with any of these protocols smtp/imap, when an account sends an email it has in the header not his domain name but the hostname of the server. The originating server for any outgoing message is again hostname instead of mail.customer.com, actually the email server doesn't masquerade properly the envelope.

In the php script it will requires a clear password in the PHP script which is not acceptable by customer (smtp authentification)

When doing a telnet port 25 it identifys itself as the hostname when using the IP of a customers package, 220-hostname ESMTP Exim 4.69......

Also in the CPanel, mail client configuration it does show the hostname to be used :-( in the section of manual settings.

I am using: cPanel 11.24.5-R38506 - WHM 11.24.2 - X 3.9
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
This happens with any of these protocols smtp/imap, when an account sends an email it has in the header not his domain name but the hostname of the server. The originating server for any outgoing message is again hostname instead of mail.customer.com, actually the email server doesn't masquerade properly the envelope.

In the php script it will requires a clear password in the PHP script which is not acceptable by customer (smtp authentification)

When doing a telnet port 25 it identifys itself as the hostname when using the IP of a customers package, 220-hostname ESMTP Exim 4.69......

Also in the CPanel, mail client configuration it does show the hostname to be used :-( in the section of manual settings.

I am using: cPanel 11.24.5-R38506 - WHM 11.24.2 - X 3.9
Okay, so even when your customer uses webmail or a client-side mail app, their "from address" is always [email protected] rather than [email protected]?
 

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
cPanel Access Level
Root Administrator
Okay, so even when your customer uses webmail or a client-side mail app, their "from address" is always [email protected] rather than [email protected]?
Yes indeed, very annoying!
Not sure if the client side of their PC is configured correct, that's not my problem, it doesn't work with any php script running on the server or when sending emails it is always the wrong format. seems to me the users are not trusted...

When googling I found this:

untrusted_set_sender = *@+local_domains

When adding this in the exim it makes the Return path correct, but of course it is not a 100% solution, only a little workaround partly.
 
Last edited:

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Yes indeed, very annoying!
Not sure if the client side of their PC is configured correct, that's not my problem, it doesn't work with any php script running on the server or when sending emails it is always the wrong format. seems to me the users are not trusted...

When googling I found this:

untrusted_set_sender = *@+local_domains

When adding this in the exim it makes the Return path correct, but of course it is not a 100% solution, only a little workaround partly.
In the PHP scripts, are they specifying the from parameter?

Also, are you running PHP as user nobody or via SuPHP/SuExec?
 

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
cPanel Access Level
Root Administrator
Yes, they use the from parameter but it is being overruled by exim, it seems exims deletes also the -f option as well as so does exim deletes it for the webmail clients ( -f is the so called 5th parameter)

And yes, we have SuPHP/SuExec enabled on the server.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Yes, they use the from parameter but it is being overruled by exim, it seems exims deletes also the -f option as well as so does exim deletes it for the webmail clients ( -f is the so called 5th parameter)

And yes, we have SuPHP/SuExec enabled on the server.
I recommend letting our technical analysts assist you with this issue: http://tickets.cPanel.net/submit