• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

sending external mail with php mail()

dpleskuser

New Pleskian
Hi,

I recently moved to a dedicated windows server running plesk and am unable to send mail to external domains (it works great if I email an address on my own domain though).

Here's an example of a php file that would have worked previously (before switching to windows plesk) but no longer does...

<?php
ini_set("sendmail_from", "autoresponse@example.com");
mail("exampleExternalMail@gmail.com","testSubject","testMessage");
echo "finished";
?>

I was looking through the server settings and various bits of documentation and I'm not clear on whether plesk requires an smtp server to be specified to send external mail?

Either way, right now the plesk page "External SMTP Server Settings" has both options checked ("Allow Plesk to send email notifications through this SMTP server" and "Use the mail server installed with Plesk and the default mail account created by Plesk"), but in terms of the DNS settings, everything goes through mail.mydomain.com (i.e. there's no "smtp.mydomain.com").

Sorry if that's unclear, but I'm really scratching my head on where to start with this problem, and I'm hoping that something above rings a bell with someone here! Thanks for any thoughts at all!

Dan
 
Just to add that I just found entries like the following in MailEnable's SMTP activity logs...

01/16/16 00:43:19 SMTP-IN 40F2B21D2C4B475DAFBD08D0E5BBFDF5.MAI 688 127.0.0.1 HELO HELO DSVR013493 250 Requested mail action okay, completed 43 17
01/16/16 00:43:19 SMTP-IN 40F2B21D2C4B475DAFBD08D0E5BBFDF5.MAI 688 127.0.0.1 MAIL MAIL FROM:<autoresponse@example.com> 250 Requested mail action okay, completed 43 43
01/16/16 00:43:19 SMTP-IN 40F2B21D2C4B475DAFBD08D0E5BBFDF5.MAI 688 127.0.0.1 RCPT RCPT TO:<externalAddress@gmail.com> 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. 235 36
01/16/16 00:43:19 SMTP-IN 40F2B21D2C4B475DAFBD08D0E5BBFDF5.MAI 688 127.0.0.1 QUIT QUIT 221 Service closing transmission channel 42 6
01/16/16 00:50:57 SMTP-IN 891E1BE921A449B88556B864CC3ADC9B.MAI 188 127.0.0.1 220 DSVR013493.home ESMTP MailEnable Service, Version: 8.60-- ready at 01/16/16 00:50:57 0 0
 
Just figured out the problem: MailEnable -> Servers -> Services & Connectors -> SMTP (right-click) -> Properties -> Relay tab -> I had to choose an "Allow Mail Relay" option of "Allow relay for local sender addresses". Now I can send to external mail addresses. So sorry, but not specifically a plesk problem!!
 
Hi,

Enabling the SMTP relay option for "Allow relay for local sender addresses" will open your MailEnable server for open relay. This will allow spammers to relay spam from server without any need to authenticate and potentially get your servers IP blacklisted. The more secure way to allow 127.0.0.1 to relay without authenticating is to enable "Allow privileged IP's can relay" and add the 127.0.0.1 IP to the "Deny all - Except those in the list" option.
 
Last edited:
Thanks very much Ian - had no idea about that possible security issue and everything still works great after implementing your suggestion.
 
Back
Top