[Mimedefang] Documentational TLD by RFC 2606
imacat
imacat at mail.imacat.idv.tw
Sun Apr 15 14:07:46 EDT 2007
Dear all,
Hi. This is imacat from Taiwan. I was dealing one of my local
rules regarding to mydomain.com, in mimedefang-filter, and found that
"mydomain.com" is used throughout the documents of MIMEDefang.
According to RFC 2606 chapter 2,
http://www.rfc-editor.org/rfc/rfc2606.txt
documentation should use .example TLD instead of .com. From simple
grepping I saw that at least in 4 files:
examples/suggested-minimum-filter-for-windows-clients
mimedefang-filter.5.in
tests/test-filter
watch-mimedefang.8
there are various example domains used:
mydomain.com
mydomain.net
spammer.com
badguy.com
company.com
domain.com
abc.com
abc.net
xyz.com
xyz.net
Since most of these domains above belong to real companies, to avoid
confusion I suggest MIMEDefang should change them according to RFC 2606.
I propose a simple patch below. Hope that this helps.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
diff -u -r mimedefang-2.62.orig/examples/suggested-minimum-filter-for-windows-clients mimedefang-2.62/examples/suggested-minimum-filter-for-windows-clients
- --- mimedefang-2.62.orig/examples/suggested-minimum-filter-for-windows-clients 2006-10-31 03:56:24.000000000 +0800
+++ mimedefang-2.62/examples/suggested-minimum-filter-for-windows-clients 2007-04-16 01:25:40.000000000 +0800
@@ -17,7 +17,7 @@
#***********************************************************************
# Set administrator's e-mail address here. The administrator receives
# quarantine messages and is listed as the contact for site-wide
- -# MIMEDefang policy. A good example would be 'defang-admin at mydomain.com'
+# MIMEDefang policy. A good example would be 'defang-admin at mydomain.example'
#***********************************************************************
$AdminAddress = 'postmaster at localhost';
$AdminName = "MIMEDefang Administrator's Full Name";
@@ -25,7 +25,7 @@
#***********************************************************************
# Set the e-mail address from which MIMEDefang quarantine warnings and
# user notifications appear to come. A good example would be
- -# 'mimedefang at mydomain.com'. Make sure to have an alias for this
+# 'mimedefang at mydomain.example'. Make sure to have an alias for this
# address if you want replies to it to work.
#***********************************************************************
$DaemonAddress = 'mimedefang at localhost';
diff -u -r mimedefang-2.62.orig/mimedefang-filter.5.in mimedefang-2.62/mimedefang-filter.5.in
- --- mimedefang-2.62.orig/mimedefang-filter.5.in 2007-03-31 00:17:36.000000000 +0800
+++ mimedefang-2.62/mimedefang-filter.5.in 2007-04-16 01:50:26.000000000 +0800
@@ -157,13 +157,13 @@
.PP
For example, if you wish to reject connection attempts from any
- -machine in the spammer.com domain, you could use this function:
+machine in the spammer.example domain, you could use this function:
.nf
sub filter_relay {
my ($ip, $name) = @_;
- - if ($name =~ /spammer\\.com$/) {
- - return ('REJECT', "Sorry; spammer.com is blacklisted");
+ if ($name =~ /spammer\\.example$/) {
+ return ('REJECT', "Sorry; spammer.example is blacklisted");
}
return ('CONTINUE', "ok");
}
@@ -220,14 +220,14 @@
same meaning as the return value from \fBfilter_helo\fR.
.PP
- -For example, if you wish to reject messages from spammer at badguy.com,
+For example, if you wish to reject messages from spammer at badguy.example,
you could use this function:
.nf
sub filter_sender {
my ($sender, $ip, $hostname, $helo) = @_;
- - if ($sender =~ /^<?spammer\\@badguy\\.com>?$/i) {
- - return ('REJECT', 'Sorry; spammer at badguy.com is blacklisted.');
+ if ($sender =~ /^<?spammer\\@badguy\\.example>?$/i) {
+ return ('REJECT', 'Sorry; spammer at badguy.example is blacklisted.');
}
return ('CONTINUE', "ok");
}
@@ -310,18 +310,18 @@
works.)
.PP
- -For example, if you wish to reject messages from spammer at badguy.com,
- -unless they are to postmaster at mydomain.com, you could use this function:
+For example, if you wish to reject messages from spammer at badguy.example,
+unless they are to postmaster at mydomain.example, you could use this function:
.nf
sub filter_recipient {
my ($recipient, $sender, $ip, $hostname, $first, $helo,
$rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
- - if ($sender =~ /^<?spammer\\@badguy\\.com>?$/i) {
- - if ($recipient =~ /^<?postmaster\\@mydomain\\.com>?$/i) {
+ if ($sender =~ /^<?spammer\\@badguy\\.example>?$/i) {
+ if ($recipient =~ /^<?postmaster\\@mydomain\\.example>?$/i) {
return ('CONTINUE', "ok");
}
- - return ('REJECT', 'Sorry; spammer at badguy.com is blacklisted.');
+ return ('REJECT', 'Sorry; spammer at badguy.example is blacklisted.');
}
return ('CONTINUE', "ok");
}
@@ -1071,7 +1071,7 @@
if ($size > 1000000) {
return action_replace_with_url($entity,
"/home/httpd/html/mail_parts",
- - "http://mailserver.company.com/mail_parts",
+ "http://mailserver.company.example/mail_parts",
"The attachment was larger than 1,000,000 bytes.\\n" .
"It was removed, but may be accessed at this URL:\\n\\n" .
"\\t_URL_\\n");
@@ -1081,7 +1081,7 @@
This example moves attachments greater than 1,000,000 bytes into
/home/httpd/html/mail_parts and replaces them with a link. The
directory should be accessible via a Web server at
- -http://mailserver.company.com/mail_parts.
+http://mailserver.company.example/mail_parts.
The generated name is created by performing a SHA1 hash of the part and
adding the extension to the ASCII-HEX representation of the hash. If many
@@ -1427,15 +1427,15 @@
.fi
stream_by_domain() looks at all the recipients of the message, and if
- -they belong to the same domain (e.g., joe at domain.com, jane at domain.com and
- -sue at domain.com), it returns 0 and sets the global variable $Domain to
- -the domain (domain.com in this example.)
+they belong to the same domain (e.g., joe at domain.example, jane at domain.example and
+sue at domain.example), it returns 0 and sets the global variable $Domain to
+the domain (domain.example in this example.)
If users are in different domains, stream_by_domain() \fIresends\fR
the message (once to each domain) and returns 1 For example, if the
- -original recipients are joe at abc.net, jane at xyz.net and sue at abc.net, the
- -original message is resent twice: One copy to joe at abc.net and
- -sue at abc.net, and another copy to jane at xyz.net. Also, any subsequent
+original recipients are joe at abc.example, jane at xyz.example and sue at abc.example, the
+original message is resent twice: One copy to joe at abc.example and
+sue at abc.example, and another copy to jane at xyz.example. Also, any subsequent
scanning is canceled (filter() and filter_end() will \fInot\fR be
called for the original message) and the message is silently
discarded.
@@ -1453,10 +1453,10 @@
.nf
sub filter {
my($entity, $fname, $ext, $type) = @_;
- - if ($Domain eq "abc.com") {
- - # Filter actions for abc.com
- - } elsif ($Domain eq "xyz.com") {
- - # Filter actions for xyz.com
+ if ($Domain eq "abc.example") {
+ # Filter actions for abc.example
+ } elsif ($Domain eq "xyz.example") {
+ # Filter actions for xyz.example
} else {
# Default filter actions
}
@@ -1489,7 +1489,7 @@
your mail server considerably.
Also, a "recipient" is determined before alias expansion. So
- -"all at mydomain.com" is considered a single recipient, even if Sendmail
+"all at mydomain.example" is considered a single recipient, even if Sendmail
delivers to a list.
If you have Sendmail 8.12, then locally-submitted messages are sent via
diff -u -r mimedefang-2.62.orig/tests/test-filter mimedefang-2.62/tests/test-filter
- --- mimedefang-2.62.orig/tests/test-filter 2006-04-01 02:04:48.000000000 +0800
+++ mimedefang-2.62/tests/test-filter 2007-04-16 01:25:40.000000000 +0800
@@ -14,14 +14,14 @@
#***********************************************************************
# Set administrator's name here. The administrator receives
# quarantine messages and is listed as the contact for site-wide
- -# MIMEDefang policy. A good example would be 'defang-admin at mydomain.com'
+# MIMEDefang policy. A good example would be 'defang-admin at mydomain.example'
#***********************************************************************
$Administrator = 'postmaster at localhost';
#***********************************************************************
# Set the e-mail address from which MIMEDefang quarantine warnings and
# user notifications appear to come. A good example would be
- -# 'mimedefang at mydomain.com'. Make sure to have an alias for this
+# 'mimedefang at mydomain.example'. Make sure to have an alias for this
# address if you want replies to it to work.
#***********************************************************************
$DaemonAddress = 'mailer-daemon at localhost';
diff -u -r mimedefang-2.62.orig/watch-mimedefang.8 mimedefang-2.62/watch-mimedefang.8
- --- mimedefang-2.62.orig/watch-mimedefang.8 2007-01-12 23:02:42.000000000 +0800
+++ mimedefang-2.62/watch-mimedefang.8 2007-04-16 01:47:16.000000000 +0800
@@ -98,11 +98,11 @@
but have it monitor the mail server with a remote session.
The best way to establish a remote session is via SSH. For example,
- -if you are running MIMEDefang on "mail.mydomain.net", you can type
+if you are running MIMEDefang on "mail.mydomain.example", you can type
the following into the \fBControl Command\fR entry box and press enter:
.nf
- - ssh root at mail.mydomain.net md-mx-ctrl
+ ssh root at mail.mydomain.example md-mx-ctrl
.fi
You \fImust\fR have a public/private key for the target machine and you
@@ -110,7 +110,7 @@
that requires entry of a password or passphrase.
Assuming your SSH setup is correct, \fBwatch-mimedefang\fR will open
- -an SSH connection to mail.mydomain.net and exchange low-bandwith information
+an SSH connection to mail.mydomain.example and exchange low-bandwith information
over that session for monitoring purposes.
.SH COMMAND-LINE OPTIONS
@@ -155,11 +155,11 @@
.SH EXAMPLE
- -As an example, to monitor MIMEDefang on the machine "mail.mydomain.net"
+As an example, to monitor MIMEDefang on the machine "mail.mydomain.example"
updating once a second, with the 5m and 10m plots turned off, use:
.nf
- - watch-mimedefang -command 'ssh root at mail.mydomain.net md-mx-ctrl' \\
+ watch-mimedefang -command 'ssh root at mail.mydomain.example md-mx-ctrl' \\
-interval 1000 -5m 0 -10m 0 -title "mail"
.fi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFGImZXi9gubzC5S1wRAsZYAKCjAzeNTNRSySeiGGBgn12a8WokQwCfZYap
M15XEPw8QMI6jLXqc56Gvwc=
=pXUK
-----END PGP SIGNATURE-----
--
Best regards,
imacat ^_*' <imacat at mail.imacat.idv.tw>
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt
<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20070416/2060989a/attachment-0002.sig>
More information about the MIMEDefang
mailing list