Smtp relay on osx 10.9.5 and server 3.2.2

What we have
We have a mac mini setup using 10.9.5 and server 3.2.2.    The mail server is OFF but we have a Relay Outgoing Mail through ISP checked (and the proper credentials for the outgoing relay (FQDN) and the authorization credentials.
What we are trying to do
Our mac mini runs a php script to generate an email that needs to be sent to users.   The mail has to use a smtp relay and we are trying to use the smtp relay provided by our email vendor.
Settings required by our email vendor
Instructions for configuring an email client can be found here
https://www.namecheap.com/support/knowledgebase/article.aspx/1179/2175/general-c onfiguration-for-mail-clients-and-mobile-devices
We set up the relay in Mail on the Server 3.2.2 to use SSL and port 465.  In our particular case the relay is configured as shown below.  Obviously the [email protected] is the proper username for our authorization.
When we try to send mail (we test this function by sending mail from terminal by using the following command (sending mail to myself from myself)
printf "Subject: TestnHello" | sendmail -f [email protected] [email protected]
and then watch the mail logs the smtp server rejects our mail due to authorization issues.  The mail log text is shown below (email addresses replaced with [email protected] and IP addresses modified)
Dec 22 11:57:03 109-218-164-81.lightspeed.austtx.sbcglobal.net postfix/pickup[16825]: 5545383231: uid=501 from=<[email protected]>
Dec 22 11:57:03 109-218-164-81.lightspeed.austtx.sbcglobal.net postfix/cleanup[16827]: 5545383231: message-id=<[email protected]bal.net>
Dec 22 11:57:03 109-218-164-81.lightspeed.austtx.sbcglobal.net postfix/qmgr[16826]: 5545383231: from=<[email protected]>, size=340, nrcpt=1 (queue active)
Dec 22 11:57:03 109-218-164-81.lightspeed.austtx.sbcglobal.net postfix/error[16838]: 5545383231: to=<[email protected]>, relay=none, delay=0.04, delays=0.02/0/0/0.02, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to eforwardct3.name-services.com[216.163.176.39]:465: Connection refused)
Dec 22 11:57:05 109-218-164-81.lightspeed.austtx.sbcglobal.net postfix/master[16824]: master exit time has arrived
We find many self help pages on the internet that talk about modifying the main.cf file located at /Library/Server/Mail/Config/postfix.   Some even talk about modifying settings in the master.cf file in /ect/postfix.  I have tried several and none seem to work.
Can anyone provide some guidance?
Regards!

The Server GUI doesn't provide for this use case.
Take the following steps to configure Postfix to relay mail to a remote SMTP server with password authentication over SSL. Substitute as required for strings in italics below. Address is the fully-qualified domain name of the relay host. The value of port is usually either 25, 465, or 587. Username and password refer to your credentials on the relay host.
In the current version of OS X Server (but not necessarily in older versions), Steps 1 and 3 should be done for you when you enable relaying and relay authentication in the Server application.
1. If necessary, create or update the relayhost directive in
     /Library/Server/Mail/Config/postfix/main.cf
It should look like this:
     relayhost = [address]:port
2. Add these lines, above the section at the end that begins with the comment "# Mac OS X Server":
     smtp_sasl_security_options =
     smtp_tls_CAfile = /etc/certificates/relayhost.pem
     smtp_tls_session_cache_database = btree:$data_directory/smtp_tls_session_cache
     smtp_use_tls = yes
3. If it doesn't already exist, create the password file
     /Library/Server/Mail/Config/postfix/sasl/passwd
with this content:
     [address]:port
     username:password
Here address must match $relayhost.
Then create the password database:
sudo postmap /Library/Server/Mail/Config/postfix/sasl/passwd
This action creates the file
     /Library/Server/Mail/Config/postfix/sasl/passwd.db
The two password files should be readable by root only.
4. Create the file
     /etc/certificates/relayhost.pem
with the CA certificate(s) to be trusted for authentication of the remote host. You get those certificates from the service provider. If you can't find a link to download them, try this:
openssl s_client -connect address:port -showcerts < /dev/null | sed -n '/-BEGIN /,/-END /p' | sudo sh -c 'cat > /etc/certificates/relayhost.pem'
The command may produce an error message that isn't necessarily significant. For servers that use the older STARTTLS protocol, rather than straight TLS or SSL, this command may need to be modified.
5. Restart the Mail service.

Similar Messages

  • SMTP Relay Username and password disappear when I close Server Admin

    Hello,
    I have a mail server that was working properly with SMTP relay until last week, when it started to bounce back to itself. I checked the settings and the SMTP relay username and password were erased. I type them in again, click on save, close and reopen and it's erased. Is there a way to enter this information other than the Server Admin application. If so, where is it located and what should I change? Thanks!

    Here is the result of postconf -n:
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = smtp-amavis:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    debugpeerlevel = 2
    enableserveroptions = yes
    html_directory =
    inet_interfaces = localhost
    mail_owner = postfix
    mailbox_transport = cyrus
    mailq_path =
    manpage_directory =
    mydestination = $myhostname,localhost.$mydomain,localhost
    mydomain = spikenet.homedns.org
    myhostname = spikenet.homedns.org
    newaliases_path =
    queue_directory = /var/spool/postfix
    readme_directory =
    relayhost =
    sample_directory =
    sendmail_path =
    setgid_group =
    smtpdpw_server_securityoptions = login,plain,gssapi,cram-md5
    smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
    smtpdsasl_authenable = yes
    smtpduse_pwserver = yes
    unknownlocal_recipient_rejectcode = 550
    The log changed to:
    Apr 13 11:05:19 spikenet postfix/sendmail[74525]: fatal: bad string length 0 < 1: mydomain_fallback = .

  • Cannot get db mail to work via SMTP Relay for Office 365 in SQL Server 2014 on Windows Server 2012 R2

    Our company recently moved to Office 365 which mean our on premise exchange server went away as well with the move.  I am trying to configure my new sql server (OS-Windows Server 2012 R2, DBMS- SQL 2014 Std Edtion).  After some searching I found
    this article (http://blogs.technet.com/b/meamcs/archive/2013/02/25/how-to-configure-sql-database-mail-so-send-emails-using-office-365-exchange-online-a-walkthrough.aspx) and have followed these steps exactly, but to no avail.  I did some further research
    on the SMTP relay I setup and found a way to test it (listed here http://technet.microsoft.com/en-us/library/dn592151(v=exchg.150).aspx at the bottom of the article).  If I drop the email.txt file in the pickup folder, it gets sent out no problem.
     I have configured my db email exactly as describe here(http://blogs.technet.com/b/meamcs/archive/2013/02/25/how-to-configure-sql-database-mail-so-send-emails-using-office-365-exchange-online-a-walkthrough.aspx).  But keep getting an unable to connect
    to SMTP server error.  I have even tried completely shutting down firewall to see if that is the issue and multiple restarts.  Any ideas how to get this to work on Office 365?
    DB Mail error log:
    Date 6/10/2014 10:28:41 PM
    Log Database Mail (Database Mail Log)
    Log ID 46
    Process ID 2196
    Mail Item ID 19
    Last Modified 6/10/2014 10:28:41 PM
    Last Modified By xx
    Message
    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2014-06-10T22:28:41). Exception Message: Cannot send mails to mail server. (Failure sending mail.).

    Hi,
    I followed this blog and got the below error message in the Database Mail Log.
    “The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2014-06-11T19:34:00). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay
    for [email protected]).”
    If you are getting the same error message, you can try the below steps to resolve the issue.
    1. Open the IIS 6.0 management console. Right click on the SMTP server and open the properties window.
    2. Click on the Access tab, click Relay button under Relay restrictions. loopback IP address (i.e 127.0.0.1).
    Then the email should be sent out from Database Mail without problem.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Sending an email from my Ipad I get "receipient was rejected by server because it does not allow relaying". What does this mean and how do I correct it?

    When sending an email from my Ipad. I get "receipient was rejected by server because it does not allow relaying". What does this mean and how do I correct it?

    On the email account's settings (Settings > Mail, Contacts, Calendars and tapping on the account on the right), go into it's outgoing SMTP settings and try putting in your email name and password (they might currently show as 'optional')

  • How to use multiple mail sending address in SMTP relay for exchange online

    We have one SMTP relay configured with [email protected] credentials. one oracle application automatically shoots mail to users using this [email protected] to users. So if recipient reply on auto-generated mail it goes to mailbox of [email protected] (so that application
    team see and reply to any query raised by recipient). 
    Now my requirement is, I want to notify users about their password expiry before 10  days (something like that) I have made the script and tested it in lab. But the main requirement is I want to use [email protected] mail ID for sending mail. And if any recipient
    reply on the auto-generated mail it goes to [email protected] mailbox (which is managed by different team).  
    So the query How can I use two different mailbox enabled IDs for sending mails on a single SMTP Relay server
    Thanks
    Pankaj Sharma

    Thanks Ed and Mavis for the reply and suggestion, but here scenario is different. 
    We have one SMTP relay configured with [email protected] credentials. one oracle application automatically shoots mail to users using this [email protected] to users. So if recipient reply on auto-generated mail it goes to mailbox of [email protected] (so that
    application team see and reply to any query raised by recipient). 
    Now my requirement is, I want to notify users about their password expiry before 10  days (something like that) I have made the script and tested it in lab. But the main requirement is I want to use [email protected] mail ID for sending mail. And if any recipient
    reply on the auto-generated mail it goes to [email protected] mailbox (which is managed by different team).  
    So the query is can I use two different mailbox enabled IDs on a single SMTP Relay, If yes then how..
    Thanks
    Pankaj

  • How do I set up an account to receive email from my SMTP relay Server. Have I made a SMTP Server config error?

    Hi,
    How do I set up an account to receive email from my SMTP Relay Server?
    I've setup the SMTP feature and set my Server to use anonymous authentication.
    Things appear to look ok.
    But I can't connect make a test connection to it when I am trying to add an email account in Outlook.
    I could be doing something wrong here.
    This is my process.
    1. I have setup my SMTP Server.
    2. Created a user account in AD and given it an email address.
    3. Opened Outlook and tried to manually add a POP3 account by specifying the incoming and outgoing Server details.
    But when I go to test the connection on the email setup it keeps failing.
    Please help.
    Thanks

    Hi Midi25,
    As Florent suggested, please use Telnet to test SMTP Communication. For more details, please refer to following articles.
    How to Use Telnet to Test SMTP Communication
    XFOR: Telnet to Port 25 to Test SMTP Communication
    In addition, please also refer to following article and check if can help you.
    How to Configure a Windows Server 2003 Server as a Relay Server or Smart Host
    Best regards,
    Justin Gu
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Have to add 0.0.0.0/0 to "Accept SMTP relays only from these"?

    To reach the server via vpn I had to add a virtual IP (192.168.1.1) to the ethernet port. Since then mail acts a bit strange: I have to add 0.0.0.0/0 to "Accept SMTP relays only from these" in SA. Otherwise i get a "[/var/imap/socket/lmtp]: Connection refused" in the smtp log and the server does not accept any delivery of mails from the internets.
    I'm not quite sure if it's a good idea. Can anyone please tell if this is still a security risk (while having access restrictions on the mail service)?

    After a few telnet tests I can answer my own question: It makes an open relay server to spammers! But to solve the former issue with the connection refuse, I had to switch to virtual hosting in the advanced tab of the mail service and add my own domains.

  • Using CUE as SMTP relay

    Hello world...
    I hope someone has an answer to this - i have gone through the CUE CLI documentation looking to config it up as an SMTP relay, and this idea does not seem like it will work.
    System is UC540 on 8.6.5
    I have a PRI with a DID block for the client - they want individual fax numbers for each person.  That part is easy enough.  They do NOT want to store it in their vociemail box.  They just want it sent to their email inbox.  They do not want to use the "listen" mode where fax and voice comes in on the same DID because the delay for the customer calling in is too great in their opinion.  This is fine.  I get it.
    However I am having a dickens of a time using the CUE to send the emails based upon the DID to the user mailbox.  I am talking about configuring a separate ephone-dn and an account on the CUE for the fax email user.  when i go this route, The sending fax machine just hangs and never successfully transmits.
    IF, however, I set the "mta send server" to my test-bench smtp relay by IP address, it all works.  Fax as email attachment comes through like greased lightning.
    I try to do it via the extension and have CUE submit it out, things just hang.
    IS THERE A WAY to configure the CUE to act as a simple SMTP relay for all things internal?
    This is the config that works for me:
    mta send server 192.168.110.25 port 25 <IP addess of my bench smtp server>
    mta send server 10.10.10.1 port 25
    mta send with-subject both
    mta send mail-from hostname LAB-UC540.lab.org
    mta send mail-from username $s$
    mta receive aliases 10.10.10.2
    mta receive maximum-recipients 7
    For the MMOIP, I have:
    dial-peer voice 3020 pots
    translation-profile incoming Lab_Fax_T37_Called_26
    service onramp
    incoming called-number 4627
    direct-inward-dial
    port 0/2/0:23
    dial-peer voice 1801 mmoip
    service fax_on_vfc_onramp_app out-bound
    destination-pattern 4627
    information-type fax
    session target mailto:[email protected]
    The above works remarkably well
    This (generic CCA config) is broken:
    dial-peer voice 3020 pots
    translation-profile incoming Lab_Fax_T37_Called_26
    service onramp
    incoming called-number 4627
    direct-inward-dial
    port 0/2/0:23
    dial-peer voice 1800 mmoip
    description ** fax onramp for outbound faxmail to CUE **
    service fax_on_vfc_onramp_app out-bound
    destination-pattern ^....$
    information-type fax
    session target mailto:[email protected]
    fax receive called-subscriber $d$
    fax interface-type fax-mail
    mta send server 10.10.10.1 port 25
    mta send with-subject both
    mta send mail-from hostname 10.10.10.2
    mta send mail-from username $s$
    mta receive aliases 10.10.10.2
    mta receive maximum-recipients 7
    Any suggestions?  Or do I build a small internal LAN smtp relay server?

    Hello,
    The CUE is used with the script for t37 - there are two approaches with fax to email.
    One is using the CUE and the other is not using CUE just to add the right information.
    For more information:
    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/unity_exp/rel3_1/administration/guide/voicemail/fxgatewy.html
    https://supportforums.cisco.com/docs/DOC-9718
    HTH,
    Alex

  • How can solve the problem in email " SMTP Relay "Message rejected" ", how can solve the problem in email " SMTP Relay "Message rejected" "

    Dear sirs,
    how to solve the mail problem which occurs while I am abroad; bearing in mind that I use HOTSPOT and sometime it's sending emails sometime getting the below messages " SMTP Relay "Message rejected"

    The outgoing mail server is rejecting mail from your network address. Typically that happens when your mail service provider is also your ISP, and you connect to it from another network. The SMTP server will allow connections without a password from anywhere, but it will only relay mail from within the ISP's network. It could also be that your account on the server has expired or been suspended.
    If you need to send mail from outside your ISP's network, use an independent mail service provider. I don't have a specific recommendation.

  • Same SMTP Relay problem but new reasons. Works with most but not with few

    I am writing a mail server. My applications sends mail directly to the SMTP server of recipient using MX Record. I find out the MX Record of the recipients and then using Java Mail send mail to that MX Record.This application is working fine and it has worked for thousand or so SMTP Server successfully.
    There are couple of servers (SMTP of recipients) those reject the mail saying SMTP Relaying Prohibited by the Administrator and further says Invalid Mail Address Destination. I am wondering that the recipients belong to that same domain (MX record). I am able to mail them from yahoo or hotmail. I am not trying to use that SMTP for relaying, infact that mail account is registered in that particular SMTP Server.If that server is using SMTP Authentication, how come yahoo or hotmail authenticate for sending mail to their user.
    I am sending all genunine parameters like senders mail address etc. I have tried setting various. Can anyone help me where I am missing?

    My applications sends mail directly to the SMTPserver of recipient
    using MX RecordYou don't send mail to the SMTP server you send it to
    the pop3 server, anyway...
    Nopes, you do send mail to the POP3 server. POP (Post Office Protocol) is used for fetching mails. Se RFC 1939 http://www.faqs.org/rfcs/rfc1939.html for more detailed information. Usually the mail agent contacts the local SMTP server and it queues it for delivery to other SMTP server that it can find via the MX record, trying the one with the highest priority first which incendently is the one with the lowest number.
    If that server is using SMTP Authentication, howcome yahoo or
    hotmail authenticate for sending mail to theiruser.
    Hotmails' SMTP server will let you send to anybody,
    most other private SMTP servers generally will
    restrict the domains you can send to.
    I'm a little confused as to what your problem is you
    are connection to SMTP servers to send individuals
    emails? why not just use on SMTP server to send to all
    He is making a SMTP server.
    Back to the original question:
    Since you are checking the MX record for the address it should not be considered to be a relay of mail. The only reason this should happen is if the RCPT is set to something wierd like
    <@HOSTA.ARPA,@HOSTB.ARPA:[email protected]>See RFC 0821 for more information. I am not sure if RFC 0821 is obsoleted, but this should still apply.
    Regards,
    Peter Norell

  • Fetching and relaying mails to a third party email server

    Hi All,
    I have an existing email server sitting in the DMZ handling my company domain ([email protected]). I have installed OCS on the internal network. I want al my users to use OCS with the same email address they use on the existing email server ([email protected]).
    For this purpose, the smtp outbound server on oracle email relays to the mail server sitting in the DMZ. This works fine.
    However, I also want inbound emails coming to the external mail server to be delivered to Oracle mail server. I am using fetchmail for that. The fetchmail daemon does a pop on the external mail server and smtp to the oracle email server.
    The problem is that is goes into a loop. When I get an inbound email on the external email server, it gets fetched (via fetchmail) and smtp to my OCS account. However, the OCS outbound SMTP server immediately relays it again to the external email server. And this results in a continuis loop.
    I have searched the internet and this forum for a solution. There was some mention about sending the fetched emails from the external server to OCS mail via IMAP-Append rather than SMTP. However, I have no idea how to enable that on fetchmail (or if that works on OCS).
    Has anyone faced a similar problem or has some soluiton to this issue.
    Thanks for the help.

    My client wants to keep their externally hosted (highly available) mail server.
    They want OCS internally.
    They want the external mail server to be the recognised MX host.
    They want OCS to pull mail from the external server, or the mail to be pushed (if there is a guarantee of delivery).
    Thanks

  • IIS SMTP Relay

    We are using windows server 2008 Server R2. We installed IIS and the SMTP relay component. It is setup to relay mail to our exchange 2010 CAS server. All internal mail is relaying properly on this server to the exchange 2010 CAS server to internal email
    addresses. When someone tries to send to a recipient outside the organization such as to domain name hotmail.com, gmail.com microsoft .com, it does not relay the message. When I check the logs it looks like it does not even relay the external email address
    to the cas server.
    The error message we get is below. Please assist in what is wrong.
    Delivery has failed to these recipients or groups:
    [email protected]
    Your message wasn't delivered due to a permission or security issue. It may have been rejected by a moderator, the address may only accept e-mail from certain senders, or another restriction may be preventing delivery.
    Diagnostic information for administrators:
    Generating server:PRI.cross.com
    [email protected]
    #< #5.7.1 smtp;550 5.7.1 Unable to relay> #SMTP#
    Original message headers:
    Received: from HH-DATAserver ([192.111.111.2]) by PRI.cross.com with
    Microsoft SMTPSVC(7.5.7601.17514); Wed, 7 May 2014 20:12:03 -0300
    From: hh-dataserver <[email protected]>
    To: <[email protected]>
    Date: Wed, 7 May 2014 18:12:03 -0500
    Subject: test messase
    X-Mailer: SMTP Mail Component
    MIME-Version: 1.0
    Content-Type: text/plain; charset="us-ascii"
    Return-Path: [email protected]
    Message-ID: <[email protected]>
    X-OriginalArrivalTime: 07 May 2014 23:12:03.0714 (UTC) FILETIME=[C2029620:01CF6A49]

    Hi,
    Is there any update on this thread?
    Thanks,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Simon Wu
    TechNet Community Support

  • Internal SMTP Relay

    How to configure my server GroupWise 8.2, OES2.3, not to allow sending internal e-mail without authentication? Today, any user can use the email domain to send an email with different names and without authentication.

    Originally Posted by Rogerio Lopes Alves
    How to configure my server GroupWise 8.2, OES2.3, not to allow sending internal e-mail without authentication? Today, any user can use the email domain to send an email with different names and without authentication.
    Hi,
    Do you mean they can do this by using the GroupWise Client? Or is the GWIA itself permitting relay for all servers?
    If the last is the case here, you can disable relaying (which should be disabled by default) within the GWIA settings in ConsoleOne > TAB Access Control > SMTP Relay Settings
    There you can also specify any exceptions that are needed.
    -Willem

  • On my iPad, my outgoing email regularly replies that the email was rejected by the server because it does not allow relaying.  WHat does that mean and how do I make the email go anyway?

    on my iPad, my outgoing mail regularly replies that the email was rejected by the server because it does not allow relaying. What does that mean and how can I make the emails go out?

    Try this.
    Check your username and password in the outgoing mail server setting. Fill it in even of it says that it's optional.
    Settings>Mail, Contacts, Calendars>choose the email account>account name, tap on SMTP (under the 'Outgoing Mail Server' heading) and then tap on your Primary Server and try entering your email username and password and see if that works for you.

  • GWIA SMTP relay restriction doesn't work

    I am running GWIA on SLES 10 SP2 GW703HP4.
    I have the GWIA SMTP Relay Defaults=Prevent message relaying. Exceptions with allow from 192.168.10.3 to * as the 192.168.10.3 is the alert mail server. When I tried to test the SMTP port to GWIA, I got restrict relay error. If I change Relay Default to "Allow message relaying", that is the only time that I can connect from 192.168.10.3 to send SMTP mail via GWIA.
    I have tried to restarted GWIA everytime I make the change but can't get the exception to work?
    Any suggestion?
    Cheer
    Andy

    I deleted the IP address and added the same entry back, then GWIA relay fine.
    Might be I have bad eyes?? Thanks all for the inputs.
    Andy
    Originally Posted by buckesfeld
    * andyj2009 wrote, On 05/20/2010 11:06 PM:
    > Exceptions with allow from 192.168.10.3 to * as the 192.168.10.3 is the
    > alert mail server.
    Note there are two situations where you don't have to tinker with relaying exceptions at all:
    - the alert mail server sends to internal addresses only
    - the alert mail server can do SMTP authentication.
    Uwe
    Novell Knowledge Partner (NKP)
    Please don't send me support related e-mail unless I ask you to do so.

Maybe you are looking for