Skip to main content

Bash script and mail command to hosted domain

Comments

11 comments

  • 24x7server
    Hello :), Please try to edit your domain MX entry and set Remote Mail Exchange so that mail will be sent to remote server Edit MX Entry - Documentation - cPanel Documentation
    0
  • cPanelMichael
    Hello :) Yes, as mentioned, please ensure the "Email Routing" configuration for this domain name is set to "Remote Mail Exchanger". Thank you.
    0
  • InteractM
    But cron is running as root so it is still related to that particular domain?
    0
  • cPanelMichael
    New But cron is running as root so it is still related to that particular domain?

    Yes, no matter the sender, it's handled with Exim. Exim will automatically assume any domain name in the /etc/localdomains file is a local domain name, and thus attempt the local delivery. Thus, ensuring the "Email Routing" configuration for this domain name is set to "Remote Mail Exchanger" will place the domain name in the /etc/remotedomains file and let Exim know that email for this domain name is handled by a remote server. Thank you.
    0
  • InteractM
    OK - so is not working then as should. I have "Email Routing" set to external MX record and bash script do not deliver emails to that external email account. nslookup for shows proper record for MX. Any clue what is going on?
    0
  • cPanelMichael
    OK - so is not working then as should. I have "Email Routing" set to external MX record and bash script do not deliver emails to that external email account.

    Could you verify the domain name you are sending to is in the /etc/remotedomains file and not the /etc/localdomains file? EX:
    grep domain.com /etc/remotedomains
    Thank you.
    0
  • InteractM
    Yes - is in the the /etc/remotedomains file and not the /etc/localdomains.
    0
  • InteractM
    Also it looks like PHP is not sending emails to different cPanel account, which website is hosted on the same box, but MX record is set to the remote one. Any clue? Thanks
    0
  • cPanelMichael
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0
  • InteractM
    Support Request ID is: 7564727
    0
  • cPanelMichael
    Support Request ID is: 7564727

    It looks like the request was closed after inactivity. Were you able to address this issue? Thank you.
    0

Please sign in to leave a comment.