Mar 4, 2024

HP Color Laser Jet MFP Email Setup 'Test was unsuccessful'

When I was routing my new printer (HP Color Laser Jet MFP) to use my own email server I keep getting 'Test was unsuccessful. Please try again.' without any more diagnostic. So I decided to figure out why.

It turns out that for some reason the printer is not sending a valid Helo:

Mar 4 02:43:55 server postfix/smtps/smtpd[4430]: NOQUEUE: reject: RCPT from[]: 504 5.5.2 : Helo command rejected: need fully-qualified hostname; from= to= proto=ESMTP helo=

I cannot get the printer to spit out a valid Helo, so I modified my Postfix configuration to work around it.

smtpd_helo_restrictions = permit_mynetworks, check_helo_access inline:{ { printer = OK } }, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, permit