Mail sent from command-line is using main server ip instead of the user dedicated ip

ruiz

Well-Known Member
Feb 13, 2008
50
4
58
Hi there,

I have a user that wants to send e-mails through php from a cron job, however those e-mails are sent via the main server ip address instead of my client dedicated ip. That behavior brings him some trouble because those e-mails are maybe blocked on the recipients due to spf settings, helo name, etc.

Question is.. how can i make those e-mails also use my clients dedicated ip?? I already selected:
"Automatically send outgoing mail from the account’s IP address instead of the main IP address."

But only e-mails affect mails sent via a smtp connection, php tho connects directly to the smtp server. Thanks!!!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
42
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: Mail sent from command-line is using main server ip instead of the user dedicated

If the PHP script is using sendmail or the PHP mail() function, then it will bypass the exim settings. The script would need to use SMTP authentication with an email user on the account and password in order to be sent from the dedicated IP.