procmail
[Top] [All Lists]

using procmail for multiple domains

1995-12-06 12:50:19
howdy.  i'm trying to come up with a (relatively) simple way of
supporting email for multiple domains under sendmail-8.7.1.  my
current solution is close, but no cigar.  suggestions of any sort more
than welcome.  it's possible i'm using the wrong tool or that some
other method using sendmail might be more appropriate.

i'm not subscribed to the list, so please respond to me directly.

i want to be able to have the same address at different domains behave
differently, for example, info(_at_)ag(_dot_)com autoresponds with one email
message while info(_at_)igroup(_dot_)com is forwarded to a series of users, some
at a remote system.

i've got MX records for each domain pointing to the same host.  this
system has a sendmail.cf with the mailertable feature, as well as with
procmail.  the mailertable looks like (edited)

ag.com                  procmail:/etc/procmailrcs/ag.com
igroup.com              procmail:/etc/procmailrcs/igroup.com

and the igroup.com file looks like (again, edited)

:0
* ^TOrramstad@
! -oi rramstad

:0
* ^TOboccibob@
! -oi boccibob(_at_)media(_dot_)mit(_dot_)edu

# EX_NOUSER from /usr/include/sysexits.h
EXITCODE=67

so far so good.  mail to rramstad(_at_)igroup(_dot_)com gets delivered to the
local user rramstad, while boccibob(_at_)igroup(_dot_)com is forwarded to a
remote user boccibob(_at_)media(_dot_)mit(_dot_)edu(_dot_)

the problem comes when either of these addresses are added to a
mailing list or alias.  from my /etc/aliases (edited)

footest: rramstad(_at_)igroup(_dot_)com, boccibob(_at_)igroup(_dot_)com

if i send mail to this alias, i get a bounce message.  (attached) 

perhaps more strangely, if i send mail to both users simultaneously
explicitly i.e.

To: rramstad(_at_)igroup(_dot_)com, boccibob(_at_)igroup(_dot_)com

only the alphabetically first igroup.com address gets the email
message.  this is consistent no matter how many igroup.com addresses
are in the same message, only one copy is delivered.

clearly the first scenario indicates that ^TO only looks at the
header.  i need some way of looking at the actual address presented to
the system.  

moreover, i need a way of having procmail executed one time for each
address references in a particular domain.  this is essential.

again, i may be barking up the wrong tree.  i've thought about some
sendmail.cf hacks, but this gets gnarly really fast and will be hard
to maintain down the road.

suggestions?  again, i'm not subscribed to the list, so please cc me
directly on anything you send.  thanks!

-- Bob

Return-Path: MAILER-DAEMON
Date: Wed, 6 Dec 1995 12:04:57 -0500 (EST)
From: Mail Delivery Subsystem <MAILER-DAEMON(_at_)nfic(_dot_)com>
Subject: Returned mail: User unknown
To: rramstad(_at_)nfic(_dot_)com
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="MAA26468.818269497/bill-graham.nfic.com"
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--MAA26468.818269497/bill-graham.nfic.com

The original message was received at Wed, 6 Dec 1995 12:04:57 -0500 (EST)
from rramstad(_at_)localhost

   ----- The following addresses have delivery notifications -----
footest  (expanded by alias)
boccibob(_at_)igroup(_dot_)com  (unrecoverable error)
    (expanded from: footest)
rramstad(_at_)igroup(_dot_)com  (unrecoverable error)
    (expanded from: footest)

   ----- Transcript of session follows -----
footest... expanded to multiple addresses
550 
boccibob(_at_)igroup(_dot_)com,rramstad(_at_)igroup(_dot_)com(_dot_)(_dot_)(_dot_)
 User unknown

--MAA26468.818269497/bill-graham.nfic.com
Content-Type: message/delivery-status

Reporting-MTA: dns; bill-graham.nfic.com
Arrival-Date: Wed, 6 Dec 1995 12:04:57 -0500 (EST)

Final-Recipient: RFC822; footest(_at_)bill-graham(_dot_)nfic(_dot_)com
Action: expanded (to multi-recipient alias)
Status: 2.0.0
Last-Attempt-Date: Wed, 6 Dec 1995 12:04:58 -0500 (EST)

Final-Recipient: RFC822; footest(_at_)bill-graham(_dot_)nfic(_dot_)com
X-Actual-Recipient: RFC822; boccibob(_at_)igroup(_dot_)com
Action: failed
Status: 5.1.1
Last-Attempt-Date: Wed, 6 Dec 1995 12:04:57 -0500 (EST)

Final-Recipient: RFC822; footest(_at_)bill-graham(_dot_)nfic(_dot_)com
X-Actual-Recipient: RFC822; rramstad(_at_)igroup(_dot_)com
Action: failed
Status: 5.1.1
Last-Attempt-Date: Wed, 6 Dec 1995 12:04:57 -0500 (EST)

--MAA26468.818269497/bill-graham.nfic.com
Content-Type: message/rfc822

Return-Path: rramstad
Received: (from rramstad(_at_)localhost) by bill-graham.nfic.com (8.7.1/8.7.1) 
id MAA26466 for footest; Wed, 6 Dec 1995 12:04:57 -0500 (EST)
Date: Wed, 6 Dec 1995 12:04:57 -0500 (EST)
From: Bob Ramstad <rramstad>
Message-Id: <199512061704(_dot_)MAA26466(_at_)bill-graham(_dot_)nfic(_dot_)com>
To: footest
Subject: test


--MAA26468.818269497/bill-graham.nfic.com--

<Prev in Thread] Current Thread [Next in Thread>