Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 13 of 13
  1. #1
    Member
    Join Date
    Oct 2008
    Posts
    8

    Default Disable address validation when sending mail remotely using SMTP

    So i'm using the PEAR Mail package to send email from PHP scripts. It sends them fine when the script is running on the actual server were the mail server resides. But I also have a test server on a different Dedicated IP. When the scripts run on the test server and try to send mail from the live server's mail server it attempts to verify the From address against actual email accounts. This is good to prevent spam and whatnot. But my scripts will be sending email from fake addresses like 'no-reply@domain.com'.

    Is there any way to add my test servers IP to a list of approved IP's so it won't attempt the validation when using SMTP?

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,893
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Disable address validation when sending mail remotely using SMTP

    Hmm, check your settings from the cPanel account > Email Authentication, page. Not sure if thats helpful at all or not.

  3. #3
    Member
    Join Date
    Oct 2008
    Posts
    8

    Default Re: Disable address validation when sending mail remotely using SMTP

    Already checked into that. I added the test servers IP there with no difference

  4. #4
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Disable address validation when sending mail remotely using SMTP

    So, you are basically trying to relay from the test server to the live server? If you are trying to allow that IP to relay, you need to do the following on the live machine (the one you are relaying through for the test script):

    Code:
    touch /etc/alwaysrelay
    echo "IP#" >> /etc/alwaysrelay
    Edit the IP# with the IP number for the test machine.

    Since the /etc/relayhosts file can't be manually edited as antirelayd will wipe any changes you make to it, you can add the file mentioned above called /etc/alwaysrelay and add the IP into that file for to allow that IP to relay through your server. The /usr/sbin/antirelayd script will look for that file and then add the IP into relayhosts file for you.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  5. #5
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,893
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Disable address validation when sending mail remotely using SMTP

    Quote Originally Posted by noyearzero View Post
    Already checked into that. I added the test servers IP there with no difference
    Whats happens when you disable those setting completely?

  6. #6
    Member
    Join Date
    Oct 2008
    Posts
    8

    Default Re: Disable address validation when sending mail remotely using SMTP

    It was disabled to start off with. I turned it on and added the IP in.

  7. #7
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Disable address validation when sending mail remotely using SMTP

    Did you do the steps I indicated? It sounds like you are trying to relay and the steps I mentioned allow one machine to relay through another to send emails.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  8. #8
    Member
    Join Date
    Oct 2008
    Posts
    8

    Default Re: Disable address validation when sending mail remotely using SMTP

    I'll look into that Tristan. I'm not sure about all the technical jargon, but if a 'relay' is when you use a mail server on an external server to send email then yes. I guess it would be the same thing as when I use Thunderbird to send an email.

  9. #9
    Member
    Join Date
    Oct 2008
    Posts
    8

    Default Re: Disable address validation when sending mail remotely using SMTP

    I'm finally able to give this a try. Is it possible to make this a 'per account' thing? I tried putting a file in /home/account/etc/alwaysrelay didn't seem to work.

  10. #10
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Disable address validation when sending mail remotely using SMTP

    It isn't possible to make it a per account setting. The steps I noted need to be followed exactly as indicated for this to function if this is a relay setup. You would simply need to put the file onto the live machine and put the IP for the test machine into that /etc/alwaysrelay file. You may then also want to restart exim.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  11. #11
    Member
    Join Date
    Oct 2008
    Posts
    8

    Default Re: Disable address validation when sending mail remotely using SMTP

    I added the IP to the file, but that alone didn't work... I'll try restarting exim

  12. #12
    Member
    Join Date
    Oct 2008
    Posts
    8

    Default Re: Disable address validation when sending mail remotely using SMTP

    hmmm no luck still

  13. #13
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Disable address validation when sending mail remotely using SMTP

    Please try opening up a ticket with us so we can check the settings for that script along with your Exim Configuration area's settings.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. How to disable sending e-mail
    By Rusky in forum E-mail Discussions
    Replies: 4
    Last Post: 12-09-2009, 12:35 PM
  2. Sending the e-mail statistics to an e-mail address
    By ronaldoo in forum E-mail Discussions
    Replies: 6
    Last Post: 08-05-2009, 05:02 AM
  3. Use another SMTP server when sending emails to Yahoo address?
    By SuperBaby in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-20-2008, 03:35 PM
  4. SMTP - How to block specific domain for sending mail?
    By netlook in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-08-2004, 02:15 AM
  5. Bug in Exim SMTP sending spam with mail.microsoft.com
    By wimp in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 05-21-2003, 09:25 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube