Compare commits

...

4 Commits

Author SHA1 Message Date
M66B ed6fb67b42 Refactoring
1 week ago
M66B 8f1d0e8708 Highlight domain on show auth
1 week ago
M66B 80595865a2 Updated FAQ
1 week ago
M66B 5c8ae7feca Updated changelog
1 week ago

@ -18,7 +18,7 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### [Acantholipan](https://en.wikipedia.org/wiki/Acantholipan) ### [Acantholipan](https://en.wikipedia.org/wiki/Acantholipan)
### 1.2208 - 2024-06-22 ### 1.2208 - 2024-06-22 *
* Changed copy signature button into edit signature button * Changed copy signature button into edit signature button
* Small improvements and minor bug fixes * Small improvements and minor bug fixes

@ -2804,11 +2804,17 @@ Please see [here](https://developer.android.com/reference/java/util/regex/Patter
Note that you need to match the complete text from the first to the last character. Note that you need to match the complete text from the first to the last character.
You can test a regex [here](https://regexr.com/). You can test a regex [here](https://regexr.com/).
You can use a regex like this to match a top-level domain (tld):
```
.*@.*\.xyz.*
```
Note that a regular expression supports an *or* operator, so if you want to match multiple senders, you can do this: Note that a regular expression supports an *or* operator, so if you want to match multiple senders, you can do this:
`` ```
.*alice@example\.org.*|.*bob@example\.org.*|.*carol@example\.org.* .*alice@example\.org.*|.*bob@example\.org.*|.*carol@example\.org.*
`` ```
Note that [dot all mode](https://developer.android.com/reference/java/util/regex/Pattern#DOTALL) is enabled Note that [dot all mode](https://developer.android.com/reference/java/util/regex/Pattern#DOTALL) is enabled
to be able to match [unfolded headers](https://tools.ietf.org/html/rfc2822#section-3.2.3). to be able to match [unfolded headers](https://tools.ietf.org/html/rfc2822#section-3.2.3).

@ -18,7 +18,7 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### [Acantholipan](https://en.wikipedia.org/wiki/Acantholipan) ### [Acantholipan](https://en.wikipedia.org/wiki/Acantholipan)
### 1.2208 - 2024-06-22 ### 1.2208 - 2024-06-22 *
* Changed copy signature button into edit signature button * Changed copy signature button into edit signature button
* Small improvements and minor bug fixes * Small improvements and minor bug fixes

@ -4971,10 +4971,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
} }
private void onShowAuth(TupleMessageEx message, String title) { private void onShowAuth(TupleMessageEx message, String title) {
StringBuilder sb = new StringBuilder(); SpannableStringBuilder ssb = new SpannableStringBuilderEx();
if (title != null) if (title != null)
sb.append(title).append('\n'); ssb.append(title).append('\n');
List<String> result = new ArrayList<>(); List<String> result = new ArrayList<>();
if (Boolean.FALSE.equals(message.dkim)) if (Boolean.FALSE.equals(message.dkim))
@ -4989,61 +4989,67 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
result.add("MX"); result.add("MX");
if (result.size() > 0) if (result.size() > 0)
sb.append(context.getString(R.string.title_authentication_failed, TextUtils.join(", ", result))) ssb.append(context.getString(R.string.title_authentication_failed, TextUtils.join(", ", result)))
.append('\n'); .append('\n');
if (authentication_indicator) { if (authentication_indicator) {
if (check_tls) if (check_tls)
sb.append("TLS: ") ssb.append("TLS: ")
.append(message.tls == null ? "-" : (message.tls ? "✓" : "✗")).append('\n'); .append(message.tls == null ? "-" : (message.tls ? "✓" : "✗")).append('\n');
sb.append("DKIM: ") ssb.append("DKIM: ")
.append(message.dkim == null ? "-" : (message.dkim ? "✓" : "✗")).append('\n'); .append(message.dkim == null ? "-" : (message.dkim ? "✓" : "✗")).append('\n');
sb.append("SPF: ") ssb.append("SPF: ")
.append(message.spf == null ? "-" : (message.spf ? "✓" : "✗")).append('\n'); .append(message.spf == null ? "-" : (message.spf ? "✓" : "✗")).append('\n');
sb.append("DMARC: ") ssb.append("DMARC: ")
.append(message.dmarc == null ? "-" : (message.dmarc ? "✓" : "✗")).append('\n'); .append(message.dmarc == null ? "-" : (message.dmarc ? "✓" : "✗")).append('\n');
if (message.auth != null) if (message.auth != null)
sb.append("SMTP: ") ssb.append("SMTP: ")
.append(message.auth ? "✓" : "✗").append('\n'); .append(message.auth ? "✓" : "✗").append('\n');
if (check_mx) if (check_mx)
sb.append("MX: ") ssb.append("MX: ")
.append(message.mx == null ? "-" : (message.mx ? "✓" : "✗")).append('\n'); .append(message.mx == null ? "-" : (message.mx ? "✓" : "✗")).append('\n');
} }
if (native_dkim && !TextUtils.isEmpty(message.signedby)) { if (native_dkim && !TextUtils.isEmpty(message.signedby)) {
sb.append(context.getString(R.string.title_signed_by)).append(' '); ssb.append(context.getString(R.string.title_signed_by)).append(' ');
for (String signer : message.signedby.split(",")) for (String signer : message.signedby.split(",")) {
sb.append(signer).append('\n'); int start = ssb.length();
ssb.append(signer);
ssb.setSpan(new StyleSpan(Typeface.BOLD), start, ssb.length(), 0);
ssb.append('\n');
}
} }
if (Boolean.TRUE.equals(message.blocklist)) if (Boolean.TRUE.equals(message.blocklist))
sb.append(context.getString(R.string.title_on_blocklist)).append('\n'); ssb.append(context.getString(R.string.title_on_blocklist)).append('\n');
if (Boolean.FALSE.equals(message.from_domain) && message.smtp_from != null) if (Boolean.FALSE.equals(message.from_domain) && message.smtp_from != null)
for (Address smtp_from : message.smtp_from) { for (Address smtp_from : message.smtp_from) {
String domain = UriHelper.getEmailDomain(((InternetAddress) smtp_from).getAddress()); String domain = UriHelper.getEmailDomain(((InternetAddress) smtp_from).getAddress());
String root = UriHelper.getRootDomain(context, domain); String root = UriHelper.getRootDomain(context, domain);
if (root != null) if (root != null)
sb.append(context.getString(R.string.title_via, root)).append('\n'); ssb.append(context.getString(R.string.title_via, root)).append('\n');
} }
if (Boolean.FALSE.equals(message.reply_domain)) { if (Boolean.FALSE.equals(message.reply_domain)) {
String[] warning = message.checkReplyDomain(context); String[] warning = message.checkReplyDomain(context);
if (warning != null) if (warning != null)
sb.append(context.getString(R.string.title_reply_domain, warning[0], warning[1])).append('\n'); ssb.append(context.getString(R.string.title_reply_domain, warning[0], warning[1])).append('\n');
} }
if (message.from != null && message.from.length > 0) { if (message.from != null && message.from.length > 0) {
String email = ((InternetAddress) message.from[0]).getAddress(); String email = ((InternetAddress) message.from[0]).getAddress();
String domain = UriHelper.getEmailDomain(email); String domain = UriHelper.getEmailDomain(email);
if (!TextUtils.isEmpty(domain)) if (!TextUtils.isEmpty(domain)) {
sb.insert(0, '\n').insert(0, domain); ssb.insert(0, "\n").insert(0, domain);
ssb.setSpan(new StyleSpan(Typeface.BOLD), 0, domain.length(), 0);
}
} }
if (sb.length() > 0 && sb.charAt(sb.length() - 1) == '\n') if (ssb.length() > 0 && ssb.charAt(ssb.length() - 1) == '\n')
sb.deleteCharAt(sb.length() - 1); ssb.delete(ssb.length() - 1, ssb.length());
ToastEx.makeText(context, sb.toString(), Toast.LENGTH_LONG).show(); ToastEx.makeText(context, ssb, Toast.LENGTH_LONG).show();
} }
private void onShowPriority(TupleMessageEx message) { private void onShowPriority(TupleMessageEx message) {

@ -1491,7 +1491,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
onEval(intent); onEval(intent);
ServiceSend.boot(this); ServiceSend.watchdog(this);
scheduleWatchdog(this); scheduleWatchdog(this);
} }

@ -1530,8 +1530,10 @@ X-Google-Original-From: Somebody &lt;somebody+extra@example.org&gt;</code></pre>
<pre><code>jsoup:html &gt; body &gt; div &gt; a[href=https://example.org]</code></pre> <pre><code>jsoup:html &gt; body &gt; div &gt; a[href=https://example.org]</code></pre>
<p>You can use multiple rules, possibly with a <em>stop processing</em>, for an <em>or</em> or a <em>not</em> condition. Since version 1.2173 there is a <em>NOT</em> option for conditions that accept a regex.</p> <p>You can use multiple rules, possibly with a <em>stop processing</em>, for an <em>or</em> or a <em>not</em> condition. Since version 1.2173 there is a <em>NOT</em> option for conditions that accept a regex.</p>
<p>Matching is not case sensitive, unless you use <a href="https://en.wikipedia.org/wiki/Regular_expression">regular expressions</a>. Please see <a href="https://developer.android.com/reference/java/util/regex/Pattern">here</a> for the documentation of Java regular expressions. Note that you need to match the complete text from the first to the last character. You can test a regex <a href="https://regexr.com/">here</a>.</p> <p>Matching is not case sensitive, unless you use <a href="https://en.wikipedia.org/wiki/Regular_expression">regular expressions</a>. Please see <a href="https://developer.android.com/reference/java/util/regex/Pattern">here</a> for the documentation of Java regular expressions. Note that you need to match the complete text from the first to the last character. You can test a regex <a href="https://regexr.com/">here</a>.</p>
<p>You can use a regex like this to match a top-level domain (tld):</p>
<pre><code>.*@.*\.xyz.*</code></pre>
<p>Note that a regular expression supports an <em>or</em> operator, so if you want to match multiple senders, you can do this:</p> <p>Note that a regular expression supports an <em>or</em> operator, so if you want to match multiple senders, you can do this:</p>
<p><code>.*alice@example\.org.*|.*bob@example\.org.*|.*carol@example\.org.*</code></p> <pre><code>.*alice@example\.org.*|.*bob@example\.org.*|.*carol@example\.org.*</code></pre>
<p>Note that <a href="https://developer.android.com/reference/java/util/regex/Pattern#DOTALL">dot all mode</a> is enabled to be able to match <a href="https://tools.ietf.org/html/rfc2822#section-3.2.3">unfolded headers</a>.</p> <p>Note that <a href="https://developer.android.com/reference/java/util/regex/Pattern#DOTALL">dot all mode</a> is enabled to be able to match <a href="https://tools.ietf.org/html/rfc2822#section-3.2.3">unfolded headers</a>.</p>
<p><br /></p> <p><br /></p>
<p><strong>Expressions</strong></p> <p><strong>Expressions</strong></p>

@ -18,7 +18,7 @@ For support you can use the contact form.
Acantholipan Acantholipan
1.2208 - 2024-06-22 1.2208 - 2024-06-22 *
* Changed copy signature button into edit signature button * Changed copy signature button into edit signature button
* Small improvements and minor bug fixes * Small improvements and minor bug fixes

Loading…
Cancel
Save