MacOS High Sierra (10.13) and Postfix relaying

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

MacOS High Sierra (10.13) and Postfix relaying

sergio.pozzetti
Hi all,

I use postfix to relay e-mail to a Google Account, which has been working
flawlessly up until now.
I'm running out of options here. After upgrading to MacOS High Sierra,
postfix simply won't start:

sh-3.2# postfix -v start
postfix: name_mask: ipv4
postfix: inet_addr_local: configured 2 IPv4 addresses
postfix: Postfix is running with backwards-compatible default settings
postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
postfix: To disable backwards compatibility use "postconf
compatibility_level=2" and "postfix reload"
postfix/postfix-script: starting the Postfix mail system
postfix/postfix-script: fatal: mail system startup failed

All I get in /var/log/mai.log aside from this is "fatal: daemon
initialization failure".

(1) I can't figure out where postfix might be dumping more information;
(2) I didn't change anything in my main.cf other than commenting out
"mydomain_fallback = localhost" which was apparently deprecated.

Other than that my postconf -n output looks like this:

biff = no
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
$daemon_directory/$process_name $process_id & sleep 5
html_directory = /usr/share/doc/postfix/html
inet_protocols = ipv4
mail_owner = _postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 10485760
mynetworks = 127.0.0.0/8, [::1]/128
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost = smtp.gmail.com:587
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = login
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_use_tls = yes
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated
permit
smtpd_tls_ciphers = medium
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550

Any help would be appreciated.

--
Sergio



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: MacOS High Sierra (10.13) and Postfix relaying

Larry Stone
I have run a test upgrade to High Sierra and Postfix ran fine. I currently only use Postfix to relay mail generated by system services on the Macintosh to my external mail service. Postfix started fine and a test message was sent using the sendmail command which made it out.

Postfix version is the latest 3.2.3. However, due to the current Apple logging system, I build (make) Postfix on an older system running the final version of Mavericks (10.9.5) and then copy the build directory to the target system to run make upgrade.

--
Larry Stone
[hidden email]





> On Oct 27, 2017, at 5:11 AM, sergio.pozzetti <[hidden email]> wrote:
>
> Hi all,
>
> I use postfix to relay e-mail to a Google Account, which has been working
> flawlessly up until now.
> I'm running out of options here. After upgrading to MacOS High Sierra,
> postfix simply won't start:
>
> sh-3.2# postfix -v start
> postfix: name_mask: ipv4
> postfix: inet_addr_local: configured 2 IPv4 addresses
> postfix: Postfix is running with backwards-compatible default settings
> postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
> postfix: To disable backwards compatibility use "postconf
> compatibility_level=2" and "postfix reload"
> postfix/postfix-script: starting the Postfix mail system
> postfix/postfix-script: fatal: mail system startup failed
>
> All I get in /var/log/mai.log aside from this is "fatal: daemon
> initialization failure".
>
> (1) I can't figure out where postfix might be dumping more information;
> (2) I didn't change anything in my main.cf other than commenting out
> "mydomain_fallback = localhost" which was apparently deprecated.
>
> Other than that my postconf -n output looks like this:
>
> biff = no
> command_directory = /usr/sbin
> daemon_directory = /usr/libexec/postfix
> data_directory = /var/lib/postfix
> debug_peer_level = 2
> debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
> $daemon_directory/$process_name $process_id & sleep 5
> html_directory = /usr/share/doc/postfix/html
> inet_protocols = ipv4
> mail_owner = _postfix
> mailbox_size_limit = 0
> mailq_path = /usr/bin/mailq
> manpage_directory = /usr/share/man
> message_size_limit = 10485760
> mynetworks = 127.0.0.0/8, [::1]/128
> newaliases_path = /usr/bin/newaliases
> queue_directory = /private/var/spool/postfix
> readme_directory = /usr/share/doc/postfix
> recipient_delimiter = +
> relayhost = smtp.gmail.com:587
> sample_directory = /usr/share/doc/postfix/examples
> sendmail_path = /usr/sbin/sendmail
> setgid_group = _postdrop
> smtp_sasl_auth_enable = yes
> smtp_sasl_mechanism_filter = login
> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
> smtp_sasl_security_options = noanonymous
> smtp_tls_security_level = encrypt
> smtp_use_tls = yes
> smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated
> permit
> smtpd_tls_ciphers = medium
> tls_random_source = dev:/dev/urandom
> unknown_local_recipient_reject_code = 550
>
> Any help would be appreciated.
>
> --
> Sergio
>
>
>
> --
> Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html

Reply | Threaded
Open this post in threaded view
|

Re: MacOS High Sierra (10.13) and Postfix relaying

sergio.pozzetti
In reply to this post by sergio.pozzetti
Got it work. Finally.

It seems the fact it was attempting to run in compatibility mode screwed
everything up.
So I:

. Started a main.cf from scratch from the main.cf.default
. ran postconf compatibility_level=2

Voilà. This worked for me. I'm able to relay to Gmail again:

command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
$daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_protocols = ipv4
mail_owner = _postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix
relayhost = smtp.gmail.com:587
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = plain
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: MacOS High Sierra (10.13) and Postfix relaying

James Reynolds
In reply to this post by Larry Stone
Larry,
Can you explain what you mean by the current Apple logging system?  You mean the unified logging?  Are you avoiding this by building postfix on 10.9.5 and then copying it to a 10.12+ computer so that it logs to /var/log/system.log instead?  You haven't had any other problems doing this?

I ask because I need to update my mail server that's running on macos.

James Reynolds
Sr Systems Administrator
Department of Biology
The University of Utah
801-585-3086

> On Oct 27, 2017, at 6:45 AM, Larry Stone <[hidden email]> wrote:
>
> I have run a test upgrade to High Sierra and Postfix ran fine. I currently only use Postfix to relay mail generated by system services on the Macintosh to my external mail service. Postfix started fine and a test message was sent using the sendmail command which made it out.
>
> Postfix version is the latest 3.2.3. However, due to the current Apple logging system, I build (make) Postfix on an older system running the final version of Mavericks (10.9.5) and then copy the build directory to the target system to run make upgrade.
>
> --
> Larry Stone
> [hidden email]
>
>
>
>
>
>> On Oct 27, 2017, at 5:11 AM, sergio.pozzetti <[hidden email]> wrote:
>>
>> Hi all,
>>
>> I use postfix to relay e-mail to a Google Account, which has been working
>> flawlessly up until now.
>> I'm running out of options here. After upgrading to MacOS High Sierra,
>> postfix simply won't start:
>>
>> sh-3.2# postfix -v start
>> postfix: name_mask: ipv4
>> postfix: inet_addr_local: configured 2 IPv4 addresses
>> postfix: Postfix is running with backwards-compatible default settings
>> postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
>> postfix: To disable backwards compatibility use "postconf
>> compatibility_level=2" and "postfix reload"
>> postfix/postfix-script: starting the Postfix mail system
>> postfix/postfix-script: fatal: mail system startup failed
>>
>> All I get in /var/log/mai.log aside from this is "fatal: daemon
>> initialization failure".
>>
>> (1) I can't figure out where postfix might be dumping more information;
>> (2) I didn't change anything in my main.cf other than commenting out
>> "mydomain_fallback = localhost" which was apparently deprecated.
>>
>> Other than that my postconf -n output looks like this:
>>
>> biff = no
>> command_directory = /usr/sbin
>> daemon_directory = /usr/libexec/postfix
>> data_directory = /var/lib/postfix
>> debug_peer_level = 2
>> debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
>> $daemon_directory/$process_name $process_id & sleep 5
>> html_directory = /usr/share/doc/postfix/html
>> inet_protocols = ipv4
>> mail_owner = _postfix
>> mailbox_size_limit = 0
>> mailq_path = /usr/bin/mailq
>> manpage_directory = /usr/share/man
>> message_size_limit = 10485760
>> mynetworks = 127.0.0.0/8, [::1]/128
>> newaliases_path = /usr/bin/newaliases
>> queue_directory = /private/var/spool/postfix
>> readme_directory = /usr/share/doc/postfix
>> recipient_delimiter = +
>> relayhost = smtp.gmail.com:587
>> sample_directory = /usr/share/doc/postfix/examples
>> sendmail_path = /usr/sbin/sendmail
>> setgid_group = _postdrop
>> smtp_sasl_auth_enable = yes
>> smtp_sasl_mechanism_filter = login
>> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
>> smtp_sasl_security_options = noanonymous
>> smtp_tls_security_level = encrypt
>> smtp_use_tls = yes
>> smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated
>> permit
>> smtpd_tls_ciphers = medium
>> tls_random_source = dev:/dev/urandom
>> unknown_local_recipient_reject_code = 550
>>
>> Any help would be appreciated.
>>
>> --
>> Sergio
>>
>>
>>
>> --
>> Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
>




Reply | Threaded
Open this post in threaded view
|

Re: MacOS High Sierra (10.13) and Postfix relaying

Larry Stone
Exactly although Postfix stuff should go to /var/log/mail.log (mine does). It was Viktor who suggested doing that - he’s much more an expert on the internals involved. I build (make) on 10.9.5, then tar the directory, copy it to the target system, untar, and then make upgrade. Works fine although I’m sure there’s some things Postfix is dependent on that needs to be on both.

I know Viktor was interested in the logging issues but didn’t have time to dig into it but the recent thread about logging tells me as Postfix depends on system logging, the only way to avoid Apple’s unified logging would be to build your own log handler. But that’s something that is way beyond me.

--
Larry Stone
[hidden email]





> On Nov 6, 2017, at 12:10 PM, James Reynolds <[hidden email]> wrote:
>
> Larry,
> Can you explain what you mean by the current Apple logging system?  You mean the unified logging?  Are you avoiding this by building postfix on 10.9.5 and then copying it to a 10.12+ computer so that it logs to /var/log/system.log instead?  You haven't had any other problems doing this?
>
> I ask because I need to update my mail server that's running on macos.
>
> James Reynolds
> Sr Systems Administrator
> Department of Biology
> The University of Utah
> 801-585-3086
>
>> On Oct 27, 2017, at 6:45 AM, Larry Stone <[hidden email]> wrote:
>>
>> I have run a test upgrade to High Sierra and Postfix ran fine. I currently only use Postfix to relay mail generated by system services on the Macintosh to my external mail service. Postfix started fine and a test message was sent using the sendmail command which made it out.
>>
>> Postfix version is the latest 3.2.3. However, due to the current Apple logging system, I build (make) Postfix on an older system running the final version of Mavericks (10.9.5) and then copy the build directory to the target system to run make upgrade.
>>
>> --
>> Larry Stone
>> [hidden email]
>>
>>
>>
>>
>>
>>> On Oct 27, 2017, at 5:11 AM, sergio.pozzetti <[hidden email]> wrote:
>>>
>>> Hi all,
>>>
>>> I use postfix to relay e-mail to a Google Account, which has been working
>>> flawlessly up until now.
>>> I'm running out of options here. After upgrading to MacOS High Sierra,
>>> postfix simply won't start:
>>>
>>> sh-3.2# postfix -v start
>>> postfix: name_mask: ipv4
>>> postfix: inet_addr_local: configured 2 IPv4 addresses
>>> postfix: Postfix is running with backwards-compatible default settings
>>> postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
>>> postfix: To disable backwards compatibility use "postconf
>>> compatibility_level=2" and "postfix reload"
>>> postfix/postfix-script: starting the Postfix mail system
>>> postfix/postfix-script: fatal: mail system startup failed
>>>
>>> All I get in /var/log/mai.log aside from this is "fatal: daemon
>>> initialization failure".
>>>
>>> (1) I can't figure out where postfix might be dumping more information;
>>> (2) I didn't change anything in my main.cf other than commenting out
>>> "mydomain_fallback = localhost" which was apparently deprecated.
>>>
>>> Other than that my postconf -n output looks like this:
>>>
>>> biff = no
>>> command_directory = /usr/sbin
>>> daemon_directory = /usr/libexec/postfix
>>> data_directory = /var/lib/postfix
>>> debug_peer_level = 2
>>> debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
>>> $daemon_directory/$process_name $process_id & sleep 5
>>> html_directory = /usr/share/doc/postfix/html
>>> inet_protocols = ipv4
>>> mail_owner = _postfix
>>> mailbox_size_limit = 0
>>> mailq_path = /usr/bin/mailq
>>> manpage_directory = /usr/share/man
>>> message_size_limit = 10485760
>>> mynetworks = 127.0.0.0/8, [::1]/128
>>> newaliases_path = /usr/bin/newaliases
>>> queue_directory = /private/var/spool/postfix
>>> readme_directory = /usr/share/doc/postfix
>>> recipient_delimiter = +
>>> relayhost = smtp.gmail.com:587
>>> sample_directory = /usr/share/doc/postfix/examples
>>> sendmail_path = /usr/sbin/sendmail
>>> setgid_group = _postdrop
>>> smtp_sasl_auth_enable = yes
>>> smtp_sasl_mechanism_filter = login
>>> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
>>> smtp_sasl_security_options = noanonymous
>>> smtp_tls_security_level = encrypt
>>> smtp_use_tls = yes
>>> smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated
>>> permit
>>> smtpd_tls_ciphers = medium
>>> tls_random_source = dev:/dev/urandom
>>> unknown_local_recipient_reject_code = 550
>>>
>>> Any help would be appreciated.
>>>
>>> --
>>> Sergio
>>>
>>>
>>>
>>> --
>>> Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
>>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: MacOS High Sierra (10.13) and Postfix relaying

James Reynolds
Are you using the postfix that comes with Mac OS X Server?  That is, the version that is pre-configured to use dovecot, spamassasin, clamav, and ldap?  Or are you configuring postfix from scratch?

James


> On Nov 6, 2017, at 11:19 AM, Larry Stone <[hidden email]> wrote:
>
> Exactly although Postfix stuff should go to /var/log/mail.log (mine does). It was Viktor who suggested doing that - he’s much more an expert on the internals involved. I build (make) on 10.9.5, then tar the directory, copy it to the target system, untar, and then make upgrade. Works fine although I’m sure there’s some things Postfix is dependent on that needs to be on both.
>
> I know Viktor was interested in the logging issues but didn’t have time to dig into it but the recent thread about logging tells me as Postfix depends on system logging, the only way to avoid Apple’s unified logging would be to build your own log handler. But that’s something that is way beyond me.
>
> --
> Larry Stone
> [hidden email]
>
>
>
>
>
>> On Nov 6, 2017, at 12:10 PM, James Reynolds <[hidden email]> wrote:
>>
>> Larry,
>> Can you explain what you mean by the current Apple logging system?  You mean the unified logging?  Are you avoiding this by building postfix on 10.9.5 and then copying it to a 10.12+ computer so that it logs to /var/log/system.log instead?  You haven't had any other problems doing this?
>>
>> I ask because I need to update my mail server that's running on macos.
>>
>> James Reynolds
>> Sr Systems Administrator
>> Department of Biology
>> The University of Utah
>> 801-585-3086
>>
>>> On Oct 27, 2017, at 6:45 AM, Larry Stone <[hidden email]> wrote:
>>>
>>> I have run a test upgrade to High Sierra and Postfix ran fine. I currently only use Postfix to relay mail generated by system services on the Macintosh to my external mail service. Postfix started fine and a test message was sent using the sendmail command which made it out.
>>>
>>> Postfix version is the latest 3.2.3. However, due to the current Apple logging system, I build (make) Postfix on an older system running the final version of Mavericks (10.9.5) and then copy the build directory to the target system to run make upgrade.
>>>
>>> --
>>> Larry Stone
>>> [hidden email]
>>>
>>>
>>>
>>>
>>>
>>>> On Oct 27, 2017, at 5:11 AM, sergio.pozzetti <[hidden email]> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I use postfix to relay e-mail to a Google Account, which has been working
>>>> flawlessly up until now.
>>>> I'm running out of options here. After upgrading to MacOS High Sierra,
>>>> postfix simply won't start:
>>>>
>>>> sh-3.2# postfix -v start
>>>> postfix: name_mask: ipv4
>>>> postfix: inet_addr_local: configured 2 IPv4 addresses
>>>> postfix: Postfix is running with backwards-compatible default settings
>>>> postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
>>>> postfix: To disable backwards compatibility use "postconf
>>>> compatibility_level=2" and "postfix reload"
>>>> postfix/postfix-script: starting the Postfix mail system
>>>> postfix/postfix-script: fatal: mail system startup failed
>>>>
>>>> All I get in /var/log/mai.log aside from this is "fatal: daemon
>>>> initialization failure".
>>>>
>>>> (1) I can't figure out where postfix might be dumping more information;
>>>> (2) I didn't change anything in my main.cf other than commenting out
>>>> "mydomain_fallback = localhost" which was apparently deprecated.
>>>>
>>>> Other than that my postconf -n output looks like this:
>>>>
>>>> biff = no
>>>> command_directory = /usr/sbin
>>>> daemon_directory = /usr/libexec/postfix
>>>> data_directory = /var/lib/postfix
>>>> debug_peer_level = 2
>>>> debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
>>>> $daemon_directory/$process_name $process_id & sleep 5
>>>> html_directory = /usr/share/doc/postfix/html
>>>> inet_protocols = ipv4
>>>> mail_owner = _postfix
>>>> mailbox_size_limit = 0
>>>> mailq_path = /usr/bin/mailq
>>>> manpage_directory = /usr/share/man
>>>> message_size_limit = 10485760
>>>> mynetworks = 127.0.0.0/8, [::1]/128
>>>> newaliases_path = /usr/bin/newaliases
>>>> queue_directory = /private/var/spool/postfix
>>>> readme_directory = /usr/share/doc/postfix
>>>> recipient_delimiter = +
>>>> relayhost = smtp.gmail.com:587
>>>> sample_directory = /usr/share/doc/postfix/examples
>>>> sendmail_path = /usr/sbin/sendmail
>>>> setgid_group = _postdrop
>>>> smtp_sasl_auth_enable = yes
>>>> smtp_sasl_mechanism_filter = login
>>>> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
>>>> smtp_sasl_security_options = noanonymous
>>>> smtp_tls_security_level = encrypt
>>>> smtp_use_tls = yes
>>>> smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated
>>>> permit
>>>> smtpd_tls_ciphers = medium
>>>> tls_random_source = dev:/dev/urandom
>>>> unknown_local_recipient_reject_code = 550
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> --
>>>> Sergio
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
>>>
>>
>>
>>
>>
>