9 Dec, 2008 in
Sendmail by
admin
This sendmail directive implements the number of allowed recipients of each email message. One signature of an email spammer is delivering an email to thousands and hundreds of recipients all at the same time. This sendmail directive prevents that.
MAX_RCPTS_PER_MESSAGE
If an email message comes with more than the allowed number of recipients per message, the excess [...]
3 Dec, 2008 in
Sendmail by
admin
Indiscriminate spammers often will send unreadable messages. I, for instance, cannot read Korean, nor do I like HTML mail. The following shows how to block HTML mail written using a Korean character set. Clever spammers will be able to bypass this in MIME by placing the HTML content in a MIME part whose information does [...]
3 Dec, 2008 in
Sendmail by
admin
Custom macro values may be set in sendmail rulesets in response to various checks, and that information passed to MILTER agents. Applications of this method include aborting MILTERprocessing early for trusted hosts, or to alter the behavior of the agent based on the ruleset outcome.
For an example of this technique, see passing macros to MIMEDefang, [...]
3 Dec, 2008 in
Sendmail by
admin
Due to spammers and security reasons, disabling the EXPN and VRFY SMTP commands by default is recommended to prevent theft of account information. However, these commands are useful for internal and trusted users, and can be enabled for certain hosts, authenticated users, or clients with a verified TLS certificate.
LOCAL_CONFIG
dnl list of hosts trusted to do [...]
3 Dec, 2008 in
Sendmail by
admin
To log custom data to syslog from a sendmail ruleset, use the syslog database-map. For example, the following shows how to log the cert_issuer macro via a message subject ruleset, which can help when testing TLS relaying in sendmail.
LOCAL_CONFIG
Ksyslog syslog
LOCAL_RULESETS
HSubject: $>Log_Subject
SLog_Subject
R$* $: $(syslog $&{cert_issuer} $)
3 Dec, 2008 in
Sendmail by
admin
This does bring up a performance-related issue though. Is there some way for sendmail to learn about repeated delivery failures for bounces and cut down on the retries so when you do bounce real spam with bad sender addresses it doesn’t clutter up the outgoing queue for so long?
We can do it with a cron [...]
3 Dec, 2008 in
Sendmail by
admin
To trap all mail sent locally to a non-existent user, create a LUSER_RELAY definition in thesendmail.mc file. This could also be done for particular domains using a mailertable entry.
Using a trap-all user may seem like a good method to prevent spammers from determining what user accounts are on a system, but will also trap legitimate [...]
3 Dec, 2008 in
Sendmail by
admin
Outgoing email may be held by default by setting the DeliveryMode option to deferred. The queue will need to be run manually (or periodically from cron, or when a network connection is available from a script) to flush the queued messages. On a laptop that relays mail through a central server without running a local [...]
3 Dec, 2008 in
Sendmail by
admin
sendmail collects data on mail traffic volumes and some information on hosts to which it has delivered mail. There are two commands available to display this information, mailstats, and hoststat.
The mailstats command displays statistics on the volume of mail processed by sendmail. The time at which data collection commenced is printed first, followed by a [...]
3 Dec, 2008 in
Sendmail by
admin
If you use a temporary dial-up Internet connection with a fixed IP address and rely on an MX host to collect your mail while you are disconnected, you will find it useful to force the MX host to process its mail queue soon after you establish your connection.
A small perl program is included with the [...]