Koozali.org: home of the SME Server

Delegate mail server + defined local mail account processing

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Delegate mail server + defined local mail account processing
« on: April 07, 2004, 03:52:42 AM »
I have a need to set up a SME 6.x server acting as a delegate mail server for an internal Exchange Server. Easily done. In addition I need a defined e-mail account 'helpdesk@domain.com' to be processed locally on the SME server and not delegated to the Exchange Server.  This account runs a .qmail script that feeds the helpdesk database.

How may I exclude this one account from being delegated?

shanen

Delegate mail server + defined local mail account processing
« Reply #1 on: April 14, 2004, 06:58:57 AM »
Hi Darrell,
I hope I have a solutions for you and I hate the thought of someone like yourself who has helped so many others not getting help yourself. if it isn't what you are after, then consider this a "gidday from Aus"
I noticed if you create additional domains in SME, they are treated as local regardless of using the delegate mail server feature.
You could create another domain and use helpdesk@domain1.com or create sub domains helpdesk@help.domain.com

Shane

Offline kmccarn

  • ****
  • 112
  • +0/-0
Delegate mail server + defined local mail account processing
« Reply #2 on: April 14, 2004, 02:07:01 PM »
Well - I don't know if that above solution will work - I have several domains and the delegate server gets them all.

However - you might try the email-filter available from dungog.net

It allows you to have individual accounts be processed by procmail instead of being delivered locally.

Haven't tried it myself (at least not successfully) but am still working on my first major install.

email me offline if you have questions.

kevin@sierracorporation.com
Kevin in WV 8-)......

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Delegate mail server + defined local mail account processing
« Reply #3 on: April 16, 2004, 04:23:17 AM »
Thanks for the replies.

AFAIK, all domains are handled under the internal delegate mail feature.  Therefore all mail for all domains should be forwarded to the delegate mail server.  If this is not occuring for you Shane, you may have a problem.

AFAIK, the delegate mail feature implements before the individual mailbox level where procmail rules kick in.  Therefore a procmail based filter would not get a chance to work Kevin.

Please feel free to prove me incorrect  :-)

I believe the solution will need to be a custom qmail config and was hoping a qmail 'guru' might assist in suggesting how I could isolate one defined e-mail address from being acted on by the delegate mail feature.

Darrell

shanen

Delegate mail server + defined local mail account processing
« Reply #4 on: April 17, 2004, 02:31:12 AM »
I simulated my previous example and can confirm that you are both right. <sheepish look sideways>

Offline kmccarn

  • ****
  • 112
  • +0/-0
Delegate mail server + defined local mail account processing
« Reply #5 on: April 17, 2004, 04:28:13 AM »
This is why I was originally trying to get maildrop to work.

A friend of mine uses this on a qmail based system to isolate the spam.

Check out:

http://www.flounder.net/~mrsam/maildrop/maildrop.html

Good Luck - and I will pose the question to my friend - who is a qmail guru.

Kevin
Kevin in WV 8-)......

Kelvin

Delegate mail server + defined local mail account processing
« Reply #6 on: April 17, 2004, 12:38:07 PM »
Hi Darrell,

This may or may not be the answer but hopefully give you something to think about. This came about during one setup.

Because the delegate mail server option in SME causes ALL mail domains to be passed to the delegate, I used qmail's smtproutes (/var/qmail/control/smtproutes) to pass only one specific domain to be handled by an Exchange Server behind SME. All other domains / virtual domains continue to be handled by SME. This is fine for the particular setup I did.

However, I don't have a direct answer for your scenario except perhaps to suggest that you use a fetchmail script to collect the helpdesk@domain.com mail back from the exchange server (sort of roundabout way to do it of course) to the SME server ?

Regards,

Kelvin

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Delegate mail server + defined local mail account processing
« Reply #7 on: April 17, 2004, 07:28:59 PM »
AFAIK fetchmail won't work either as man fetchmail states:

As each message is retrieved fetchmail normally delivers it via SMTP to port 25 on the machine it is  runĀ­ning on (localhost), just as though it were being passed in over a normal TCP/IP link.  The mail will then be delivered locally via your system's MDA...

IIUC this justs means qmail via /var/qmail/control/smtproutes will send it right back to the delegated mail server.  I need some mechanism whereby smtproutes can support a defined username exception:

helpdesk@domain.com = localdelivery
domain.com =  delegatedIPAddress

I'm not sure if this is possible.

Kelvin

Delegate mail server + defined local mail account processing
« Reply #8 on: April 18, 2004, 12:20:07 AM »
Hi Darrell,

As you know, I'm no great expert in this, so bear with me.

Could you run the help@domain.com account as a virtual domain account (help@vdomain.com) then use fetchmail to retrieve mails bound for help@domain.com from the Exchange server then drop it into help@vdomain.com ? I'm not sure if the headers remain intact or if your application is sensitive to this.

We used to use fetchmail to collect mails from various ISP hosted mail accounts for local users (irregardless of the domain name).

Kelvin

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Delegate mail server + defined local mail account processing
« Reply #9 on: April 18, 2004, 05:20:04 PM »
Hi Kelvin,

Pretty sure fetchmail wont work at least the way I need it to.
 
In the mean time I have found I can tweak my helpdesk app to directly retrieve mail from the Exchange Server via a POP3 e-mail parser script I can set up as a cron event.  So instead of using a local account for immediate real time processing I'll simply POP3 poll the Exchange Server every five minutes.

I'm still interested in finding a qmail solution but will move forward with the above POP3 interim fix.