systemadmin.es > Correo > postcat: Ver mensaje de la cola de postfix

postcat: Ver mensaje de la cola de postfix

En el caso que tengamos mensajes en la cola de postfix y necesitemos ver su contenido podemos usar el comando postcat para verlo

Por ejemplo, dado este log, podemos ver el contenido del mail que estamos intentando entregar mediante su ID, en este caso C023C5E05DD:

Feb  9 09:53:06 push14 postfix/smtpd[1535]: C023C5E05DD: client=server-mip.eu.pclima.net[83.231.228.131]
Feb  9 09:53:06 push14 postfix/cleanup[1551]: C023C5E05DD: message-id=<20160209095306.C023C5E05DD@push14.localdomain>
Feb  9 09:53:06 push14 postfix/qmgr[2953]: C023C5E05DD: from=<no-reply@systemadmin.es>, size=1012, nrcpt=1 (queue active)
Feb  9 09:53:07 push14 postfix/smtp[780]: C023C5E05DD: host mta6.am0.yahoodns.net[98.138.112.38] said: 421 4.7.0 [TS01] Messages from 213.130.33.161 temporarily deferred due to user complaints - 4.16.55.1; see https://help.yahoo.com/kb/postmaster/SLN3434.html (in reply to MAIL FROM command)
Feb  9 09:53:07 push14 postfix/smtp[780]: C023C5E05DD: lost connection with mta6.am0.yahoodns.net[98.138.112.38] while sending RCPT TO
Feb  9 09:53:07 push14 postfix/smtp[780]: C023C5E05DD: to=<example@ymail.com>, relay=mta7.am0.yahoodns.net[98.138.112.35]:25, delay=1, delays=0.05/0/0.82/0.14, dsn=4.7.0, status=deferred (host mta7.am0.yahoodns.net[98.138.112.35] said: 421 4.7.0 [TS01] Messages from 213.130.33.161 temporarily deferred due to user complaints - 4.16.55.1; see https://help.yahoo.com/kb/postmaster/SLN3434.html (in reply to MAIL FROM command))

Deberemos indicar a postcat mediante la opción -q dicho ID para ver su contenido:

# postcat -vq C023C5E05DD
postcat: dict_eval: const  mail
postcat: dict_eval: const  ipv4
postcat: name_mask: ipv4
postcat: dict_eval: const  push14.localdomain
postcat: dict_eval: const  localdomain
postcat: dict_eval: const  Postfix
postcat: dict_eval: const  postfix
postcat: dict_eval: const  postfix
postcat: dict_eval: const  postdrop
postcat: dict_eval: expand $myhostname, localhost.$mydomain, localhost -> push14.localdomain, localhost.localdomain, localhost
postcat: dict_eval: expand $myhostname -> push14.localdomain
postcat: dict_eval: const  
postcat: dict_eval: const  /usr/libexec/postfix
postcat: dict_eval: const  /usr/sbin
postcat: dict_eval: const  /var/spool/postfix
postcat: dict_eval: const  pid
postcat: dict_eval: const  all
postcat: dict_eval: const  
postcat: dict_eval: const  double-bounce
postcat: dict_eval: const  nobody
postcat: dict_eval: const  hash:/etc/aliases
postcat: dict_eval: const  200600825
postcat: dict_eval: const  2.3.3
postcat: dict_eval: const  hash
postcat: dict_eval: const  deferred, defer
postcat: dict_eval: const  
postcat: dict_eval: expand $mydestination -> push14.localdomain, localhost.localdomain, localhost
postcat: dict_eval: expand $relay_domains -> push14.localdomain, localhost.localdomain, localhost
postcat: dict_eval: const  TZ MAIL_CONFIG LANG
postcat: dict_eval: const  MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY LANG=C
postcat: dict_eval: const  subnet
postcat: dict_eval: const  
postcat: dict_eval: const  +=
postcat: dict_eval: const  -=+
postcat: dict_eval: const  debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps
postcat: dict_eval: const  
postcat: dict_eval: const  bounce
postcat: dict_eval: const  cleanup
postcat: dict_eval: const  defer
postcat: dict_eval: const  pickup
postcat: dict_eval: const  qmgr
postcat: dict_eval: const  rewrite
postcat: dict_eval: const  showq
postcat: dict_eval: const  error
postcat: dict_eval: const  flush
postcat: dict_eval: const  verify
postcat: dict_eval: const  trace
postcat: dict_eval: const  
postcat: dict_eval: const  2
postcat: dict_eval: const  100s
postcat: dict_eval: const  100s
postcat: dict_eval: const  100s
postcat: dict_eval: const  100s
postcat: dict_eval: const  3600s
postcat: dict_eval: const  3600s
postcat: dict_eval: const  100s
postcat: dict_eval: const  100s
postcat: dict_eval: const  1000s
postcat: dict_eval: const  1000s
postcat: dict_eval: const  10s
postcat: dict_eval: const  10s
postcat: dict_eval: const  1s
postcat: dict_eval: const  1s
postcat: dict_eval: const  1s
postcat: dict_eval: const  1s
postcat: dict_eval: const  500s
postcat: dict_eval: const  500s
postcat: dict_eval: const  18000s
postcat: dict_eval: const  18000s
postcat: dict_eval: const  1s
postcat: dict_eval: const  1s
postcat: dict_eval: const  /etc/postfix/mynetworks
postcat: inet_addr_local: configured 4 IPv4 addresses
*** ENVELOPE RECORDS deferred/C/C023C5E05DD ***
message_size:            1012             599               1               0
message_arrival_time: Tue Feb  9 09:53:06 2016
create_time: Tue Feb  9 09:53:06 2016
named_attribute: rewrite_context=remote
sender: no-reply@systemadmin.es
named_attribute: log_client_name=server-mip.eu.pclima.net
named_attribute: log_client_address=83.231.228.131
named_attribute: log_message_origin=server-mip.eu.pclima.net[83.231.228.131]
named_attribute: log_helo_name=glados.jij.com
named_attribute: log_protocol_name=ESMTP
named_attribute: client_name=server-mip.eu.pclima.net
named_attribute: reverse_client_name=server-mip.eu.pclima.net
named_attribute: client_address=83.231.228.131
named_attribute: helo_name=glados.jij.com
named_attribute: client_address_type=2
named_attribute: dsn_orig_rcpt=rfc822;example@ymail.com
original_recipient: example@ymail.com
recipient: example@ymail.com
*** MESSAGE CONTENTS deferred/C/C023C5E05DD ***
regular_text: Received: from glados.jij.com (server-mip.eu.pclima.net [83.231.228.131])
regular_text: 	by push14.localdomain (Postfix) with ESMTP id C023C5E05DD
regular_text: 	for <example@ymail.com>; Tue,  9 Feb 2016 09:53:06 +0000 (GMT)
regular_text: MIME-Version: 1.0
regular_text: From: "no-reply@systemadmin.es"
regular_text:  <no-reply@systemadmin.es>
regular_text: To: "example@ymail.com"
regular_text:  <example@ymail.com>
regular_text: Date: 9 Feb 2016 09:53:06 +0000
regular_text: Subject: =?utf-8?B?RXRpaGFkIEFnZW50cyB3ZWJzaXRlIOKAkyBSZWdpc3RyYXRp?=
regular_text:  =?utf-8?B?b24gZGV0YWlscw==?=
regular_text: Content-Type: text/html; charset=us-ascii
regular_text: Content-Transfer-Encoding: quoted-printable
regular_text: Message-Id: <20160209095306.C023C5E05DD@push14.localdomain>
regular_text: 
regular_text: bla bla bla bla
regular_text: 
*** HEADER EXTRACTED deferred/C/C023C5E05DD ***
*** MESSAGE FILE END deferred/C/C023C5E05DD ***

Deja un comentario:

XHTML - Tags permitidos:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>