Quantcast

3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Robert Chalmers
Just to contribute back a little, in case it helps someone else, I have Postfix 3.1.4 installed and running on OSX Sierra 10.12.2  and actually running outside of the native Apple installation.
If you leave it in the default Apple directories, it gets overwritten by OS upgrades. A very bad thing. It undoes lots of work. So I moved it outside of the standard default Apple thing. I have done this because I needed to compile in a lot of things that the Apple stock version doesn’t have.

Even so - be very careful if you install onto Apple, during the Install script phase, to check the default directories that are presented are the ones you want. NOT the system ones.

At the risk of giving people heart attacks, this is my make script. You can see that I am compiling in a number of extra options.

make -f Makefile.init dynamicmaps=yes CCARGS='-DHAS_MYSQL -I/usr/local/include/mysql -DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/opt/local/include/sasl -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DHAS_PCRE -I/opt/local/include -DEF_COMMAND_DIR=\"/usr/local/sbin\" -DEF_CONGIG_DIR=\"/usr/local/etc/postfix\" -DEF_DAEMON_DIR=\"/usr/local/libexec/postfix\" -DEF_DATA_DIR=\"/var/lib/postfix\" -DEF_MAILQ_PATH=\"/usr/local/bin/mailq\" -DEF_HTML_DIR=\"/usr/share/doc/postfix/html\" -DEF_MANPAGE_DIR=\"/usr/local/man\" -DEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" -DEF_QUEUE_DIR=\"/private/var/spool/postfix\" -DEF_README_DIR=\"/usr/share/doc/postfix\" -DEF_SENDMAIL_PATH=\"/usr/local/sbin/sendmail\"' 'AUXLIBS=-L/opt/local/lib -lsasl2 -lssl -lcrypto -licuuc' 'AUXLIBS_MYSQL=-L/usr/local/lib -lmysqlclient -lz -lm' 'AUXLIBS_PCRE=-L/opt/local/lib -lpcre' command_directory=/usr/local/sbin config_directory=/usr/local/etc/postfix meta_directory=/usr/local/etc/postfix daemon_directory=/usr/local/libexec/postfix mailq_path=/usr/bin/mailq newaliases_path=/usr/bin/newaliases sendmail_path=/usr/local/sbin/sendmail shlib_directory=/usr/local/lib/postfix

Upon installation, I have opted not to put the docs and html files onto the setup. I never use them so no point. Answer [no] to those questions.

To start Postscript I use the following plist file. Based in /Library/LaunchDaemons

org.postfix.master.plist

and start it with “sudo load -w org.postfix.master.plist” If you want to stop it completly, use  “sudo unload -w org.postfix.master.plist” otherwise it just keeps respawning.

zeus:LaunchDaemons robert$ cat org.postfix.master.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>org.postfix.master</string>
        <key>Program</key>
        <string>/usr/local/libexec/postfix/master</string>
        <key>ProgramArguments</key>
        <array>
                <string>master</string>
        </array>
                <key>RunAtLoad</key>
        <true/>
         <key>KeepAlive</key>
                         <false/>
</dict>
</plist>


If that helps anyone in the future. Good. You will probably have to tweek stuff for your particular installation, but it works for me, so I’m a happy bunny.
And finally, thanks for the very kind past help that has been offered to me on this list. I’m not the smartest kid on the block but I struggle along.

Robert

 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Robert Chalmers
Do you mean like this … where ‘postfix’ shows up.?

Jan  3 09:58:20 zeus postfix/smtpd[31070]: connect from unknown[115.71.5.5]
Jan  3 09:58:27 zeus postfix/smtpd[31070]: warning: unknown[115.71.5.5]: SASL PLAIN authentication failed:
Jan  3 09:58:29 zeus postfix/smtpd[31070]: disconnect from unknown[115.71.5.5] ehlo=1 auth=0/1 quit=1 commands=2/3
Jan  3 09:58:43 zeus postfix/anvil[22802]: statistics: max connection rate 2/60s for (smtp:91.196.88.4) at Jan  3 09:48:48
Jan  3 09:58:43 zeus postfix/anvil[22802]: statistics: max connection count 1 for (smtp:213.105.137.181) at Jan  3 09:48:43
Jan  3 09:58:43 zeus postfix/anvil[22802]: statistics: max cache size 3 at Jan  3 09:48:58
Jan  3 10:00:41 zeus postfix/master[91]: terminating on signal 15
Jan  3 14:06:10 zeus postfix/policy-spf[21275]: handler sender_policy_framework: is decisive.
Jan  3 14:06:10 zeus postfix/policy-spf[21275]: : Policy action=PREPEND Received-SPF: pass (




> On 3 Jan 2017, at 15:20, Viktor Dukhovni <[hidden email]> wrote:
>
>
>> On Jan 3, 2017, at 9:37 AM, Robert Chalmers <[hidden email]> wrote:
>>
>> Just to contribute back a little, in case it helps someone else, I have Postfix 3.1.4 installed and running on OSX Sierra 10.12.2  and actually running outside of the native Apple installation.
>
> Have you figured out how to get more useful logging working on Sierra?
> The Postfix syslog_name seems to no longer be logged, or at least not
> displayed.  With:
>
>    # log show --info --style syslog
>
> I get output similar to:
>
>    2017-01-03 10:11:13.946120-0500  localhost smtpd[7301]: (libpostfix-util.dylib) disconnect from localhost[127.0.0.1] ehlo=1 starttls=0/1 commands=1/2
>
> In which the "postfix/" syslog_name is nowhere in sight.  Makes multi-instance
> logging rather opaque, and breaks the usual way to distinguish submission logging
> from port 25 logging, ...
>
> --
> Viktor.
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Viktor Dukhovni

> On Jan 3, 2017, at 10:33 AM, Robert Chalmers <[hidden email]> wrote:
>
> Do you mean like this … where ‘postfix’ shows up.?
>
> Jan  3 09:58:20 zeus postfix/smtpd[31070]: connect from unknown[115.71.5.5]

Yes.  What did you do to get real syslog messages with MacOS/X Sierra?

>> I get output similar to:
>>
>>   2017-01-03 10:11:13.946120-0500  localhost smtpd[7301]: (libpostfix-util.dylib) disconnect from localhost[127.0.0.1] ehlo=1 starttls=0/1 commands=1/2
>>
>> In which the "postfix/" syslog_name is nowhere in sight.  Makes multi-instance
>> logging rather opaque, and breaks the usual way to distinguish submission logging
>> from port 25 logging, ...

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

launchd plist files on MacOSX

Jim Reid
In reply to this post by Robert Chalmers

> On 3 Jan 2017, at 14:37, Robert Chalmers <[hidden email]> wrote:
>
> To start Postscript I use the following plist file. Based in /Library/LaunchDaemons
>
> org.postfix.master.plist

Don’t do that. Pick names for your own plist files that don’t clash with the ones Apple use. There will be confusion if your plist files (in /Library/LaunchDaemons or wherever) have the same names as those in /System/Library/LaunchDaemons. For example, you think you’re running your own instance of postfix when the OS is actually running Apple’s. Or vice versa. Or both end up running and launchd eventually kills one of them since it’s had to restart that daemon too often because the daemon’s unable to listen on a port already used by the other instance.

It gets even worse if you install Apple Server software. That includes a script (cron job?) which secretly tells launchd to unload things like whatever bind and postfix is running and replace them with the Server-flavoured versions which are controlled from  /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons.

I found this out the hard way.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Robert Chalmers
In reply to this post by Viktor Dukhovni
@Viktor
Sorry - I have no idea now how I did that. Something I’ve done over the years has turned it on, and so it’s stayed on?

/etc/syslog.conf is now configured here

zeus:postfix robert$ cat /etc/syslog.conf
# Note that flat file logs are now configured in /etc/asl.conf

Beware of that file. It refers to files that are not normal text files.

But I’ve made no changes to that? not that I know of.


There’s something in the back of my mind regarding this, but I’ll have to mull it over for a while and see if I can remember what it is.

Any logging in postfix is here in my case

main.cf
# DEBUGGING CONTROL
#
# The debug_peer_level parameter specifies the increment in verbose
# logging level when an SMTP client or server host name or address
# matches a pattern in the debug_peer_list parameter.
#
debug_peer_level = 2
...
#Debug ...
smtpd_tls_loglevel = 2

and in

master.cf
dnsblog   unix  -       -       n       -       0       dnsblog
tlsproxy  unix  -       -       n       -       0       tlsproxy
submission inet n       -       n       -       -       smtpd
  -o smtpd_tls_security_level=encrypt
  -o syslog_name=postfix/submission
  -o smtpd_milters=$non_smtpd_milters

Sorry, I know that’s not much help, but it’s one of those things I’ve set and forgotten..




> On 3 Jan 2017, at 16:01, Viktor Dukhovni <[hidden email]> wrote:
>
>
>> On Jan 3, 2017, at 10:33 AM, Robert Chalmers <[hidden email]> wrote:
>>
>> Do you mean like this … where ‘postfix’ shows up.?
>>
>> Jan  3 09:58:20 zeus postfix/smtpd[31070]: connect from unknown[115.71.5.5]
>
> Yes.  What did you do to get real syslog messages with MacOS/X Sierra?
>
>>> I get output similar to:
>>>
>>>  2017-01-03 10:11:13.946120-0500  localhost smtpd[7301]: (libpostfix-util.dylib) disconnect from localhost[127.0.0.1] ehlo=1 starttls=0/1 commands=1/2
>>>
>>> In which the "postfix/" syslog_name is nowhere in sight.  Makes multi-instance
>>> logging rather opaque, and breaks the usual way to distinguish submission logging
>>> from port 25 logging, ...
>
> --
> Viktor.
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: launchd plist files on MacOSX

Robert Chalmers
In reply to this post by Jim Reid
Thanks
Yes, I’m aware of that problem. Got caught the same way. However … after an update, I just check that the plist file hasn’t been modified, and so far so good. I don’t know why it isn’t, but maybe someone at Apple has decided that they can leave some things alone.

Initially it was a problem, but not the last two times. But I still check.

I haven’t installed the Server software. No need for it in my case. I’d rather roll my own :-)



> On 3 Jan 2017, at 16:15, Jim Reid <[hidden email]> wrote:
>
>
>> On 3 Jan 2017, at 14:37, Robert Chalmers <[hidden email]> wrote:
>>
>> To start Postscript I use the following plist file. Based in /Library/LaunchDaemons
>>
>> org.postfix.master.plist
>
> Don’t do that. Pick names for your own plist files that don’t clash with the ones Apple use. There will be confusion if your plist files (in /Library/LaunchDaemons or wherever) have the same names as those in /System/Library/LaunchDaemons. For example, you think you’re running your own instance of postfix when the OS is actually running Apple’s. Or vice versa. Or both end up running and launchd eventually kills one of them since it’s had to restart that daemon too often because the daemon’s unable to listen on a port already used by the other instance.
>
> It gets even worse if you install Apple Server software. That includes a script (cron job?) which secretly tells launchd to unload things like whatever bind and postfix is running and replace them with the Server-flavoured versions which are controlled from  /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons.
>
> I found this out the hard way.
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Larry Stone
In reply to this post by Viktor Dukhovni
I seem to be missing a couple of messages in this thread but I upgraded my
laptop (I use it as a test system as well) to Sierra over the weekend and
am getting normal logging without doing anything special. My Postfix is in
/usr/local (I moved completely away from the Apple directories for the
server stuff I do).

Postfix (I'm still on 3.1.1) ran as previously built (no need to re-make
under Sierra although I have tested that it builds OK) (in fact all the
server software I now run runs as previously built).

So maybe the question is what did you (Viktor) do that is causing the
different logging format? Did you upgrade from El Capitan or is it a fresh
install? It looks like yours are going through Apple's new (and IMHO not
as good) log facility rather than syslog (that's the same format I see for
TimeMachine log messages extracted from the new log facility; e.g.
2017-01-01 06:18:18.094145-0600  localhost backupd[13915]: (TimeMachine)
[com.apple.TimeMachine.TMLogInfo] Backup completed successfully.

-- Larry Stone
    [hidden email]

On Tue, 3 Jan 2017, Viktor Dukhovni wrote:

>
>> On Jan 3, 2017, at 10:33 AM, Robert Chalmers <[hidden email]> wrote:
>>
>> Do you mean like this ? where ?postfix? shows up.?
>>
>> Jan  3 09:58:20 zeus postfix/smtpd[31070]: connect from unknown[115.71.5.5]
>
> Yes.  What did you do to get real syslog messages with MacOS/X Sierra?
>
>>> I get output similar to:
>>>
>>>   2017-01-03 10:11:13.946120-0500  localhost smtpd[7301]: (libpostfix-util.dylib) disconnect from localhost[127.0.0.1] ehlo=1 starttls=0/1 commands=1/2
>>>
>>> In which the "postfix/" syslog_name is nowhere in sight.  Makes multi-instance
>>> logging rather opaque, and breaks the usual way to distinguish submission logging
>>> from port 25 logging, ...
>
> --
> Viktor.
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Larry Stone
Viktor, did you ever figure out the logging issue? I just tried upgrading my test system to Postfix 3.1.4 (from 3.1.1) and the logging started to go to the new Apple logging system. Immediately fell back to 3.1.1 and the logging is back to /var/log/mail.log.

My initial make command (based on what you’ve previously suggested is):
make -f Makefile.init makefiles CCARGS='-DUSE_TLS -I/usr/local/ssl/include \
-DUSE_SASL_AUTH \
-DUSE_CYRUS_SASL \
-I/usr/local/include/sasl \
-DDEF_SERVER_SASL_TYPE=\"dovecot\"\
-DDEF_COMMAND_DIR=\"/usr/local/sbin\"\
-DDEF_CONFIG_DIR=\"/usr/local/etc/postfix\"\
-DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\"\
-DHAS_PCRE -I/usr/local/include' \
AUXLIBS='-L/usr/local/lib -lpcre -L/usr/local/ssl/lib -lssl -lcrypto \
-L/usr/local/lib -lsasl2’

--
Larry Stone
[hidden email]





> On Jan 3, 2017, at 6:51 AM, Larry Stone <[hidden email]> wrote:
>
> I seem to be missing a couple of messages in this thread but I upgraded my laptop (I use it as a test system as well) to Sierra over the weekend and am getting normal logging without doing anything special. My Postfix is in /usr/local (I moved completely away from the Apple directories for the server stuff I do).
>
> Postfix (I'm still on 3.1.1) ran as previously built (no need to re-make under Sierra although I have tested that it builds OK) (in fact all the server software I now run runs as previously built).
>
> So maybe the question is what did you (Viktor) do that is causing the different logging format? Did you upgrade from El Capitan or is it a fresh install? It looks like yours are going through Apple's new (and IMHO not as good) log facility rather than syslog (that's the same format I see for TimeMachine log messages extracted from the new log facility; e.g.
> 2017-01-01 06:18:18.094145-0600  localhost backupd[13915]: (TimeMachine) [com.apple.TimeMachine.TMLogInfo] Backup completed successfully.
>
> -- Larry Stone
>   [hidden email]
>
> On Tue, 3 Jan 2017, Viktor Dukhovni wrote:
>
>>
>>> On Jan 3, 2017, at 10:33 AM, Robert Chalmers <[hidden email]> wrote:
>>>
>>> Do you mean like this ? where ?postfix? shows up.?
>>>
>>> Jan  3 09:58:20 zeus postfix/smtpd[31070]: connect from unknown[115.71.5.5]
>>
>> Yes.  What did you do to get real syslog messages with MacOS/X Sierra?
>>
>>>> I get output similar to:
>>>>
>>>>  2017-01-03 10:11:13.946120-0500  localhost smtpd[7301]: (libpostfix-util.dylib) disconnect from localhost[127.0.0.1] ehlo=1 starttls=0/1 commands=1/2
>>>>
>>>> In which the "postfix/" syslog_name is nowhere in sight.  Makes multi-instance
>>>> logging rather opaque, and breaks the usual way to distinguish submission logging
>>>> from port 25 logging, ...
>>
>> --
>> Viktor.
>>
>>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Viktor Dukhovni
On Sat, Feb 18, 2017 at 07:37:27AM -1000, Larry Stone wrote:

> Viktor, did you ever figure out the logging issue?

No.  Insufficient time to figure out the innards of the new Apple
logging subsystem.  My laptop is just for Postfix development, so
the issue has not as yet warranted much effort on my part.

> I just tried upgrading my test system to Postfix 3.1.4 (from 3.1.1) and
> the logging started to go to the new Apple logging system. Immediately
> fell back to 3.1.1 and the logging is back to /var/log/mail.log.

Is the 3.1.1 build also your own?  Built under the same O/S version?

> My initial make command (based on what you’ve previously suggested is):
> make -f Makefile.init makefiles CCARGS='-DUSE_TLS -I/usr/local/ssl/include \
> -DUSE_SASL_AUTH \
> -DUSE_CYRUS_SASL \
> -I/usr/local/include/sasl \
> -DDEF_SERVER_SASL_TYPE=\"dovecot\"\
> -DDEF_COMMAND_DIR=\"/usr/local/sbin\"\
> -DDEF_CONFIG_DIR=\"/usr/local/etc/postfix\"\
> -DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\"\
> -DHAS_PCRE -I/usr/local/include' \
> AUXLIBS='-L/usr/local/lib -lpcre -L/usr/local/ssl/lib -lssl -lcrypto \
> -L/usr/local/lib -lsasl2’

Looks ok.  Postfix does not introduce new features in patch releases,
so there should be nothing different in this regard between 3.1.1 and
3.1.4.  The only thing that comes to mind that your build of 3.1.4 is
newer.  Perhaps older binaries use an older syslog API?

If you have a pre-Sierra MacOS/X machine, perhaps building 3.1.4 there
and copying the binaries will yield the same behaviour you see with
3.1.1?

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Larry Stone

> On Feb 18, 2017, at 8:11 AM, Viktor Dukhovni <[hidden email]> wrote:
>
> On Sat, Feb 18, 2017 at 07:37:27AM -1000, Larry Stone wrote:
>
>> Viktor, did you ever figure out the logging issue?
>
> No.  Insufficient time to figure out the innards of the new Apple
> logging subsystem.  My laptop is just for Postfix development, so
> the issue has not as yet warranted much effort on my part.
>
>> I just tried upgrading my test system to Postfix 3.1.4 (from 3.1.1) and
>> the logging started to go to the new Apple logging system. Immediately
>> fell back to 3.1.1 and the logging is back to /var/log/mail.log.
>
> Is the 3.1.1 build also your own?  Built under the same O/S version?

Arghhhh! My usual approach to OS X upgrades is to first clone the disk and upgrade the copy as a test. I must have done my test rebuild of Postfix on the clone, saw that it was functional but missed the logging issue, then when I upgraded for real, never rebuilt Postfix since the old version built under El Capitan ran fine. Rebuilding 3.1.1 under Sierra also uses the new MacOS logging so fell back again to the El Capitan built version.

> If you have a pre-Sierra MacOS/X machine, perhaps building 3.1.4 there
> and copying the binaries will yield the same behaviour you see with
> 3.1.1?

I do but it’s all the way back at Mavericks (10.9.5). I recently recommissioned an old MacBookPro (I never could get it to upgrade beyond where it is) to use as a Fax Server since Sierra discontinued support for USB Fax Modems. At some point, I’ll try building 3.1.4 there and see what happens and if I can move the built files.

But, I’m probably good with 3.1.1 for a long time. My Postfix is no longer Internet facing (I used to run my own mail server but now have that contracted out to an ISP) so I just use Postfix to get internally generated email (including the aforementioned fax server which emails incoming faxes) out to my ISP.

--
Larry Stone
[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 3.1.4 Compiled and Installed on OSX Sierra 10.12.2 Successful.

Larry Stone



> On Feb 18, 2017, at 10:39 AM, Larry Stone <[hidden email]> wrote:
>
>>
>> On Feb 18, 2017, at 8:11 AM, Viktor Dukhovni <[hidden email]> wrote:
>>
>
>> If you have a pre-Sierra MacOS/X machine, perhaps building 3.1.4 there
>> and copying the binaries will yield the same behaviour you see with
>> 3.1.1?
>
> I do but it’s all the way back at Mavericks (10.9.5). I recently recommissioned an old MacBookPro (I never could get it to upgrade beyond where it is) to use as a Fax Server since Sierra discontinued support for USB Fax Modems. At some point, I’ll try building 3.1.4 there and see what happens and if I can move the built files.

Tried and it works. So now running 3.1.4 on Sierra with the build having been done on Mavericks.

But now, and longer term, see if there’s a way to build under Sierra with the old syslog logging.
 
--
Larry Stone
[hidden email]


Loading...