Koozali.org: home of the SME Server

Set up ETRN / MX records

mackayr

Set up ETRN / MX records
« on: December 23, 2006, 02:46:15 PM »
Hi there...

Initially I didn't use any mail server function of SME server until I found about Fetchmail.  Then I started to use that to collect all email for my users and place it in their mailbox with imap access.  Then I found out about multidrop and found that to be quite effective.  However, not I am experiencing the mailing list limitation (ie. mail from some lists are not distributed properly to user accounts).  I understand that this problem is related with multidrop and doesn't occur when using ETRN.  I use 1and1 domain services and when I enquired as to whether they support ETRN this was their response.

"Yes, it's possible. You have an option to use the 1and1 MX records or your own mx records."

Are there any issues about this that I should be aware of? eg. What happens when my server goes down?  Also, I trust that outgoing email will still be routed through my local ISP.  How do I set it up?  Do I just use my IP address as my MX record?

Thanks for any guidance.

Rob

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Set up ETRN / MX records
« Reply #1 on: February 06, 2007, 11:13:41 PM »
Hi

Your problem is indeed related with multidrop. The reason why the mail is not sorted correctly is because the email address in question is in the BCC field and not visable. So you will experience the same problem if someone send you email using the bcc field. To overcome that problem is quite easy:

Every email should have an ENVELOPE-TO field in the email header however the field name differs from ISP to ISP. Send and email to yourself using the BCC field (not from within your local network). The email should end up in the admin account. Log on to your webmail and open the email, then click Message Source. That will reveal the email header. Now look for the enveope field. It should look something like this:

X-Envelope-To: yourname@yourdomain.com

In this case "X-Envelope-To:" is wat we are looking for. Now go to Server Manager > Email. There where you enter the pop settings for multidrop. Change "Select sort method" to "Specify below" and type your envelope field name by "Select sort header" ("X-Envelope-To:" in my case)

That should take care of your mail sorting problem.

However, using smtp delivery (not ETRN) is definately the best way to go. It has a couple of advantages over multidrop, namely:

1. Email is delivered directly to your server immedeately, instead of having to wait the 5 minutes for fetchmail to kick in.
2. If with multidrop someone sends you a very large email it will block the mail que and you might end up with a lot of duplicated emails and not getting new ones, until you manually delete the big email out of the pop account. With SMTP delivery an email that is too large will not be accepted by your server.
3. With SMTP delivery you can make use of RBL Blocking for spam protection wich i think is not possible with multidrop.
4. Your incomming mail will not affect your traffic usage by your ISP (if applicable.)

What if your server goes down? Not a problem either. All you need to do is to arrange with your ISP to be your BackupMX so that your mail will go to them if your server is unreachable. They will then in turn send you the mail when your server is back online.

To view the mx records for a domain you must go to your server console and type:

host -t mx yourdomain.co.za

Mine used to look like this:
Code: [Select]
huge.co.za mail is handled by 5 firewall.huge.co.za.
huge.co.za mail is handled by 5 firewall2.huge.co.za.
huge.co.za mail is handled by 10 mxbackup.huge.co.za.
huge.co.za mail is handled by 5 firewall3.huge.co.za.


I have registered a dynamic hostname with dyndns wich is updated by ddclient called huge.homelinux.net.

Then i changed my mxrecords and it now looks like this:

Code: [Select]
huge.co.za mail is handled by 1 huge.homelinux.net.
huge.co.za mail is handled by 10 mxbackup.huge.co.za.


Its working like a charm. Please let me know if I am not clear on anything. :wink:

mackayr

Set up ETRN / MX records
« Reply #2 on: February 06, 2007, 11:55:37 PM »
Wow!  I REALLY appreciate the depth of your response.  In the meantime, I've reverted to having my mail handled by 1and1 Internet so I'm not using multidrop or SME mail for that matter.  When (not if) I revert back to using my own server for mail, I'll definitely use your instructions.

Thanks again,

Rob

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Set up ETRN / MX records
« Reply #3 on: February 07, 2007, 05:41:34 AM »
Quote from: "Gert"

What if your server goes down? Not a problem either. All you need to do is to arrange with your ISP to be your BackupMX so that your mail will go to them if your server is unreachable. They will then in turn send you the mail when your server is back online.


I'd advise against using a backup MX. You'll get more spam if you use a backup MX, and less opportunity to reject it "at the front door". And a backup MX is not necessary for legitimate email - the sender will hold it in a queue and retry periodically.

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Set up ETRN / MX records
« Reply #4 on: February 07, 2007, 06:34:17 AM »
Quote
I'd advise against using a backup MX. You'll get more spam if you use a backup MX, and less opportunity to reject it "at the front door". And a backup MX is not necessary for legitimate email - the sender will hold it in a queue and retry periodically.


Maybe there's truth in that, but the sender won't hold it in the que. It will fail. And my isp has got an even better spam filter than I do. The backup MX just relays the mail. It will still be checked for smap. I defenately don't have a spam problem.

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Set up ETRN / MX records
« Reply #5 on: February 07, 2007, 12:32:20 PM »
I agree with charlie. You do get more spam.
As for lost mail if server is down. Every mailserver tries a number of times before it gives up so that shouldn't bother you,
"It should just work" if it doesn't report it. Thanks!

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Set up ETRN / MX records
« Reply #6 on: February 07, 2007, 01:01:22 PM »
Quote
As for lost mail if server is down. Every mailserver tries a number of times before it gives up so that shouldn't bother you,


Yes it does, although i have had cases where the server was down for a whole weekend and email sent did fail eventually. My ISP's BackupMX allways fails the email the firs couple of times and te accept is wich block most spam. I guess you have to choose between spam or lost mails? Or just make sure that your server stays on.  :lol: