msimerson / mail-dmarc

Mail::DMARC, a complete DMARC implementation in Perl
Other
33 stars 23 forks source link

Misaligned output from dmarc_view_reports with longer hostnames #245

Open richlv opened 1 month ago

richlv commented 1 month ago

Describe the bug If longer hostnames are included in the report, the output of dmarc_view_reports becomes misaligned.

To Reproduce Steps to reproduce the behavior:

  1. Have a report with longer hostnames - for example, 27 characters.

Expected behavior All rows aligned to the header.

Screenshots Censored output with the misalignment. Notice how the row alignment differs depending on the hostname length.

 ID                      Author     Report-Start
  | -- Qty                 From                                      IP   Disposition    DKIM     SPF
  8          xxxxxxxxxx xxxxxxx  2024-07-15 03:00:00
  | --   1 xxxxxxxxxx.xxxxxxx.xxx.xxx                           xxx.xx.xx.xxx          none    fail    fail    
  | --   7 xxxxxxxxxx.xxxxxxx.xxx.xxx                           xxx.x.xxx.xxx          none    pass    pass    
  | --   2      xxxxxxx.xxx.xxx                           xxx.x.xxx.xxx          none    pass    pass  

Server (please complete the following information):

Perl (please complete the following information):

Additional context Preferably, column width would dynamically adapt to the contents, and be the same for all rows.