Topic: ERROR: invalid input syntax for type bytea (iRedMail-0.9.9 fresh inst
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9 PGSQL edition.
- Deployed with downloadable installer
- Ubuntu 18.04 LTS
- Store mail accounts in PGSQL
- Apache
- No iRedAadmin-Pro
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I've done a fresh install of a iReadMail-0.9.9 via the downloadable installer. On some of the messages I receive I get errors like this in a /var/log/mail.log file:
Apr 28 19:13:22 iredmail amavis[7830]: (07830-11) (!)WARN save_info_final: sql exec: err=7, 22P02, DBD::Pg::st execute failed: ERROR: invalid input syntax for type bytea at (eval 108) line 173.
Apr 28 19:13:25 iredmail amavis[7830]: (07830-11) (!)WARN save_info_final: sql exec: err=7, 22P02, DBD::Pg::st execute failed: ERROR: invalid input syntax for type bytea at (eval 108) line 173.
Apr 28 19:13:30 iredmail amavis[7830]: message repeated 3 times: [ (07830-11) (!)WARN save_info_final: sql exec: err=7, 22P02, DBD::Pg::st execute failed: ERROR: invalid input syntax for type bytea at (eval 108) line 173.]
Apr 28 19:13:30 iredmail amavis[7830]: (07830-11) (!!)ERROR sql_storage: too many retries on storing final, info not saved
I have enabled full query logging in postgres, and here is what the error looks like in Postgres:
2019-04-28 19:13:30.687 UTC [18235] amavisd@amavisd LOG: duration: 0.103 ms statement: SET NAMES 'utf8'
2019-04-28 19:13:30.687 UTC [18235] amavisd@amavisd LOG: duration: 0.023 ms statement: begin
2019-04-28 19:13:30.688 UTC [18235] amavisd@amavisd LOG: duration: 0.551 ms parse <unnamed>: INSERT INTO msgrcpt (partition_tag, mail_id, rseqnum, rid, is_local, content, ds, rs, bl, wl, bspam_level, smtp_resp) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12)
2019-04-28 19:13:30.689 UTC [18235] amavisd@amavisd LOG: duration: 1.414 ms bind <unnamed>: INSERT INTO msgrcpt (partition_tag, mail_id, rseqnum, rid, is_local, content, ds, rs, bl, wl, bspam_level, smtp_resp) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12)
2019-04-28 19:13:30.689 UTC [18235] amavisd@amavisd DETAIL: parameters: $1 = '0', $2 = 'jd_gsiZ8ne8O', $3 = '1', $4 = '2', $5 = 'Y', $6 = 'C', $7 = 'P', $8 = ' ', $9 = 'N', $10 = 'N', $11 = '-1', $12 = '250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 44scrf47MXzGgVH'
2019-04-28 19:13:30.690 UTC [18235] amavisd@amavisd LOG: duration: 0.320 ms execute <unnamed>: INSERT INTO msgrcpt (partition_tag, mail_id, rseqnum, rid, is_local, content, ds, rs, bl, wl, bspam_level, smtp_resp) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12)
2019-04-28 19:13:30.690 UTC [18235] amavisd@amavisd DETAIL: parameters: $1 = '0', $2 = 'jd_gsiZ8ne8O', $3 = '1', $4 = '2', $5 = 'Y', $6 = 'C', $7 = 'P', $8 = ' ', $9 = 'N', $10 = 'N', $11 = '-1', $12 = '250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 44scrf47MXzGgVH'
2019-04-28 19:13:30.691 UTC [18235] amavisd@amavisd LOG: duration: 0.440 ms parse <unnamed>: UPDATE msgs SET content=$1, quar_type=$2, quar_loc=$3, dsn_sent=$4, spam_level=$5, message_id=$6, from_addr=$7, subject=$8, client_addr=$9, originating=$10 WHERE partition_tag=$11 AND mail_id=$12
2019-04-28 19:13:30.691 UTC [18235] amavisd@amavisd ERROR: invalid input syntax for type bytea
2019-04-28 19:13:30.691 UTC [18235] amavisd@amavisd STATEMENT: UPDATE msgs SET content=$1, quar_type=$2, quar_loc=$3, dsn_sent=$4, spam_level=$5, message_id=$6, from_addr=$7, subject=$8, client_addr=$9, originating=$10 WHERE partition_tag=$11 AND mail_id=$12
2019-04-28 19:13:30.692 UTC [18235] amavisd@amavisd LOG: duration: 0.022 ms statement: rollback
Now, this seems like an issue with Amavis that is not compabible with postgres10 that is in Bionic. I will look more into this, but still wanted to share this issue here on the forum (with the hope that someone might already have a solution for this! )
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.