Domain Routing, with account exception?

This is a discussion on Domain Routing, with account exception? within the SendMail forums in Other Technologies category; Hello; I have a server running "Sendmail version 8.13.8, config V10/Berkeley" as a domain relay. It forwards all email to our internal Exchange server. I'd like to be able to specify a specific account that gets processed by Procmail instead of automatically relayed. Is this possible? My tests show that, currently, the mail messages are relayed without any Procmail filtering at all and no attempt to match the messages to a user account on the external server is attempted. Does anyone know the best way to accomplish this? How do I get all mail relayed except those messages addressed to ...

Go Back   Application Development Forum > Other Technologies > SendMail

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-15-2008, 12:26 PM
Stephen A. Jarjoura
Guest
 
Default Domain Routing, with account exception?

Hello;

I have a server running "Sendmail version 8.13.8, config V10/Berkeley"
as a domain relay. It forwards all email to our internal Exchange
server. I'd like to be able to specify a specific account that gets
processed by Procmail instead of automatically relayed. Is this
possible?

My tests show that, currently, the mail messages are relayed without
any Procmail filtering at all and no attempt to match the messages to
a user account on the external server is attempted.

Does anyone know the best way to accomplish this? How do I get all
mail relayed except those messages addressed to one particular
recipient (I'd like those messages stored in a file, instead)?

Thanks!

--
Stephen A. Jarjoura
Reply With Quote
  #2  
Old 08-18-2008, 03:14 AM
ska
Guest
 
Default Re: Domain Routing, with account exception?

Stephen A. Jarjoura wrote:
> as a domain relay. It forwards all email to our internal Exchange
> server. I'd like to be able to specify a specific account that gets
> processed by Procmail instead of automatically relayed. Is this
> possible?


I would say, you need to enable virtual users and add the specific
account there to map to local account, then setup that account to
filter the mails and remail them to final mail drop.

It might be possible to skip the local account and map the mail
address directly to a prog, e.g. "| /etc/mail/smrsh/procmail
arguments", but then it is running with the default uid/gid of
sendmail.

There had been posts regarding a "procmail" mailer, by introducing a
fake mail domain by Andrzej (Andrew) A. Filip, unless I'm mistaken.
Maybe, this works, too.

There had been some suggestions to "reroute" addresses from access DB:

sendmail.mc
LOCAL_RULE_0
R$+ < @ $+ > $* $: < $(access REROUTE:$1@$2 $: $) > <$1> <$2> <$3>
Check if to reroute address to different host; default to <>
R<$+> <$+> <$+> <$*> $#esmtp $@ $1 $: $2<@$3>$4 Reroute to different
host
R<> <$+> <$+> <$*> $: $1 <@$2> $3 Restore old line for system rules

(Tabs in front of $: and $# and the comments)

access
REROUTE:from@example.com to@example2.com

Maybe this works for $#*prog* mailer, too, or in combination with
Andrew's procmail mailer.

ska
Reply With Quote
  #3  
Old 08-18-2008, 05:38 AM
Tilman Schmidt
Guest
 
Default Re: Domain Routing, with account exception?

Stephen A. Jarjoura schrieb:
> I have a server running "Sendmail version 8.13.8, config V10/Berkeley"
> as a domain relay. It forwards all email to our internal Exchange
> server. I'd like to be able to specify a specific account that gets
> processed by Procmail instead of automatically relayed. Is this
> possible?


Sounds like an application for the "LDAP routing without LDAP" recipe
which has been discussed here in the past. Ie. use the ldap_routing
FEATURE with a hash map instead of an LDAP map, like so:

FEATURE(`ldap_routing', `hash /etc/mail/mailhosts', `hash /etc/mail/mailrouting', `bounce')

That way you can configure forwarding individually per address.
See http://www.sendmail.org/m4/ldap_routing.html for details.

HTH
T.

--
Please excuse my bad English/German/French/Greek/Cantonese/Klingon/...
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:25 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.