A sender too long (or wrong ?) is causing a database error till restart of bley
I use bley on two postfix servers with the postgresql database on a third server. I had three time this problem (with the same sender) :
-
postfix recieve a message with this long (289 character) and wrong sender : from=<{[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]>
-
bley log this error : bley: check_local_db failed. sending unknown.
-
the database log this error : 2017-03-08 10:58:17 CET [76508]: [1-1] user=bley,db=bley ERROR: value too long for type character varying(254) 2017-03-08 10:58:17 CET [76508]: [2-1] user=bley,db=bley STATEMENT: INSERT INTO bley_status (ip, status, last_action, sender, recipient) VALUES('37.61.217.110', 0, '2017-03-08T10:58:17.430562'::timestamp, '{[email protected]|[email protected]|mta365@enggpublic ation.net|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]', '[email protected]') 2017-03-08 10:58:18 CET [76508]: [3-1] user=bley,db=bley ERROR: current transaction is aborted, commands ignored until end of transaction block
-
till it was restarted, bley log this error to all requests to the database: "bley: check_local_db failed. sending unknown."
All messages greylisted are refused, that's cause a kind of denial of service.
yes, the sender is way to long, and we probably should sanitize that.
yet I wonder, it should have recovered fine after the issue. I'll see if I can come up with a reproducer for that. thanks for reporting.