Re: 3.4 postmap throwing Segmentation:11

2018-11-30 Thread rachalmers
Following up to my last message.

The output from the original 3.1.4 postmap, and then the output from the 3.4
postmap. Both in Verbose mode.
3.1.4 is clean - no segmentation fault, the second has it right at the end.

sudo postfix-3.1.4/bin/postmap -v -q rob...@robert-chalmers.uk
mysql:/usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf
postmap: name_mask: all
postmap: name_mask: host
postmap: inet_addr_local: configured 3 IPv4 addresses
postmap: inet_addr_local: configured 10 IPv6 addresses
postmap: been_here: 127.0.0.1/32: 0
postmap: been_here: 192.168.0.13/32: 0
postmap: been_here: 192.168.0.15/32: 0
postmap: been_here: [::1]/128: 0
postmap: been_here: [fe80::1]/128: 0
postmap: been_here: [fe80::8eb:7f66:fabf:1343]/128: 0
postmap: been_here: [2a02:c7f:3a85:8b00:9817:f063:ff20:472b]/128: 0
postmap: been_here: [fe80::1c53:15c3:2e9:18c9]/128: 0
postmap: been_here: [2a02:c7f:3a85:8b00:c069:e462:ce46:fe91]/128: 0
postmap: been_here: [fe80::f828:78ff:fe45:71fd]/128: 0
postmap: been_here: [fe80::7dcc:757f:6e5f:104d]/128: 0
postmap: been_here: [fe80::917c:243d:fdd0:de79]/128: 0
postmap: been_here: [fe80::2049:f4cf:253a:fe75]/128: 0
postmap: mynetworks_core: 127.0.0.1/32 192.168.0.13/32 192.168.0.15/32
[::1]/128 [fe80::1]/128 [fe80::8eb:7f66:fabf:1343]/128
[2a02:c7f:3a85:8b00:9817:f063:ff20:472b]/128 [fe80::1c53:15c3:2e9:18c9]/128
[2a02:c7f:3a85:8b00:c069:e462:ce46:fe91]/128 [fe80::f828:78ff:fe45:71fd]/128
[fe80::7dcc:757f:6e5f:104d]/128 [fe80::917c:243d:fdd0:de79]/128
[fe80::2049:f4cf:253a:fe75]/128
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
user = mailuser
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
password = 117b8npg
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
dbname = mailserver
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
result_format = %s
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
option_file = 
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
option_group = 
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
tls_key_file = 
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
tls_cert_file = 
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
tls_CAfile = 
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
tls_CApath = 
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
tls_ciphers = 
postmap: cfg_get_bool: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
tls_verify_cert = on
postmap: cfg_get_int: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
expansion_limit = 0
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
query = SELECT 1 FROM virtual_users WHERE email='%s'
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
domain =
postmap: cfg_get_str: /usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf:
hosts = localhost
postmap: dict_open:
mysql:/usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf
postmap: dict_mysql_get_active: attempting to connect to host localhost
postmap: dict_mysql: successful connection to host localhost
postmap: dict_mysql: successful query from host localhost
postmap: dict_mysql_lookup: retrieved 1 rows
1
zeus:src robert$



Now the postmap.3.4 version...

robert$ sudo /usr/local/sbin/postmap.3.4 -v -q rob...@robert-chalmers.uk
mysql:/usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf
Password:
postmap.3.4: name_mask: all
postmap.3.4: name_mask: host
postmap.3.4: inet_addr_local: configured 3 IPv4 addresses
postmap.3.4: inet_addr_local: configured 10 IPv6 addresses
postmap.3.4: been_here: 127.0.0.1/32: 0
postmap.3.4: been_here: 192.168.0.13/32: 0
postmap.3.4: been_here: 192.168.0.15/32: 0
postmap.3.4: been_here: [::1]/128: 0
postmap.3.4: been_here: [fe80::1]/128: 0
postmap.3.4: been_here: [fe80::8eb:7f66:fabf:1343]/128: 0
postmap.3.4: been_here: [2a02:c7f:3a85:8b00:9817:f063:ff20:472b]/128: 0
postmap.3.4: been_here: [fe80::1c53:15c3:2e9:18c9]/128: 0
postmap.3.4: been_here: [2a02:c7f:3a85:8b00:c069:e462:ce46:fe91]/128: 0
postmap.3.4: been_here: [fe80::f828:78ff:fe45:71fd]/128: 0
postmap.3.4: been_here: [fe80::7dcc:757f:6e5f:104d]/128: 0
postmap.3.4: been_here: [fe80::917c:243d:fdd0:de79]/128: 0
postmap.3.4: been_here: [fe80::2049:f4cf:253a:fe75]/128: 0
postmap.3.4: mynetworks_core: 127.0.0.1/32 192.168.0.13/32 192.168.0.15/32
[::1]/128 [fe80::1]/128 [fe80::8eb:7f66:fabf:1343]/128
[2a02:c7f:3a85:8b00:9817:f063:ff20:472b]/128 [fe80::1c53:15c3:2e9:18c9]/128
[2a02:c7f:3a85:8b00:c069:e462:ce46:fe91]/128 [fe80::f828:78ff:fe45:71fd]/128
[fe80::7dcc:757f:6e5f:104d]/128 [fe80::917c:243d:fdd0:de79]/128
[fe80::2049:f4cf:253a:fe75]/128
postmap.3.4: cfg_get_str:
/usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf: user = mailuser
postmap.3.4: cfg_get_str:
/usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf: password = 117b8n

Re: 3.4 postmap throwing Segmentation:11

2018-11-30 Thread rachalmers
Ok, fixed it. Once again, library locations not specified correctly.
Sorry.

'AUXLIBS_MYSQL=-L/usr/local/lib -lmysqlclient -lz -lm' \

It's working now.
Robert



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html


Re: Upgraded to 3.4 today. All logging has Stopped?

2018-11-30 Thread rachalmers
Interesting - but I'm at a loss as to how to actually solve the logging
problem here. It's a bit iffy with no Postfix mail logs. Dovecot is logging
fine, but that's only half the story.




--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html


Since 3.4 upgrade, no incoming mail to server is allowed in?

2018-11-30 Thread rachalmers
Well, I can't see what's happening here. 3.4 isn't presenting me with
mail.logs on the Mac. Mojave.
Internally, I can send mail to myself, but I now no longer get mail from
outside?

Sending to myself
/usr/sbin/sendmail -bv  works. It's all internal

Sending to anything outside kind of works - it gets blocked.
/usr/sbin/sendmail -v  is being blocked because my ISP has the
entire net-block in spamhaus.RBL
I can't yet see a way around that!

*But more importantly - nothing appears to be getting in from outside to me
on the server.*

As i said - no mail logs at all for some reason.
No incoming mail at all for some reason.




--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html


Re: Since 3.4 upgrade, no incoming mail to server is allowed in?

2018-11-30 Thread Richard



> Date: Friday, November 30, 2018 07:54:08 -0700
> From: rachalmers 
>
> Well, I can't see what's happening here. 3.4 isn't presenting me
> with mail.logs on the Mac. Mojave.
> Internally, I can send mail to myself, but I now no longer get mail
> from outside?
> 
> Sending to myself
> /usr/sbin/sendmail -bv  works. It's all internal
> 
> Sending to anything outside kind of works - it gets blocked.
> /usr/sbin/sendmail -v  is being blocked because my ISP has
> the entire net-block in spamhaus.RBL
> I can't yet see a way around that!
> 
> *But more importantly - nothing appears to be getting in from
> outside to me on the server.*
> 
> As i said - no mail logs at all for some reason.
> No incoming mail at all for some reason.
> 

I believe that a likely reason for your logging problem has been
discussed already.

The RBL issue is ISP, not postfix, related (i.e., upgrading your
postfix version wouldn't have changed that).

Regarding no incoming mail ... are you on a static or dynamic IP
assignment?

Have you tried to telnet to port 25 on your server *from outside your
network* to see if/how it responds?


- Richard




FYI: Logging mail on Postfix 3.4 and Mojave (OSX 10.11)

2018-11-30 Thread rachalmers
This streams in real time, and works ok:
log stream --predicate '(process == "smtpd") || (process == "smtp")' --info

gratefully accepted from the Apple user community.



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html


Re: Upgraded to 3.4 today. All logging has Stopped?

2018-11-30 Thread Bill Cole

On 29 Nov 2018, at 12:07, Viktor Dukhovni wrote:

On Nov 29, 2018, at 9:15 AM, Robert Chalmers  
wrote:


I upgraded to and installed 3.4 today. It appears to be running, but 
all logging has stopped. The last entry in the log file was at the 
exact time I started the new version.


Apple changed the syslog API to use the os_log(3) interface, but 
apparently
if you compile on a sufficiently old MacOS/X system, you get linked 
against

the traditional syslog API.

So some people do that, but the os_log(3) stuff is configurable, so 
you

should be able to configure the logs to be saved.


The word "should" has 2 distinct meanings...

There's already a default /etc/asl/com.apple.mail file which *according 
to Apple's docs* should cause mail messages to go into 
/var/log/mail.log, but they do not. Replicating the configuration in 
/etc/asl.conf which seems to make some messages land in 
/var/log/system.log does not work for any other target. None of the 
/etc/asl/com.apple.* files which seem to want to cause messages to go 
into log files actually generates any log files.


I agree that there *SHOULD* be a way to cause the broken "unified 
logging" subsystem to save custom logs. That would be a good thing. I do 
not believe that a working documented mechanism exists to do so. It 
seems to me to be unlikely that anyone would stumble across whatever 
magic is needed to achieve this result.




The in-memory logs
can be queried with log(1).  For example:

  # postfix reload
  postfix/postfix-script: refreshing the Postfix mail system

  # log show --info --style syslog --last 2m --predicate 'eventType == 
logEvent'  | grep libpostfix-util
  2018-11-29 12:02:26.765215-0500  localhost postlog[59348]: 
(libpostfix-util.dylib) refreshing the Postfix mail system
  2018-11-29 12:02:26.776443-0500  localhost master[33680]: 
(libpostfix-util.dylib) reload -- version 3.4-20181125, configuration 
/var/tmp/postfix/etc


Someone should figure out how create an asl.conf(5) configuration
that causes appropriate Postfix logs to land on disk, and share
the recipe.


As I said above, I'm not sure that's possible. However, one could launch 
this persistently in the background (either via launchd or even 'batch' 
if you're into such things...) and get an emulation of sane mail 
logging:


log stream --info --predicate 'senderImagePath CONTAINS "postfix"' 
--style syslog >> /var/log/mail.log



--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole


Re: FYI: Logging mail on Postfix 3.4 and Mojave (OSX 10.11)

2018-11-30 Thread Bill Cole
On 30 Nov 2018, at 10:24, rachalmers wrote:

> This streams in real time, and works ok:
> log stream --predicate '(process == "smtpd") || (process == "smtp")' --info
>
> gratefully accepted from the Apple user community.


If you want ALL Postfix messages, this would do it:

log stream  --info --predicate 'senderImagePath CONTAINS "postfix"'