Re: Client is always localhost

2017-03-06 Thread Viktor Dukhovni

> On Mar 6, 2017, at 11:27 AM, chaouche yacine  wrote:
> 
>> You likely have most of the entries in master.cf chrooted,
> 
>> and no log socket in chroot jail ($queue_directory/dev/log or similar).
> 
> I have no smtpd line in my master.cf file, and since my postfix version is 
> 2.X the default is to run chrooted. My queue_directory is /var/spool/postfix

Of course you do.  You're just not looking in the correct column.

Disable chroot for all master.cf entries and make sure that logging
works in that configuration.  Once that works, you can if you wish
tackle making logging work with chroot, but that's for experts, and
you'll have to figure that out for yourself.

-- 
Viktor.



Re: Client is always localhost

2017-03-06 Thread chaouche yacine





On Monday, March 6, 2017 4:10 PM, Viktor Dukhovni  
wrote:


>You likely have most of the entries in master.cf chrooted,

>and no log socket in chroot jail ($queue_directory/dev/log or similar).

I have no smtpd line in my master.cf file, and since my postfix version is 2.X 
the default is to run chrooted. My queue_directory is /var/spool/postfix




root@messagerie[10.10.10.19] /var/spool/postfix # postconf queue_directory 
queue_directory = /var/spool/postfix
root@messagerie[10.10.10.19] /var/spool/postfix # 




and there's a /dev/log socket there, but it belongs to root, while the other 
files belong to postfix : 






root@messagerie[10.10.10.19] /var/spool/postfix # ls
total 80K
drwx--  2 postfix postfix   12K Mar  6 16:53 active
drwx--  2 postfix postfix  4.0K Mar  6 15:15 bounce
drwx--  2 postfix postfix  4.0K Mar  7  2016 corrupt
drwx-- 18 postfix postfix  4.0K Nov 14 08:56 defer
drwx-- 18 postfix postfix  4.0K Nov 14 08:56 deferred
drwxr-xr-x  2 postfix postfix  4.0K Sep  8 09:50 dev
drwxr-xr-x  3 postfix postfix  4.0K Feb  5 10:46 etc
drwx--  2 postfix postfix  4.0K Mar 27  2016 flush
drwx--  2 postfix postfix  4.0K Mar  7  2016 hold
drwx--  2 postfix postfix  4.0K Mar  6 16:53 incoming
drwxr-xr-x  3 postfix postfix  4.0K Mar  7  2016 lib
drwx-wx---  2 postfix postdrop 4.0K Mar  6 16:53 maildrop
drwxr-xr-x  2 rootpostfix  4.0K Sep 26 10:52 pid
drwx--  2 postfix postfix  4.0K Mar  6 10:27 private
drwx--s---  2 postfix postdrop 4.0K Feb  5 10:46 public
drwx--  2 postfix postfix  4.0K Mar  7  2016 saved
drwx--  2 postfix postfix  4.0K Mar  6 10:47 trace
drwxr-xr-x  3 postfix postfix  4.0K Mar  7  2016 usr
root@messagerie[10.10.10.19] /var/spool/postfix # ls dev/log
srw-rw-rw- 1 root root 0 Sep  8 09:50 dev/log
root@messagerie[10.10.10.19] /var/spool/postfix # 






> I see no logging from qmgr(8) or smtpd(8) other than the re-injection

>service receiving amavis filtered email.

Correct.


> Fix your master.cf file (turn off chroot).
I would like to make sure I understand the docs correctly before I do this. I 
have highlighted here some passages of the postfix documentation that says that


"Sites with high security requirements should consider to chroot all daemons 
that talk to the network: the smtp(8) and smtpd(8) processes"...

(Online annotation : 
http://genius.it/www.postfix.org/BASIC_CONFIGURATION_README.html#chroot_setup)

Also, I don't have syslog installed, I have rsyslog instead, and it doesn't 
seem to support the -a option

Its man page says that rsyslogd reads from /dev/log, but I don't have it on my 
machine.


root@messagerie[10.10.10.19] ~ # ls /dev/log
ls: cannot access /dev/log: No such file or directory
root@messagerie[10.10.10.19] ~ # 


But as I was trying to find something in rsyslog's /etc/ files, I found this : 


root@messagerie[10.10.10.19] ~ # cat /etc/rsyslog.d/postfix.conf 
# Create an additional socket in postfix's chroot in order not to break
# mail logging when rsyslog is restarted.  If the directory is missing,
# rsyslog will silently skip creating the socket.
$AddUnixListenSocket /var/spool/postfix/dev/log
root@messagerie[10.10.10.19] ~ # 


So it seems that rsyslog is already configured to read from the chrooted 
/var/spool/postfix/dev/log socket. Maybe it's just a question of 
permissions/ownership ? I told myself.

I changed ownership to postfix:postfix, restarted postfix, restarted rsyslogd, 
but still nothing in the logs. Here's an excerpt after sending myself mail from 
my yahoo account : 





Mar  6 17:25:38 messagerie postfix/cleanup[29757]: 3vcQBV1wdkz3PsZP: 
message-id=<1550778990.2912303.1488817535...@mail.yahoo.com>
Mar  6 17:25:41 messagerie postfix/pickup[29551]: 3vcQBY22F7z3PsZY: uid=0 
from=
Mar  6 17:25:41 messagerie postfix/cleanup[29922]: 3vcQBY22F7z3PsZY: 
message-id=<1550778990.2912303.1488817535...@mail.yahoo.com>
Mar  6 17:25:41 messagerie postfix/smtpd[29766]: 3vcQBY2gDsz3PsZP: 
client=localhost[127.0.0.1]
Mar  6 17:25:41 messagerie postfix/cleanup[29802]: 3vcQBY2gDsz3PsZP: 
message-id=<1550778990.2912303.1488817535...@mail.yahoo.com>
Mar  6 17:25:41 messagerie postfix/smtpd[29766]: disconnect from 
localhost[127.0.0.1]
Mar  6 17:25:41 messagerie postfix/smtp[29805]: 3vcQBY22F7z3PsZY: 
to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.17, 
delays=0.06/0/0/0.1, 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 3vcQBY2gDsz3PsZP)
Mar  6 17:25:41 messagerie postfix/pickup[29551]: 3vcQBY3B5Tz3PsZY: uid=0 
from=
Mar  6 17:25:41 messagerie postfix/cleanup[29757]: 3vcQBY3B5Tz3PsZY: 
message-id=<1550778990.2912303.1488817535...@mail.yahoo.com>
Mar  6 17:25:41 messagerie postfix/smtpd[29816]: 3vcQBY3zJVz3PsZS: 
client=localhost[127.0.0.1]
Mar  6 17:25:41 messagerie postfix/cleanup[29802]: 3vcQBY3zJVz3PsZS: 
message-id=<1550778990.2912303.1488817535...@mail.yahoo.com>
Mar  6 17:25:41 messagerie postfix/lmtp[29806]: 3vcQBY2gDsz3PsZP: 
to=, 
relay=messageri

Re: Wietse: Old Mirrors on postfix.org/download.html

2017-03-06 Thread Scott Kitterman
On Monday, March 06, 2017 08:54:22 AM Matthew McGehrin wrote:
> Wietse,
> 
> There are several old mirrors with bad links that don't work on the
> postfix download page and needs to be updated.
...
> 
> Several of the FTP sites are down as well, including cloud9.
> 
...
> ftp://postfix.mirrors.pair.com/postfix-release/index.html

This one seems to be http now.  This works just fine (url slightly different):

http://postfix.mirrors.pair.com/

Scott K


Re: Client is always localhost

2017-03-06 Thread Viktor Dukhovni

> On Mar 6, 2017, at 10:02 AM, chaouche yacine  wrote:
> 
> I did my best at making most sense of the lines in the log file and made 
> assumptions on timestamps to collect these lines where there should be an 
> email from supp...@maghrebmedia.com to me (a.chaou...@mydomain.tld), although 
> their SMTP client doesn't seem to appear here : 

You likely have most of the entries in master.cf chrooted,
and no log socket in chroot jail ($queue_directory/dev/log or similar).

I see no logging from qmgr(8) or smtpd(8) other than the re-injection
service receiving amavis filtered email.

Fix your master.cf file (turn off chroot).

-- 
Viktor.



Re: Client is always localhost

2017-03-06 Thread chaouche yacine
Hello Viktor,

I did my best at making most sense of the lines in the log file and made 
assumptions on timestamps to collect these lines where there should be an email 
from supp...@maghrebmedia.com to me (a.chaou...@mydomain.tld), although their 
SMTP client doesn't seem to appear here : 




Mar  2 09:50:09 messagerie postfix/cleanup[26917]: B819A162007E: 
message-id=<20170302085009.a06681620...@messagerie.mydomain.tld>
Mar  2 09:50:09 messagerie postfix/smtpd[25491]: disconnect from 
localhost[127.0.0.1]
Mar  2 09:50:09 messagerie postfix/smtp[26927]: A06681620081: 
to=, relay=127.0.0.1[127.0.0.1]:10024, 
delay=0.18, delays=0.06/0/0/0.12, 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 B819A162007E)
Mar  2 09:50:48 messagerie postfix/scache[26273]: statistics: start interval 
Mar  2 09:43:08
Mar  2 09:50:48 messagerie postfix/scache[26273]: statistics: domain lookup 
hits=3 miss=28 success=9%
Mar  2 09:50:48 messagerie postfix/scache[26273]: statistics: max simultaneous 
domains=1 addresses=2 connection=8
#--- seems to be starting to process something 
(also from timestamps this is roughly 2 minutes later
Mar  2 09:51:37 messagerie postfix/cleanup[26917]: A4C09162007E: 
message-id=
Mar  2 09:51:40 messagerie postfix/pickup[26438]: 2D3361620085: uid=0 
from=
Mar  2 09:51:40 messagerie postfix/cleanup[26917]: 2D3361620085: 
message-id=
Mar  2 09:51:40 messagerie postfix/pickup[26438]: 337A01620081: uid=0 
from=
Mar  2 09:51:40 messagerie postfix/cleanup[26917]: 337A01620081: 
message-id=
Mar  2 09:51:40 messagerie postfix/smtpd[26937]: 46019162007E: 
client=localhost[127.0.0.1]
Mar  2 09:51:40 messagerie postfix/cleanup[26917]: 46019162007E: 
message-id=
Mar  2 09:51:40 messagerie postfix/smtpd[25491]: connect from 
localhost[127.0.0.1]
Mar  2 09:51:40 messagerie postfix/smtpd[26937]: disconnect from 
localhost[127.0.0.1]
Mar  2 09:51:40 messagerie postfix/smtpd[25491]: 4EC8B1620083: 
client=localhost[127.0.0.1]
Mar  2 09:51:40 messagerie postfix/cleanup[26917]: 4EC8B1620083: 
message-id=
Mar  2 09:51:40 messagerie postfix/smtp[26927]: 2D3361620085: 
to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.18, 
delays=0.06/0/0/0.12, 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 46019162007E)
Mar  2 09:51:40 messagerie postfix/smtpd[25491]: disconnect from 
localhost[127.0.0.1]
Mar  2 09:51:40 messagerie postfix/smtp[27113]: 337A01620081: 
to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.22, 
delays=0.08/0.01/0/0.13, 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 4EC8B1620083)
Mar  2 09:51:40 messagerie postfix/smtp[27113]: 337A01620081: 
to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.22, 
delays=0.08/0.01/0/0.13, 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 4EC8B1620083)
Mar  2 09:51:40 messagerie postfix/smtp[27113]: 337A01620081: 
to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.22, 
delays=0.08/0.01/0/0.13, 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 4EC8B1620083)
Mar  2 09:51:40 messagerie postfix/smtp[27113]: 337A01620081: 
to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.22, 
delays=0.08/0.01/0/0.13, 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 4EC8B1620083)
Mar  2 09:51:40 messagerie postfix/smtp[27113]: 337A01620081: 
to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.22, 
delays=0.08/0.01/0/0.13, 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 4EC8B1620083)
Mar  2 09:51:40 messagerie postfix/smtp[27113]: 337A01620081: 
to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.22, 
delays=0.08/0.01/0/0.13, 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 4EC8B1620083)
Mar  2 09:51:40 messagerie postfix/pickup[26438]: 637F21620085: uid=0 
from=
Mar  2 09:51:40 messagerie postfix/cleanup[26917]: 637F21620085: 
message-id=
Mar  2 09:51:40 messagerie postfix/lmtp[27117]: 4EC8B1620083: 
to=, 
relay=messagerie.mydomain.tld[private/dovecot-lmtp], delay=0.17, 
delays=0.04/0/0/0.12, dsn=2.0.0, status=sent (250 2.0.0 
 yb8gFhzdt1juaQAA4gj4ZQ Saved)
Mar  2 09:51:40 messagerie postfix/smtpd[26937]: connect from 
localhost[127.0.0.1]
Mar  2 09:51:40 messagerie postfix/smtpd[26937]: 82D8E1620086: 
client=localhost[127.0.0.1]
Mar  2 09:51:40 messagerie postfix/cleanup[26917]: 82D8E1620086: 
message-id=
Mar  2 09:51:40 messagerie postfix/pickup[26438]: 860B91620088: uid=0 
from=
Mar  2 09:51:40 messagerie postfix/cleanup[27124]: 860B91620088: 
message-id=
Mar  2 09:51:40 messagerie postfix/smtp[26927]: 637F21620085: 
to=, relay=127.0.0.1[127.0.0.1]:10024, 
delay=0.2, delays=0.07/0/0/0.13, 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 82D8E1620086)
Mar  2 09:51:40 messagerie postfix/lmtp[27117]: 4EC8B

Wietse: Old Mirrors on postfix.org/download.html

2017-03-06 Thread Matthew McGehrin


Wietse,

There are several old mirrors with bad links that don't work on the 
postfix download page and needs to be updated.


404 Not Found  
http://mirrors-usa.go-parts.com/postfix/source/index.html 	USA, MI, 
Lansing 
404 Not Found  
http://mirrors.xservers.ro/postfix-release/index.html 	Romania, 
Bucharest 
404 Not Found  
http://postfix.psshee.com/pub/index.html 	South Korea, Seoul 

-1 Timeout  
http://postfix.poldownload.com/postfix/postfix-source/index.html 	Iran, 
Tehran 
-1 Timeout  
http://mirror.tje.me.uk/pub/mirrors/postfix-release/index.html 	UK, 
London 



Several of the FTP sites are down as well, including cloud9.

ftp://postfix.cloud9.net/index.html
ftp://ftp.its.cz/MIRRORS/ftp.porcupine.org/mirrors/postfix-release/index.html
ftp://ftp.ucr.ac.cr/pub/Unix/mail/postfix/postfix-release/index.html
ftp://ftp.sunet.se/pub/unix/mail/postfix/index.html
ftp://ftp.is.co.za/networking/mail/mta/postfix/index.html
ftp://postfix.mirrors.pair.com/postfix-release/index.html

Thank You.




Re: Postfix 20 years ago

2017-03-06 Thread Istvan Prosinger

On 2017-02-12 19:06, wie...@porcupine.org wrote:

Last month it was 20 years ago that I started writing Postfix code.


Sorry for the late reply, but here's a Thanks from me too, to you and 
all the contributors.


Best,
Istvan