Category: Mdaemon mailserver

(don’t) Drop connection if transmission exceeds…

MDaemon currently has two features that attempt to limit the size of messages that MDaemon will accept, both located under Setup –> Default Domain –> Servers:

  1. … refuses all messages larger than (and a per-domain feature that does the same)
  2. … drop connection if transmission exceeds

This article covers the second, the “drop connection if transmission exceeds” option. In short, you probably shouldn’t use it, or should think very careful before enabling it as it will probably not do what you want.

Specifically, do not attempt to use this feature to limit the size of message that you’ll accept, and do not use this feature to try to reduce your server’s bandwidth usage, it won’t work and it will cause your bandwidth usage to go way up. Oh, and it won’t inform users of the problem so they’ll manually retry sending messages, compounding the problem.

The “drop connection…”options scattered around MDaemon all have potential to increase bandwidth use in certain cases, but this is one of the worst because it only kicks in during transmission of large messages. As a result, this option potentially causes dramatic increases in bandwidth usage due to the way SMTP works. Most SMTP clients (senders) use the SIZE parameter in the MAIL FROM command, a few use it in the EHLO response. These senders are smart enough to not even try sending a too-large message, so they don’t matter here. For the few that don’t support verifying maximum sizes before sending messages, they get to the DATA stage and start sending a huge message and one of two things happens:

  1. If it gets to the end of the DATA phase, MDaemon can return a 5xx “too-large” error and the sender bounces the message back.
  2. If something happens during the DATA phase (connection problem, firewall, MDaemon willfully drops the connection) the sender puts the message in their queue and retries sending it again. And again. And again. And again. And again. And again. And again. And again. And again. And again. And again.

    And again.

Using “Drop connection if transmission exceeds…” is almost always going to be a very idea and going to drive your bandwidth usage up dramatically if you attempt to use it to limit the size of message that MDaemon will process.

The only time it’s useful is this: If a sender actively attempts a disk-fill attack, where they open a ton of sessions at once and try to cause MDaemon to write GBs of messages until the disk is full. You can protect against this type of attack by having a reasonable amount of drive space, and by setting this limit very high (I’d suggest in the 50MB range, and at least 2x-3x of the maximum message size you’ll receive)

 

More of Everything, a personal update

In July 2011, RIM announced a reorganization and unfortunately I am no longer with Alt-N Technologies Ltd at this time. I intend to continue using and working with Alt-N Technologies’ products and hope to maintain the positive personal and business relationships I’ve developed with the people I worked with during my eight years with Alt-N Technologies.

I would appreciate any suggestions for topics to cover in future blog posts, and would also welcome contributors to the site, and/or job offers. I am currently available for contracts or full-time employment, both relating to small-business email and other areas within the IT field. Get in touch using the feedback page or see my LinkedIn Profile for more information.

From the beginning Everything MDaemon was built on my own personal time, and is not affiliated with Alt-N Technologies Ltd. As a result, Everything-MDaemon’s hiatus has ended, and I’ll be writing content shortly.

mdaemon.com/~ff/EverythingMDaemon?a=150JTB4fCqk:kJ_vAGo3Ess:yIl2AUoC8zA”>

Don’t autorespond to forwarded messages

It is sometimes desireable to avoid autoresponding to messages that have been forwarded from one local user to another.

This is especially useful if you regularly forward mailboxes to multiple destinations and want to avoid each of those destinations from generating their own autoresponses.

This whitelist allows you to enter both email addresses (which aren’t useful here) as well as headers that will cause an autoresponder to be skipped, in this case we’re adding the X-MDRedirect header, a header Mdaemon adds when a message is forwarded.

  • Go to the Accounts menu
  • Select “Account Settings”
  • Find “Auto Responders”
  • Open the “White List” submenu
  • Add “X-MDRedirect: 1″ to the autoresponder whitelist/exception list
Mdaemon.com/~ff/EverythingMdaemon?a=40BD_YT0OPg:Daj6nZSXjy0:yIl2AUoC8zA”>Mdaemon?d=yIl2AUoC8zA” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=40BD_YT0OPg:Daj6nZSXjy0:F7zBnMyn0Lo”>Mdaemon?i=40BD_YT0OPg:Daj6nZSXjy0:F7zBnMyn0Lo” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=40BD_YT0OPg:Daj6nZSXjy0:V_sGLiPBpWU”>Mdaemon?i=40BD_YT0OPg:Daj6nZSXjy0:V_sGLiPBpWU” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=40BD_YT0OPg:Daj6nZSXjy0:qj6IDK7rITs”>Mdaemon?d=qj6IDK7rITs” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=40BD_YT0OPg:Daj6nZSXjy0:gIN9vFwOqvQ”>Mdaemon?i=40BD_YT0OPg:Daj6nZSXjy0:gIN9vFwOqvQ” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=40BD_YT0OPg:Daj6nZSXjy0:dnMXMwOfBR0″>Mdaemon?d=dnMXMwOfBR0″ border=”0″>

Mdaemon/~4/40BD_YT0OPg” height=”1″ width=”1″ />

Threading messages in Thunderbird

One of my favourite features in a mail client is Threading. This shows you all the messages in a folder that are related to one conversation in one place, similar to GoogleMail’s conversation view, but it actually more context with you have multiple related discussions going on at once.

Outlook Express has had it for years, as has Thunderbird, WorldClient recently added Threading support too. For OE and WorldClient, this setting is per-user, it applies to all folders in your profile, so it’s easy enough to toggle. However, Thunderbird stores the “thread” flag on a per folder basis though, which is always a pain when setting up a new computer since I’ve got hundreds of folders and want every one of them threaded. After literally years of searching, I stumbled across a way to accomplish this goal.

Find your Thunderbird profile, create a file called “user.js” and edit it in notepad. Take care to not end up with “user.js.txt” as that won’t work. Inside the file, add these lines:

# Mozilla User Preferences

user_pref(“mail.check_all_imap_folders_for_new”, true);
user_pref(“mailnews.default_sort_order”, 22);
user_pref(“mailnews.default_sort_type”, 1);
user_pref(“mailnews.default_view_flags”, 1);
user_pref(“mailnews.headers.showSender”, true);
user_pref(“mailnews.headers.showUserAgent”, true);

Restart Thunderbird, and now any newly created folders will automatically have threading enabled, oldest threads first. If you want newest threads first, change “default_sort_type” to 2.

I got this clue from Thunderbird’s bugzilla bug #86845 and thought I’d share it here since I’m sure I’m not the only one who has wanted this.

So what if you want to make all your current folders thread automatically without going folder by folder? If you use IMAP, you’re in luck, shut down Thunderbird, look for the \ImapMail\ subdirectory and rename or delete it. This will cause Thunderbird to forget everything it knows about all folders, reloading them as new, and redownload all content (which doesn’t take long since it just downloads headers, messages aren’t downloaded until they’re accessed).

Mdaemon.com/~ff/EverythingMdaemon?a=JonxqluQQ-0:V4qbjp2ivjU:yIl2AUoC8zA”>Mdaemon?d=yIl2AUoC8zA” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=JonxqluQQ-0:V4qbjp2ivjU:F7zBnMyn0Lo”>Mdaemon?i=JonxqluQQ-0:V4qbjp2ivjU:F7zBnMyn0Lo” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=JonxqluQQ-0:V4qbjp2ivjU:V_sGLiPBpWU”>Mdaemon?i=JonxqluQQ-0:V4qbjp2ivjU:V_sGLiPBpWU” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=JonxqluQQ-0:V4qbjp2ivjU:qj6IDK7rITs”>Mdaemon?d=qj6IDK7rITs” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=JonxqluQQ-0:V4qbjp2ivjU:gIN9vFwOqvQ”>Mdaemon?i=JonxqluQQ-0:V4qbjp2ivjU:gIN9vFwOqvQ” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=JonxqluQQ-0:V4qbjp2ivjU:dnMXMwOfBR0″>Mdaemon?d=dnMXMwOfBR0″ border=”0″>

Mdaemon/~4/JonxqluQQ-0″ height=”1″ width=”1″ />

Spam Filter responding slowly

Recently “DSBL”, one of the DNSBLs used in SpamAssassin, changed their DNS to point to an unrouteable IP.

The lookup is still in the SA 3.24 rules Mdaemon uses. If you have DNS service available set to Yes or Test, that might be slowing down SA processing. Try adding the following line to your \Mdaemon\SpamAssassin\rules\local.cf file.

score RCVD_IN_DSBL 0

Once this is done, open a command prompt and type the following command to reload your SpamAssassin rules, and/or restart Mdaemon;

echo. > C:\Mdaemon\App\mdspamd.sem

Mdaemon.com/~ff/EverythingMdaemon?a=KtawINCIbYA:TytCxa4Trgw:yIl2AUoC8zA”>Mdaemon?d=yIl2AUoC8zA” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=KtawINCIbYA:TytCxa4Trgw:F7zBnMyn0Lo”>Mdaemon?i=KtawINCIbYA:TytCxa4Trgw:F7zBnMyn0Lo” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=KtawINCIbYA:TytCxa4Trgw:V_sGLiPBpWU”>Mdaemon?i=KtawINCIbYA:TytCxa4Trgw:V_sGLiPBpWU” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=KtawINCIbYA:TytCxa4Trgw:qj6IDK7rITs”>Mdaemon?d=qj6IDK7rITs” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=KtawINCIbYA:TytCxa4Trgw:gIN9vFwOqvQ”>Mdaemon?i=KtawINCIbYA:TytCxa4Trgw:gIN9vFwOqvQ” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=KtawINCIbYA:TytCxa4Trgw:dnMXMwOfBR0″>Mdaemon?d=dnMXMwOfBR0″ border=”0″>

Mdaemon/~4/KtawINCIbYA” height=”1″ width=”1″ />

Image-only adult themed spam

Lately there is a new batch of spam going out that tends to use adult themed subjects, but has no content in the body aside from a single image.

It has been reported that this SpamAssassin rule helps:

header __CTYPE_MULTIPART_MXD Content-Type =~ /multipart\/mixed/i
mimeheader __ANY_TEXT_ATTACH Content-Type =~ /text\/\w+/i
meta MIME_IMAGE_ONLY (__CTYPE_MULTIPART_MXD && __ANY_IMAGE_ATTACH && !__ANY_TEXT_ATTACH)
score MIME_IMAGE_ONLY 2.00
describe MIME_IMAGE_ONLY Image body part but no text body parts

To use it, copy these five lines into the bottom of your \Mdaemon\SpamAssassin\rules\local.cf file, then either restart Mdaemon or create a mdspamd.sem file in the \Mdaemon\App\ directory.

You may want to tweak the “Score”, but start with 2.0 as this rule hasn’t been aggressively tested so there is a higher risk of false positives then with the default SpamAssassin rules.

Lastly, it’s also worth mentioning that Outbreak Protection (part of SecurityPlus 4 and higher) is flagging these messages as spam.

UPDATE 2009/05/19: The above rule only works in Mdaemon 10 and higher, for earlier versions, you’ll need one more line:

mimeheader __ANY_IMAGE_ATTACH Content-Type =~ /image\/(?:gif|jpeg|png)/
(Thanks goes to “Greg Vancardo” for tracking this one down)

Mdaemon.com/~ff/EverythingMdaemon?a=aV4n2KIR3j8:Nc6DDfCzSfA:yIl2AUoC8zA”>Mdaemon?d=yIl2AUoC8zA” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=aV4n2KIR3j8:Nc6DDfCzSfA:F7zBnMyn0Lo”>Mdaemon?i=aV4n2KIR3j8:Nc6DDfCzSfA:F7zBnMyn0Lo” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=aV4n2KIR3j8:Nc6DDfCzSfA:V_sGLiPBpWU”>Mdaemon?i=aV4n2KIR3j8:Nc6DDfCzSfA:V_sGLiPBpWU” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=aV4n2KIR3j8:Nc6DDfCzSfA:qj6IDK7rITs”>Mdaemon?d=qj6IDK7rITs” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=aV4n2KIR3j8:Nc6DDfCzSfA:gIN9vFwOqvQ”>Mdaemon?i=aV4n2KIR3j8:Nc6DDfCzSfA:gIN9vFwOqvQ” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=aV4n2KIR3j8:Nc6DDfCzSfA:dnMXMwOfBR0″>Mdaemon?d=dnMXMwOfBR0″ border=”0″>

Mdaemon/~4/aV4n2KIR3j8″ height=”1″ width=”1″ />

Detecting a blank header in the content filter

The content filter has a condition to trip if a header doesn’t exist.  However, there is no easy way to catch a header with no content at all.

This rule will trip on a blank subject header (where the header DOES exist, but has no content)

[Rule001]
RuleName=If subject is NOT empty, Skip next rule
Enable=Yes
ThisRuleCondition=All
ProcessQueue=LOCAL
Condition01=SUBJECT|reg exp|AND|^..+$|
Action01=skip rule|"1"
[Rule002]
RuleName=Subject IS empty!
Enable=Yes
ThisRuleCondition=All
ProcessQueue=LOCAL
Condition01=SUBJECT|exists|AND|
Action01=move to bad Msg|

UPDATE 2009/06/17: For some reason this rule was completely broken, both by WordPress inserting smartquotes, and a logic error. My apologies, it has been corrected and tested on Mdaemon 10.0.5, it should now work as advertised.

Mdaemon.com/~ff/EverythingMdaemon?a=7OkALoQsviI:YHKMs24IP04:yIl2AUoC8zA”>Mdaemon?d=yIl2AUoC8zA” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=7OkALoQsviI:YHKMs24IP04:F7zBnMyn0Lo”>Mdaemon?i=7OkALoQsviI:YHKMs24IP04:F7zBnMyn0Lo” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=7OkALoQsviI:YHKMs24IP04:V_sGLiPBpWU”>Mdaemon?i=7OkALoQsviI:YHKMs24IP04:V_sGLiPBpWU” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=7OkALoQsviI:YHKMs24IP04:qj6IDK7rITs”>Mdaemon?d=qj6IDK7rITs” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=7OkALoQsviI:YHKMs24IP04:gIN9vFwOqvQ”>Mdaemon?i=7OkALoQsviI:YHKMs24IP04:gIN9vFwOqvQ” border=”0″> Mdaemon.com/~ff/EverythingMdaemon?a=7OkALoQsviI:YHKMs24IP04:dnMXMwOfBR0″>Mdaemon?d=dnMXMwOfBR0″ border=”0″>

Mdaemon/~4/7OkALoQsviI” height=”1″ width=”1″ />

Diseño Web Global Gi