> On 7 Oct 2019, at 01:10, Wietse Venema <[email protected]> wrote:
> 
> Gerben Wierda:
>> For some reason, I don?t get smtpd logging at all. E.g. when sending a mail 
>> from Apple Mail.app MUA, this is all I see:
>> 
>> Oct 06 22:42:21 mail postfix/cleanup[1020]: AE6C5504A6F: 
>> message-id=<[email protected]>
>> Oct 06 22:42:21 mail postfix/qmgr[350]: AE6C5504A6F: 
>> from=<[email protected]>, size=728, nrcpt=1 (queue active)
>> Oct 06 22:42:21 mail postfix/qmgr[350]: AE6C5504A6F: removed
> 
> I note that the SMTP client logging is also missing.
> 
> Also, the smtpd process logs the "map open" error before the process
> goes into the chroot jail and before it drops privileges.

Aha.

> Maybe the missing logging has to do with the time when the first
> event is logged.
> 
> If it is chroot related, try turning off smtpd chroot in master.cf,
> and do "postfix reload”.

Indeed, it is. If I turn chroot from y to n, I get my logging.

Oct 07 01:26:20 mail postfix/master[18890]: daemon started -- version 3.4.6, 
configuration /opt/local/etc/postfix
Oct 07 01:26:38 mail submission/smtpd[18897]: connect from 
hermione.rna.nl[192.168.2.86]
Oct 07 01:26:38 mail submission/smtpd[18897]: 8D1F851E378: 
client=hermione.rna.nl[192.168.2.86]
Oct 07 01:26:38 mail postfix/cleanup[18901]: 8D1F851E378: 
message-id=<[email protected]>
Oct 07 01:26:38 mail postfix/qmgr[18892]: 8D1F851E378: 
from=<[email protected]>, size=683, nrcpt=1 (queue active)
Oct 07 01:26:38 mail postfix/qmgr[18892]: 8D1F851E378: removed
Oct 07 01:27:01 mail postfix/postscreen[18907]: cache 
btree:/opt/local/var/lib/postfix/postscreen_cache full cleanup: retained=0 
dropped=0 entries
Oct 07 01:27:01 mail postfix/postscreen[18907]: CONNECT from [127.0.0.1]:49401 
to [127.0.0.1]:25
Oct 07 01:27:01 mail postfix/postscreen[18907]: WHITELISTED [127.0.0.1]:49401
Oct 07 01:27:01 mail postfix/smtpd[18908]: connect from localhost[127.0.0.1]
Oct 07 01:27:14 mail postfix/smtpd[18908]: disconnect from localhost[127.0.0.1] 
quit=1 commands=1
Oct 07 01:27:38 mail submission/smtpd[18897]: disconnect from 
hermione.rna.nl[192.168.2.86] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 
commands=7

So, now the question becomes, how do I combine chroot smtpd/submission/smtp 
with postlog?

Strange though (for me at least), because I was under the impression that smtpd 
and friends were logging to postlog which is not running in a chroot jail so 
should be able to log everything and not just  qmgr and friends

Here is more from master.cf (now without chroot for smtpd and friends)

smtp      inet  n       -       n       -       1       postscreen
smtpd     pass  -       -       n       -       -       smtpd
dnsblog   unix  -       -       n       -       0       dnsblog
tlsproxy  unix  -       -       n       -       0       tlsproxy

submission inet n       -       n       -       -       smtpd
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_tls_auth_only=yes
  -o syslog_name=submission

# smtps inet port 465 used to be mentioned here, but IANA has removed port
# 465 for 'SMTPS' in 2019. submission is now the only TLS-secured port

# postfix internals (to be found in /opt/local/var/spool/postfix/)
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       y       -       -       smtp
relay     unix  -       -       y       -       -       smtp
        -o syslog_name=postfix/$service_name
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       y       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
postlog   unix-dgram n  -       n       -       1       postlogd


G

> If chroot does not make the difference, try turning off smtpd
> 'unprivileged' in master.cf, and do "postfix reload".
> 
> I don't know why either of these could made a difference, but then
> MacOS is not really UNIX.

Weirdly enough, it is: https://www.opengroup.org/openbrand/register/ 
<https://www.opengroup.org/openbrand/register/> ;-)

> 
>       Wietse

Reply via email to