Commit Graph

32 Commits

Author SHA1 Message Date
Badlop b3c8d25104 Reword modules documentation to reflect the usage of local configuration files 2022-08-12 10:52:20 +02:00
Badlop 04f4489427 Convert modules README.txt to markdown syntax 2022-08-12 10:45:09 +02:00
Badlop 6be46dacc9 Fix compilation and Xref warnings 2022-07-27 18:14:29 +02:00
Badlop c9084fae66 Modules that require configuration, provide it commented (#303) 2021-07-07 21:53:44 +02:00
Badlop a95e657a21 Add simple mod_doc/0 to prevent warnings; they won't be used anyway 2021-07-06 21:02:29 +02:00
Badlop 4cde5d84f2 Update xmpp.hrl path to support compilation when copied to ejabberd/src/ 2021-02-08 00:15:27 +01:00
Badlop f32bb792bc Update copyright to 2020 (processone/ejabberd#3149) 2020-01-29 11:38:28 +01:00
Holger Weiss 20fb74c363 mod_spam_filter: Update code for ejabberd >= 19.08
Update mod_spam_filter to use ejabberd's new configuration parsing
infrastructure.

Closes #280.
2019-11-07 01:08:10 +01:00
Holger Weiss f2faca6dc9 mod_spam_filter: Fix unregistration of global hook
Don't unregister the 'reopen_log_hook' if the module is loaded for
another host.
2019-07-14 15:10:11 +02:00
Holger Weiss b410f64f33 mod_spam_filter: Fix previous simplification 2019-07-13 15:01:07 +02:00
Holger Weiss 7c1b83941c mod_spam_filter: Apply small code simplification 2019-07-13 14:43:16 +02:00
Holger Weiss 2a7ae832a8 mod_spam_filter: Fix function specification 2019-07-12 21:11:21 +02:00
Holger Weiss 4af4244975 mod_spam_filter: Remove unused macro 2019-07-12 14:29:13 +02:00
Holger Weiss 689f526cea mod_spam_filter: Register 'reopen_log_hook'
Don't forget to register the 'reopen_log_hook' for reopening the spam
dump file.

Thanks to Nico Wellpott for reporting this issue.
2019-05-05 21:49:34 +02:00
Holger Weiss 34bf1a7d6c mod_spam_filter: Add some debug output
Log a [debug] line when the spam dump file is opened or closed.
2019-05-05 21:33:53 +02:00
Holger Weiss 0bf94ba446 mod_spam_filter: Update type specification 2019-04-25 18:27:11 +02:00
Holger Weiss 92fadcdf4e mod_spam_filter: Auto-create dump directory
If the directory holding the specified "spam_dump_file" doesn't exist,
create it on startup.
2019-04-25 18:23:17 +02:00
Holger Weiss fe121057f2 mod_spam_filter: Don't create wrong dump file name
Don't attempt creation of the dump file while checking the validity of
the "spam_dump_file" option, as the @HOST@ keyword can't be expanded at
this point.

Thanks to Nico Wellpott for reporting this issue.
2019-04-25 17:53:42 +02:00
Holger Weiss cb0a14c89a mod_spam_filter: Check whether module is loaded
If the API commands are called with 'global' instead of a host name,
only run the command for those virtual hosts that actually have the
module loaded.
2019-04-25 11:08:32 +02:00
Holger Weiss 4476c95f14 mod_spam_filter: Silence reload_spam_filter_files
Don't let the reload_spam_filter_files command spit out text on success.
2019-04-25 10:05:47 +02:00
Holger Weiss 4e15dcbd7d mod_spam_filter: Clarify "spam_dump_file" docs
Mention that the spam messages will be dumped in raw XML format, and
that a <delay/> tag is added.
2019-04-24 19:36:23 +02:00
Holger Weiss 6fc4fccfbb mod_spam_filter: Adjust docs regarding file paths
The specified file paths don't actually have to be absolute path names.
2019-04-24 19:22:36 +02:00
Holger Weiss 362c866862 mod_spam_filter: Add "spam_dump_file" option
If the new "spam_dump_file" option is used, messages classified as spam
will be written to the specified file path.
2019-04-24 19:19:15 +02:00
Holger Weiss c1591030b0 mod_spam_filter: Don't filter MUC messages 2019-04-15 00:15:10 +02:00
Holger Weiss 4787e890af mod_spam_filter: Fix typo in log message 2019-04-10 01:49:39 +02:00
Holger Weiss 05a5f002a3 mod_spam_filter: Return error for presence spam
Also return an error stanza for rejected presence spam, not just for
rejected messages.
2019-04-10 01:34:19 +02:00
Holger Weiss e6249c41e2 mod_spam_filter: Also log spam recipient
Also log the recipient of rejected stanzas, not just the sender.
2019-04-10 01:12:20 +02:00
Holger Weiss 6a877d7018 mod_spam_filter: Add 'drop_from_spam_filter_cache'
Add a 'drop_from_spam_filter_cache' command that allows for removing
individual JIDs from the cache.
2019-04-10 00:49:36 +02:00
Holger Weiss b5daceaac2 mod_spam_filter: Apply cosmetic changes 2019-04-09 22:46:05 +02:00
Holger Weiss f459a7e57c mod_spam_filter: Also check body for listed JIDs
Also check whether the message body contains a listed JID (usually
mentioned as a contact address), rather than just using the JID list to
check the 'from' address of incoming stanzas.
2019-04-09 20:46:12 +02:00
Holger Weiss 8f63b2cbae mod_spam_filter: Check recipient's domain
Don't crash if the module isn't loaded for the 'to' domain.  This would
otherwise happen for stanzas sent to subdomains (e.g., MUC messages).

Thanks to Nico Wellpott for reporting the bug and testing the fix.
2019-04-09 01:21:55 +02:00
Holger Weiss 83117240d2 Import mod_spam_filter
Add a module that allows for filtering spam messages and subscription
requests based on lists of known spammer JIDs and/or URLs mentioned in
spam messages.

Thanks to Georg Lukas for his suggestions.
2019-04-09 00:51:33 +02:00