On Sat, Apr 26, 2014 at 08:50:49PM -0400, Wietse Venema wrote: > Wietse Venema: > > Marius Gologan: > > > Can I add, in any way, the sender ip on the postfix/smtp > > > log line? > > > > No. > > > > You can extract the SMTP client IP address from Postfix > > logging with the same queue ID. This works best when you > > enable long queue IDs that never repeat. > > > > # postconf -e "enable_long_queue_ids = yes" > > # postfix reload
Note, this requires Postfix 2.9 or later. > > You can also find the SMTP client IP address in the Received: > > message header that was added by your Postfix SMTP server. > > Another option: prepend a message header in the SMTP server, > and log that message header in the SMTP client. > > /etc/postfix/main.cf: > smtpd_client_restrictions = > check_client_access pcre:/etc/postfix/prepend_client > smtp_header_checks = pcre:/etc/postfix/smtp_header_checks > > /etc/postfix/prepend_client: > /^([0-9.]+|[0-9a-f:]+)$/ prepend X-SMTP-Client-Addr: $1 > > /etc/postfix/smtp_header_checks: > /^X-SMTP-Client-Addr: (\S+)/ warn client address $1 > > Instead of X-SMTP-Client-Addr use something that is unlikely > to appear in other people's email. Nice idea, but will these smtp_header_checks fire if rejection occurs before DATA? > This requires Postfix 2.5 or later. -- http://rob0.nodns4.us/ Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: