Overview
| Comment: | remove `unknown`, expand output and logs |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
0acb6536aec8d481fcebf9f3685de260 |
| User & Date: | arcade on 2026-09-10 07:06:19.036 |
| Other Links: | manifest | tags |
Context
|
2026-09-10
| ||
| 07:07 | bump check-in: cb1fdeff6f user: arcade tags: trunk | |
| 07:06 | remove `unknown`, expand output and logs check-in: 0acb6536ae user: arcade tags: trunk | |
|
2026-08-01
| ||
| 19:32 | and fix tests check-in: 40a93e9a58 user: arcade tags: trunk | |
Changes
Modified smtp2tg.toml.example
from [448e8e5d20]
to [02af9a5a15].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - + - - - + - - - + + + + - + | # vi:ft=toml: # Telegram API key api_key = "YOU_KNOW_WHERE_TO_GET_THIS" # Telegram API gateway (when you are running your own) api_gateway = "https://api.telegram.org" # <- note no trailing slash # where to listen on (sockets are not supported since 0.3.0) listen_on = "0.0.0.0:25" |
Modified src/lib.rs
from [984fc307f8]
to [14885cdcbb].
| ︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + + + + + - - - + + + - - - + + + + + |
/// # Errors
/// Returns an error if configuration is invalid, files are inaccessible, or
/// server fails to start.
pub async fn async_main () -> Result<()> {
let args = Args::parse();
let config_file = Path::new(&args.config);
if !config_file.exists() {
|
| ︙ |
Modified src/mail.rs
from [478a14c8ba]
to [1c18fc67bc].
| ︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | + |
#[derive(Clone, Debug)]
pub struct MailServer {
data: Vec<u8>,
headers: Option<SomeHeaders>,
tg: Arc<TelegramTransport>,
fields: HashSet<String>,
address: Regex,
domains: HashSet<String>,
}
impl MailServer {
/// Initializes the mail server: sets up the Telegram API client and
/// validates all required configuration values.
///
/// # Arguments
|
| ︙ | |||
91 92 93 94 95 96 97 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | + + - - + + - - + - + + - - + + - |
let mut domains: HashSet<String> = HashSet::new();
let extra_domains = settings.get_array("domains").stack()?;
for domain in extra_domains {
let domain = domain.to_string().to_lowercase();
if RE_DOMAIN.is_match(&domain) {
domains.insert(domain);
} else {
bail!("Invalid domain in configuration: '{domain}'\n\
Domains must be valid (e.g., 'example.com', 'localhost').\n\
|
| ︙ |
Modified src/telegram.rs
from [b857ac5a83]
to [683b75dd50].
| ︙ | |||
92 93 94 95 96 97 98 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - + |
/// # Returns
/// * `Result<&ChatPeerId>` - Chat ID if found.
///
/// # Errors
/// Returns an error if `name` is not configured.
pub fn get (&self, name: &str) -> Result<&ChatPeerId> {
self.recipients.get(&name.to_lowercase())
|
| ︙ |
Modified src/utils.rs
from [b825a3dd51]
to [999160a858].
| ︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 | - + - + - |
/// # Returns
/// * `Result<Cow<'a, str>>` - Escaped text or error if invalid.
///
/// # Errors
/// Returns an error if the text contains Telegram closing tags (`</pre>`, `</code>`).
pub fn validate <'a>(text: &'a str) -> Result<Cow<'a, str>> {
if RE_CLOSING.is_match(text) {
|