postfix_status_line 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/postfix_status_line_core.c +12 -0
- data/lib/postfix_status_line/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9cf6a9b805258da7c1ba10efe6aa48d096461d4
|
4
|
+
data.tar.gz: 74b88af3d7ac1c53493b2971a4f0f8ef12ed293d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aed7221ceff9610ed765147a015d078c54a195f771693afc3b53c1ee0aca38d44715cd0b22ab2e847e0896626bc4748e78fd07838ef33e981a0ad303fdc08b1a
|
7
|
+
data.tar.gz: 1c00c9f0724ce0ffe8c0c57253b38c793e68801851df83a718a04852cd21a14ec36b2f6a33d98a9f894ba1ea85fe41684347b9eed31003ddf825f18559cd0f53
|
@@ -216,6 +216,16 @@ static void put_to(char *value, VALUE hash, bool mask, bool include_hash, char *
|
|
216
216
|
put_domain(value, hash);
|
217
217
|
}
|
218
218
|
|
219
|
+
static void put_from(char *value, VALUE hash, bool mask) {
|
220
|
+
char *email = remove_bracket(value);
|
221
|
+
|
222
|
+
if (mask) {
|
223
|
+
mask_email(value); // not "email"!
|
224
|
+
}
|
225
|
+
|
226
|
+
rb_hash_aset(hash, rb_str_new2("from"), rb_str_new2(email));
|
227
|
+
}
|
228
|
+
|
219
229
|
static void put_attr(char *str, VALUE hash, bool mask, bool include_hash, char *salt, size_t salt_len) {
|
220
230
|
char *value = strchr(str, '=');
|
221
231
|
|
@@ -234,6 +244,8 @@ static void put_attr(char *str, VALUE hash, bool mask, bool include_hash, char *
|
|
234
244
|
rb_hash_aset(hash, v_key, INT2NUM(atoi(value)));
|
235
245
|
} else if (strcmp(str, "to") == 0) {
|
236
246
|
put_to(value, hash, mask, include_hash, salt, salt_len);
|
247
|
+
} else if (strcmp(str, "from") == 0) {
|
248
|
+
put_from(value, hash, mask);
|
237
249
|
} else if (strcmp(str, "status") == 0) {
|
238
250
|
put_status(value, hash, mask);
|
239
251
|
} else {
|