Software / code / prosody-modules
Annotate
mod_alias/README.md @ 6113:c0cb43817b7c
mod_compliance_latest: using module:log_status
diff --git a/mod_compliance_latest/mod_compliance_latest.lua b/mod_compliance_latest/mod_compliance_latest.lua
--- a/mod_compliance_latest/mod_compliance_latest.lua
+++ b/mod_compliance_latest/mod_compliance_latest.lua
@@ -1,6 +1,6 @@
local success, err = pcall(function() module:depends("compliance_2023") end)
if not success then
- module:log("error", "Error, can't load module: mod_compliance_2023. Is this module downloaded in a folder readable by prosody?")
- return 1, "Error: Couldn't load dependency mod_compliance_2023."
+module:log_status( "error", "Error, can't load module: mod_compliance_2023. Is this module downloaded into a folder readable by prosody?" )
+return false
end
| author | Menel <menel@snikket.de> |
|---|---|
| date | Mon, 23 Dec 2024 14:09:56 +0100 |
| parent | 6029:4ac59707bcfb |
| child | 6211:750d64c47ec6 |
| rev | line source |
|---|---|
|
1953
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
1 --- |
| 6029 | 2 summary: "Point alias accounts or domains to correct XMPP user" |
|
6005
49e3289c145e
mod_alias: Update Compability section and label
Menel <menel@snikket.de>
parents:
6003
diff
changeset
|
3 labels: |
|
49e3289c145e
mod_alias: Update Compability section and label
Menel <menel@snikket.de>
parents:
6003
diff
changeset
|
4 - 'Stage-Alpha' |
|
1953
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
5 ... |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
6 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
7 Introduction |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
8 ============ |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
9 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
10 This module allows you to set up aliases that alert people who try to |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
11 contact them or add them to their roster what your actual JID is. This |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
12 is useful for changing JIDs, or just in the case where you own both |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
13 example.com and example.net, and want people who contact you@example.com |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
14 to be alerted to contact you at you@example.net instead. |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
15 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
16 This type of aliasing is well supported in the email world, but very hard |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
17 to handle with XMPP, this module sidesteps all the hard problems by just |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
18 sending the user a helpful message, requiring humans to decide what they |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
19 actually want to do. |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
20 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
21 This doesn't require any special support on other clients or servers, |
| 2876 | 22 just the ability to receive messages. |
|
1953
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
23 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
24 Configuration |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
25 ============= |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
26 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
27 Add the module to the `modules_enabled` list. |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
28 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
29 modules_enabled = { |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
30 ... |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
31 "alias"; |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
32 } |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
33 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
34 Then set up your list of aliases, aliases can be full or bare JIDs, |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
35 or hosts: |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
36 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
37 aliases = { |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
38 ["old@example.net"] = "new@example.net"; |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
39 ["you@example.com"] = "you@example.net"; |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
40 ["conference.example.com"] = "conference.example.net"; |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
41 } |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
42 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
43 You can also set up a custom response, by default it is: |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
44 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
45 alias_response = "User $alias can be contacted at $target"; |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
46 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
47 A script named mod_alias_postfixadmin.sh is included in this directory to |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
48 generate the aliases array directly from a postfixadmin MySQL database. |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
49 Instructions for use are included in the script. |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
50 |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
51 Compatibility |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
52 ============= |
|
0c3ba5ff7a3b
mod_alias: New alias module
moparisthebest <admin@moparisthebest.com>
parents:
diff
changeset
|
53 |
| 6029 | 54 ------------–---------- -------------- |
| 55 trunk as of 2024-10-22 Works | |
| 56 0.12 Works | |
| 57 ----------------------- -------------- | |
|
6005
49e3289c145e
mod_alias: Update Compability section and label
Menel <menel@snikket.de>
parents:
6003
diff
changeset
|
58 |