CruxIT

Q: Profile Manager sending email to the wrong domain

This looks to be an issue because our server is on a sub-domain and the mail service is running on a separate server.

 

In short, the email the server is trying to send is from=<noreply@mini.mydomain.com>

 

The server's host name is <mini.mydomain.com> and in the email configuration the "Domains" list is set up to only have the <mydomain.com> set up.

 

What I can't figure out is why the server is not using the mail domain that is configured?

 

Lastly I've also set up to use the "relay outgoing mail through ISP" as we are not using OS X Server for our mail server we are using a hosted mail service and the SMTP configuration for that server is set up correctly, port and all.

Mac mini (Late 2012), Mac OS X (10.7.5)

Posted on Feb 6, 2015 10:41 AM

Close

Q: Profile Manager sending email to the wrong domain

  • All replies
  • Helpful answers

  • by R_Bryson,

    R_Bryson R_Bryson Nov 30, 2015 7:40 AM in response to CruxIT
    Level 1 (0 points)
    Nov 30, 2015 7:40 AM in response to CruxIT

    Did you ever resolve this?

     

    I have the exact same situation.

     

    The mail server we use will not accept this default sender address - how can I set/change this?

     

    Thanks.

  • by UptimeJeff,

    UptimeJeff UptimeJeff Dec 3, 2015 6:50 PM in response to R_Bryson
    Level 4 (3,477 points)
    Dec 3, 2015 6:50 PM in response to R_Bryson

    Try this....

    Edit myorigin in postfix config.

     

    Always a good idea to check the current value before making a change

    /Applications/Server.app//Contents/ServerRoot/usr/sbin/postconf myorigin

    The default is

    myorigin = $myhostname

     

    While we're at it, check the value of myhostname

    /Applications/Server.app//Contents/ServerRoot/usr/sbin/postconf myorigin

    You'll notice its set to mini.mydomain.com

    Thats why outbound mail is using the hostname as the origin(domain)


    Change the value to your real domain

    /Applications/Server.app//Contents/ServerRoot/usr/sbin/postconf -e "myorigin=mac007.com"

     

    Restart mail

    /Applications/Server.app//Contents/ServerRoot/usr/sbin/postfix reload

     

    HTH

  • by R_Bryson,

    R_Bryson R_Bryson Dec 10, 2015 7:46 AM in response to UptimeJeff
    Level 1 (0 points)
    Dec 10, 2015 7:46 AM in response to UptimeJeff

    Thank you for this suggestion!

     

    I've had a go at it, unfortunately I get this back:

     

    postconf: fatal: open /etc/postfix/main.cf.tmp: Permission denied

     

    This is on a new OS X Yosemite 10.10.5 running Server 5.0.15, that has only had Profile Manager setup [not completely however i.e. software deployment was not done].

     

    I've set Read & Write permissions to the main.cf file for the local admin user [that I'm using for all of this]. I can't find the main.cf.tmp file it throws up.

     

    Any further advice?

  • by UptimeJeff,

    UptimeJeff UptimeJeff Dec 10, 2015 11:59 AM in response to R_Bryson
    Level 4 (3,477 points)
    Dec 10, 2015 11:59 AM in response to R_Bryson

    Go ahead and edit it manually

      /Library/Server/Mail/Config/postfix/main.cf


    go way down until you see the last occurrence of myorigin.

    The last uncommented occurence is the one that counts.


    if you find

    #myorigin = $mydomain


    change to (note, removed the #)

    myorigin = yourdomain.com


    Stop/Start mail service

  • by R_Bryson,

    R_Bryson R_Bryson Dec 11, 2015 2:35 AM in response to UptimeJeff
    Level 1 (0 points)
    Dec 11, 2015 2:35 AM in response to UptimeJeff

    Hi again

     

    I managed to make the change manually and it has had an effect but I think I'm still missing something.

     

    I'll post what comes up on the STMP log but before I do - FYI I am sending an invite to a user in profile manager, named 'srvadmin'. I've set his email address as 'hxsapple@holycross.kingston.sch.uk'. We're using a relay and I think it is because of the 'noreply' email address that we're getting bounced.

     

    Here is the log:

     

    Dec 11 10:28:01 xnet-macsrv01.school postfix/master[4390]: daemon started -- version 2.11.0, configuration /Library/Server/Mail/Config/postfix

    Dec 11 10:28:20 xnet-macsrv01.school postfix/pickup[4400]: DCA28559DD1: uid=220 from=<noreply@xnet-macsrv01.school>

    Dec 11 10:28:20 xnet-macsrv01.school postfix/cleanup[4475]: DCA28559DD1: message-id=<566aa544d3131_11763ff0190280d41089a@xnet-macsrv01.school.mail>

    Dec 11 10:28:20 xnet-macsrv01.school postfix/qmgr[4401]: DCA28559DD1: from=<noreply@xnet-macsrv01.school>, size=38600, nrcpt=1 (queue active)

    Dec 11 10:28:21 xnet-macsrv01.school postfix/smtpd[4482]: connect from localhost[127.0.0.1]

    Dec 11 10:28:21 xnet-macsrv01.school postfix/smtpd[4482]: 566F5559DF8: client=localhost[127.0.0.1]

    Dec 11 10:28:21 xnet-macsrv01.school postfix/cleanup[4475]: 566F5559DF8: message-id=<566aa544d3131_11763ff0190280d41089a@xnet-macsrv01.school.mail>

    Dec 11 10:28:21 xnet-macsrv01.school postfix/qmgr[4401]: 566F5559DF8: from=<noreply@xnet-macsrv01.school>, size=39086, nrcpt=1 (queue active)

    Dec 11 10:28:21 xnet-macsrv01.school postfix/smtp[4477]: DCA28559DD1: to=<hxsapple@holycross.kingston.sch.uk>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.48, delays=0.02/0.06/0.01/0.38, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 566F5559DF8)

    Dec 11 10:28:21 xnet-macsrv01.school postfix/qmgr[4401]: DCA28559DD1: removed

    Dec 11 10:28:21 xnet-macsrv01.school postfix/smtp[4484]: Untrusted TLS connection established to mailrelay.lgfl.org.uk[172.30.178.12]:25: TLSv1 with cipher ADH-AES256-SHA (256/256 bits)

    Dec 11 10:28:21 xnet-macsrv01.school postfix/smtp[4484]: 566F5559DF8: to=<hxsapple@holycross.kingston.sch.uk>, relay=mailrelay.lgfl.org.uk[172.30.178.12]:25, delay=0.14, delays=0/0.03/0.07/0.04, dsn=5.7.1, status=bounced (host mailrelay.lgfl.org.uk[172.30.178.12] said: 554 5.7.1 <hxsapple@holycross.kingston.sch.uk>: Recipient address rejected: Blocked by policy (in reply to RCPT TO command))

    Dec 11 10:28:21 xnet-macsrv01.school postfix/cleanup[4475]: 7B5F1559DFC: message-id=<20151211102821.7B5F1559DFC@xnet-macsrv01.school>

    Dec 11 10:28:21 xnet-macsrv01.school postfix/bounce[4487]: 566F5559DF8: sender non-delivery notification: 7B5F1559DFC

    Dec 11 10:28:21 xnet-macsrv01.school postfix/qmgr[4401]: 7B5F1559DFC: from=<>, size=41319, nrcpt=1 (queue active)

    Dec 11 10:28:21 xnet-macsrv01.school postfix/qmgr[4401]: 566F5559DF8: removed

    Dec 11 10:28:21 xnet-macsrv01.school postfix/local[4488]: error: od[getpwnam_ext]: no record for user noreply

    Dec 11 10:28:21 xnet-macsrv01.school postfix/pipe[4489]: 7B5F1559DFC: to=<noreply@xnet-macsrv01.school>, relay=dovecot, delay=0.08, delays=0/0.01/0/0.07, dsn=5.1.1, status=bounced (user unknown)

    Dec 11 10:28:21 xnet-macsrv01.school postfix/qmgr[4401]: 7B5F1559DFC: removed​

     

    What do you think? I've been struggling to find where I can set the domain for the 'noreply' email!

     

    Thanks - Rory.