-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not logging mail to SQL #1198
Comments
Hi, which encoding and collation are set on
|
@ricain59 did you run the |
@Skywalker-11 Yes, but i run again after your suggestion: MailWatch for MailScanner Database Upgrade to 1.2.15
Have you done a full backup of your database? Type 'yes' to continue: yes
Testing connectivity to the database ................................. OK
Updating database schema:
- Convert database to UTF-8.......................................... ALREADY DONE
- Fix security issues in database.................................... No known security issues
- Drop `geoip_country` table......................................... ALREADY DROPPED
- Drop `spamscores` table............................................ ALREADY DROPPED
- Add autorelease table to `mailscanner` database.................... ALREADY EXIST
- Add mtalog_ids table to `mailscanner` database..................... ALREADY EXIST
- Add resetid, resetexpire and lastreset fields in `users` table..... ALREADY EXIST
- Add login_expiry and login_timeout fields in `users` table......... ALREADY EXIST
- Add id field in `users` table...................................... ALREADY EXIST
- Fix schema for type field in `users` table......................... OK
- Fix schema for username field in `audit_log` table................. ALREADY DONE
- Fix schema for id field in `blacklist` table....................... ALREADY DONE
- Fix schema for id field in `whitelist` table....................... ALREADY DONE
- Fix schema for username field in `users` table..................... ALREADY DONE
- Fix schema for username field in `user_filters` table.............. ALREADY DONE
- Fix schema for spamscore field in `users` table.................... ALREADY DONE
- Fix schema for highspamscore field in `users` table................ ALREADY DONE
- Fix schema for timestamp field in `maillog` table.................. ALREADY DONE
- Fix schema for nameinfected in `maillog` table..................... ALREADY DONE
- Fix schema for password field in `users` table..................... ALREADY DONE
- Fix schema for fullname field in `users` table..................... ALREADY DONE
- Fix schema for rule_desc field in `mcp_rules` table................ ALREADY DONE
- Cleanup orphaned user_filters...................................... OK
- Add id field and primary key to `audit_log` table.................. ALREADY DONE
- Add inq_id field and primary key to `inq` table.................... ALREADY DONE
- Add maillog_id field and primary key to `maillog` table............ ALREADY DONE
- Add rblspamreport field to `maillog` table......................... ALREADY DONE
- Add token field to `maillog` table................................. ALREADY DONE
- Add released field to `maillog` table.............................. ALREADY DONE
- Add last_update field to `maillog` table........................... ALREADY EXIST
- Add salearn field to `maillog` table............................... ALREADY DONE
- Add messageid field to `maillog` table............................. ALREADY DONE
- Check for missing tokens in `maillog` table........................ NOTHING FOUND
- Add mtalog_id field and primary key to `mtalog` table.............. ALREADY DONE
- Add mtalog_id field and primary key to `outq` table................ ALREADY DONE
- Add id field and primary key to `saved_filters` table.............. ALREADY DONE
- Add mtalog_id field and primary key to `user_filters` table........ ALREADY DONE
- Dropping too big index `maillog_from_idx` on table `maillog`....... ALREADY DONE
- Dropping too big index `maillog_to_idx` on table `maillog`......... ALREADY DONE
- Convert database to utf8mb4........................................ ALREADY DONE
- Convert table `audit_log` to utf8mb4............................... ALREADY CONVERTED
- Convert table `autorelease` to utf8mb4............................. ALREADY CONVERTED
- Convert table `blacklist` to utf8mb4............................... ALREADY CONVERTED
- Convert table `inq` to utf8mb4..................................... ALREADY CONVERTED
- Convert table `maillog` to utf8mb4................................. ALREADY CONVERTED
- Convert table `mcp_rules` to utf8mb4............................... ALREADY CONVERTED
- Convert table `mtalog` to utf8mb4.................................. ALREADY CONVERTED
- Convert table `mtalog_ids` to utf8mb4.............................. ALREADY CONVERTED
- Convert table `outq` to utf8mb4.................................... ALREADY CONVERTED
- Convert table `saved_filters` to utf8mb4........................... ALREADY CONVERTED
- Convert table `sa_rules` to utf8mb4................................ ALREADY CONVERTED
- Convert table `users` to utf8mb4................................... ALREADY CONVERTED
- Convert table `user_filters` to utf8mb4............................ ALREADY CONVERTED
- Convert table `whitelist` to utf8mb4............................... ALREADY CONVERTED
- Convert table `audit_log` to InnoDB................................ ALREADY CONVERTED
- Convert table `autorelease` to InnoDB.............................. ALREADY CONVERTED
- Convert table `blacklist` to InnoDB................................ ALREADY CONVERTED
- Convert table `inq` to InnoDB...................................... ALREADY CONVERTED
- Convert table `maillog` to InnoDB.................................. ALREADY CONVERTED
- Convert table `mcp_rules` to InnoDB................................ ALREADY CONVERTED
- Convert table `mtalog` to InnoDB................................... ALREADY CONVERTED
- Convert table `mtalog_ids` to InnoDB............................... ALREADY CONVERTED
- Convert table `outq` to InnoDB..................................... ALREADY CONVERTED
- Convert table `saved_filters` to InnoDB............................ ALREADY CONVERTED
- Convert table `sa_rules` to InnoDB................................. ALREADY CONVERTED
- Convert table `users` to InnoDB.................................... ALREADY CONVERTED
- Convert table `user_filters` to InnoDB............................. ALREADY CONVERTED
- Convert table `whitelist` to InnoDB................................ ALREADY CONVERTED
- Search for missing indexes on table `maillog`...................... DONE
Checking for obsolete files:
- Cache dir already removed.......................................... OK
Checking MailScanner.conf settings:
- QuarantineWholeMessage ............................................ OK
- QuarantineWholeMessagesAsQueueFiles ............................... OK
- DetailedSpamReport ................................................ OK
- IncludeScoresInSpamAssassinReport ................................. OK
- SpamActions ....................................................... OK
- HighScoringSpamActions ............................................ OK
- AlwaysLookedUpLast ................................................ OK
Checking conf.php configuration entry:
- All mandatory entries are present.................................. OK
- All obsolete entries are already removed........................... OK
- optional RPC_PORT ................................................. INFO
- optional RPC_SSL .................................................. INFO
- optional RPC_REMOTE_SERVER ........................................ INFO
- optional VIRUS_REGEX .............................................. INFO
- optional LDAP_BIND_PREFIX ......................................... INFO
- optional LDAP_BIND_SUFFIX ......................................... INFO
- optional EXIM_QUEUE_IN ............................................ INFO
- optional EXIM_QUEUE_OUT ........................................... INFO
- optional PWD_RESET_FROM_NAME ...................................... INFO
- optional PWD_RESET_FROM_ADDRESS ................................... INFO
- optional MAIL_SENDER .............................................. INFO
- optional SESSION_NAME ............................................. INFO
- optional SENDMAIL_QUEUE_IN ........................................ INFO
- optional SENDMAIL_QUEUE_OUT ....................................... INFO
- optional MAILWATCH_SMTP_HOSTNAME .................................. INFO
- optional ALLOW_NO_USER_DOMAIN ..................................... INFO
- optional ENABLE_SUPER_DOMAIN_ADMINS ............................... INFO
- Checking minimal PHP version >= 5.4................................ PHP version OK
*** ERROR/WARNING SUMMARY ***
conf.php: optional configuration entry "RPC_PORT" is missing, needed if RPC_ONLY mode is enabled
conf.php: optional configuration entry "RPC_SSL" is missing, needed if RPC_ONLY mode is enabled
conf.php: optional configuration entry "RPC_REMOTE_SERVER" is missing, needed to show number of mails in postfix queues on remote server (RPC)
conf.php: optional configuration entry "VIRUS_REGEX" is missing, needed in distributed setup
conf.php: optional configuration entry "LDAP_BIND_PREFIX" is missing, needed when using LDAP authentication
conf.php: optional configuration entry "LDAP_BIND_SUFFIX" is missing, needed when using LDAP authentication
conf.php: optional configuration entry "EXIM_QUEUE_IN" is missing, needed only if using Exim as MTA
conf.php: optional configuration entry "EXIM_QUEUE_OUT" is missing, needed only if using Exim as MTA
conf.php: optional configuration entry "PWD_RESET_FROM_NAME" is missing, needed if Password Reset feature is enabled
conf.php: optional configuration entry "PWD_RESET_FROM_ADDRESS" is missing, needed if Password Reset feature is enabled
conf.php: optional configuration entry "MAIL_SENDER" is missing, needed if you use Exim or Sendmail Queue
conf.php: optional configuration entry "SESSION_NAME" is missing, needed if experiencing session conflicts
conf.php: optional configuration entry "SENDMAIL_QUEUE_IN" is missing, needed only if using Sendmail as MTA
conf.php: optional configuration entry "SENDMAIL_QUEUE_OUT" is missing, needed only if using Sendmail as MTA
conf.php: optional configuration entry "MAILWATCH_SMTP_HOSTNAME" is missing, needed only if you use a remote SMTP server to send MailWatch emails
conf.php: optional configuration entry "ALLOW_NO_USER_DOMAIN" is missing, allow usernames not in mail format for domain admins and regular users
conf.php: optional configuration entry "ENABLE_SUPER_DOMAIN_ADMINS" is missing, allows domain admins to change domain admins from the same domain |
Hi, Any other idea for help? Thank you. |
Do you have |
@Skywalker-11 yes, this is installed
|
Hi, |
Can you run this as the user MailScanner is running at to verify that it is using the correct versions?
|
@Skywalker-11 Of course, this is result:
|
This is very bizarre to me considering that MailScanner is not python.
|
@shawniverson
On received mail i have this on log:
But never logged to SQL. Thank you for your help, but i don't find anyway to resolve this, on log any warning or error appear less this message:
|
I'm not using MariaDB on my server, but I see that changelog of the last release of DBD::MySQL (4.050) reports a fix for 10.3 compatibility. I don't know if an upgrade will fix your issue, which seems related to UTF8 handling on MariaDB server side. You can also try to force utf8mb4 on server side by editing my.cnf configuration file like this:
forcing any clients, like MailWatch.pm, to use utf8mb4 encoding. |
@endelwar Thank you for your suggestion. I have edit this file:
/etc/my.cnf.d/mariadb-server.cnf
/etc/my.cnf.d/mysql-clients.cnf
Reboot and problem persist :(
Probably change mariadb to mysql? Other suggestion? Thank you for your help. |
Got another report on this issue from eFa Project side so also digging into this. I have no reports from CentOS 7 instances. This could be a clue so I'm going to compare component versions. |
Thank you, i'm waiting for feedback. |
I have the same issue, but very strange, it's not logging some of the messages only...
My site is a web forum sending mostly outgoing notifications to users. And in the logs there is no difference between logged and not logged messages. I forgot to specify, I am using the latest Persona 8 MySQL on Ubuntu 20.10. |
To all having this issue, try the latest MailWatch 1.2.16, there were some updates in it that may help alleviate this issue. |
Hi, I've updated to 1.2.16 but i get same error. Thank you. |
Hi, On file /usr/share/MailScanner/perl/custom/MailWatch.pm on line 369 i've changed: And works, but it's ok this ? Thank you |
This seems to be the best approach to the problem. |
Issue summary
Hi,
I have a fresh install on centos 8.2.2004 with this versions:

I have installed the package required:




perl-DBD-MySQL-4.046-3.module_el8.1.0+203+e45423dc.x86_64
perl-DBI-1.641-3.module_el8.1.0+199+8f0a6bbd.x86_64
Steps to reproduce
I have start mailscanner with this command: MailScanner --debug and return this error:
`[root@mail ~]# MailScanner --debug
In Debugging mode, not forking...
Trying to setlogsock(unix)
internal error, python traceback seen in response
Building a message batch to scan...
Have a batch of 4 messages.
internal error, python traceback seen in response
internal error, python traceback seen in response
internal error, python traceback seen in response
internal error, python traceback seen in response
Stopping now as you are debugging me.
Could not use Custom Function code MailScanner::CustomConfig::InitMailWatchLogging, it could not be "eval"ed. Make sure the module is correct with perl -wc (Error: DBD::mysql::st execute failed: Incorrect string value: '\xE3o spa...' for column
mailscanner
.maillog
.spamreport
at row 1 at /usr/share/MailScanner/perl/custom/MailWatch.pm line 226, line 30.) at /usr/share/MailScanner/perl/MailScanner/Config.pm line 1053.
`
Actual result
I have verify and database on utf8mb4_unicode_ci
I have search but unsuccesfully resolve my problem.
Can you help me on this problem?
Thank you
Installation
Version and method
Server configuration
The text was updated successfully, but these errors were encountered: