Koozali.org: home of the SME Server

Undeliverable messages to Postamster

Offline GlitchFreak

  • ***
  • 97
  • +0/-0
Undeliverable messages to Postamster
« on: February 06, 2008, 04:06:43 PM »
Hey there

I'm getting a quite a few messages for users delivered to the post master because qmail cannot determine who the email is for. Usually it's from a mailing list. How do you guys deal with such mails to try get them to the original owner?

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Undeliverable messages to Postamster
« Reply #1 on: February 06, 2008, 05:13:51 PM »
I'm getting a quite a few messages for users delivered to the post master because qmail cannot determine who the email is for. Usually it's from a mailing list. How do you guys deal with such mails to try get them to the original owner?

Avoid the use of fetchmail multidrop and it "just works". If you cannot avoid using fetchmail multidrop, then you must configure a "sort header" for fetchmail to use. Exactly which "sort header" will work will depend on what MTA your ISP is using, and how they have it configured.

If you are not using fetchmail multidrop, and mail isn't delivered correctly, then open a bug in the bug tracker.

Offline GlitchFreak

  • ***
  • 97
  • +0/-0
Re: Undeliverable messages to Postamster
« Reply #2 on: February 06, 2008, 07:31:03 PM »
To avoid fetchmail multidrop, does that mean mail should be delivered to my server first i.e. DNS should point to my server?

Is there a way I can config the DNS so that mail is delivered to my server but the website pointer will remain at the current webhost?

If I have a look at the email source, would I be able to determine the sort header?

Offline brianr

  • *
  • 988
  • +2/-0
Re: Undeliverable messages to Postamster
« Reply #3 on: February 07, 2008, 11:08:08 AM »
yes, change the Mx record(s) for the email domain to point to your mailserver server IP, but leave the www records alone.

Or

look at the headers for the emails to see if there is a suitable header, but above is much better solution.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline GlitchFreak

  • ***
  • 97
  • +0/-0
Re: Undeliverable messages to Postamster
« Reply #4 on: February 07, 2008, 06:26:24 PM »
Alrighty...

1. So if I use the first MX record for my server to point to a DynDNS domain name of my server so that mail is delivered directly to the server.
2. I use my current webhost as a backup to collect mail in case the server cannot be reached using a backup MX record.
3. My server can fetchmail as always just in case there is mail in the catchall box

Does this sound right?

Offline brianr

  • *
  • 988
  • +2/-0
Re: Undeliverable messages to Postamster
« Reply #5 on: February 07, 2008, 09:00:42 PM »
It does indeed.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Undeliverable messages to Postamster
« Reply #6 on: February 08, 2008, 01:11:39 PM »
GlitchFreak

You should only have one MX record configured ie to point at your sme server, no need to use a backup, as that will reduce the effectiveness of spam fltering. All mail servers should support dropouts of a few hours & retry delivery.

...

Offline GlitchFreak

  • ***
  • 97
  • +0/-0
Re: Undeliverable messages to Postamster
« Reply #7 on: February 08, 2008, 01:20:05 PM »
Hi Ray

In the event of mail not ending up at the server, how would I enable a backup mx?

Here in South Africa, we have a lovely power issue at the moment in which we get blackouts for a good stretch of time. And coupled with our dynamic IP addressing system on our ADSL, it makes for an uncertain outcomes.

As an aside, I enabled a sorting header, and aliased (pseudonym) the headers address from our webhost to the relevant accounts on the SME. So far it seems to work well.

Thanks for the assistance.

Offline brianr

  • *
  • 988
  • +2/-0
Re: Undeliverable messages to Postamster
« Reply #8 on: February 08, 2008, 01:25:11 PM »
GlitchFreak

You should only have one MX record configured ie to point at your sme server, no need to use a backup, as that will reduce the effectiveness of spam fltering. All mail servers should support dropouts of a few hours & retry delivery.



Agreed that a backup Mx is often used by the spammers to try to avoid spam filtering, but most specific backup mailservers work by re-trying the primary Mx entry, rather than being picked up using pop. Thus avoiding this pitfall.  You can find such services on the internet.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Undeliverable messages to Postamster
« Reply #9 on: February 08, 2008, 01:34:05 PM »
GlitchFreak

Quote
Here in South Africa, we have a lovely power issue at the moment in which we get blackouts for a good stretch of time. And coupled with our dynamic IP addressing system on our ADSL, it makes for an uncertain outcomes.

I suppose I should ask, how long is a good stretch of time, more than a day ?

When the sending mail server cannot reach your sme server smtp mail server, then the message is queued for retry delivery, in typically anywhere from 5 minutes to 2 hours. Most good mail servers will retry for seven days, some are less than that eg 2 days, so even after power outages of a few hours, the originating mail server will still be retrying to send to your server.
Once your server is back online (ie power is back on) and the dynamic IP has synced (after the first reconnection which only takes a minute or two), then your sme server mail server will accept the "retried for delivery" messages.
« Last Edit: February 08, 2008, 01:35:52 PM by RayMitchell »
...

Offline GlitchFreak

  • ***
  • 97
  • +0/-0
Re: Undeliverable messages to Postamster
« Reply #10 on: February 08, 2008, 01:47:11 PM »
It's only usually for a few hours, but if it occurs on a Friday, the UPS's die within an hour and the box is left off for the rest of the weekend because no one is at the office and nothing critical happens during that time.

Once we get these small issues sorted out, I will definitely look to changing MX records because I prefer it that way.

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Undeliverable messages to Postamster
« Reply #11 on: February 08, 2008, 02:07:06 PM »
GlitchFreak

Quote
It's only usually for a few hours, but if it occurs on a Friday, the UPS's die within an hour and the box is left off for the rest of the weekend because no one is at the office and nothing critical happens during that time.

It's usual to configure the BIOS to restart the server when power on occurs, that way when power comes back to the UPS, then power comes back to the server and the server restarts.

If power fails again (over the weekend or whenever) then the server will shutdown and restart again when power returns.

...

Offline GlitchFreak

  • ***
  • 97
  • +0/-0
Re: Undeliverable messages to Postamster
« Reply #12 on: February 09, 2008, 10:58:38 PM »
To tell you the truth I actually forgot about that BIOS option *blush*

I'll enable it when I'm on site again.

Thanks for the help!