The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'E-mail Discussions' started by Nick57, Aug 18, 2009.

  1. Nick57

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    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: account@hostname

    instead of mailbox@accountsdomainname.

    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.
     
    #1 Nick57, Aug 18, 2009
    Last edited: Aug 18, 2009
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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?
     
  3. Nick57

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Okay, so even when your customer uses webmail or a client-side mail app, their "from address" is always username@server-hostname rather than username@domain?
     
  5. Nick57

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
    #5 Nick57, Aug 19, 2009
    Last edited: Aug 19, 2009
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    In the PHP scripts, are they specifying the from parameter?

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

    Nick57 Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I recommend letting our technical analysts assist you with this issue: http://tickets.cPanel.net/submit
     
Loading...

Share This Page