From: Andrzej Adam Filip on
Will Hatcher <silikon(a)gmail.com> wrote:

> How can I make sendmail run an external program to any and all
> possible email addresses to my domain? Basically, my software needs
> to create artificial/dynamic email addresses kind of on the fly (but
> to my domain) that can be sent from and to eternally, so I can't
> create a Unix 'user' for each one with a .forward. This is making me
> crazy because I did something like this a while back using smrsh and
> so forth but can't remember how it was done, and my knowledge of the
> terms is so rusty that I've been looking all around but can't nail it
> down.

Use virtusertable to remap to plussed addresses
john.doe(a)example.com -> postmasteuser+john.doe

virtusertable entries:
#v+
# entries for addresses required by RFC
postmaster(a)example.com postmaster
abuse(a)example.com abuse
# entry for all remanding addresses in the domain
@example.com user+%1
#v-

Sendmail on Linuxes typically use procmail as local mailer program.
In such configurations ~/.procmailrc script
1) will get "john.doe" in $1
2) will be called once per every recipient in example.com for
multirecipient messages

--
[pl>en Andrew] Andrzej Adam Filip : anfi(a)priv.onet.pl : anfi(a)xl.wp.pl
It is the wisdom of crocodiles, that shed tears when they would devour.
-- Francis Bacon
From: Andrzej Adam Filip on
Will Hatcher <silikon(a)gmail.com> wrote:

> On Jun 21, 2:37 pm, Andrzej Adam Filip <a...(a)onet.eu> wrote:
>> Will  Hatcher <sili...(a)gmail.com> wrote:
>>
>> Use virtusertable to remap to plussed addresses
>>   john....(a)example.com -> postmasteuser+john.doe
>>
>> virtusertable entries:
>> #v+
>> # entries for addresses required by RFC
>> postmas...(a)example.com postmaster
>> ab...(a)example.com      abuse
>> # entry for all remanding addresses in the domain
>> @example.com           user+%1
>> #v-
>>
>> Sendmail on Linuxes typically use procmail as local mailer program.
>> In such configurations ~/.procmailrc script
>> 1) will get "john.doe" in $1
>> 2) will be called once per every recipient in example.com for
>>    multirecipient messages
>
> Ah cool I figured it would be something like that. I did figure out a
> way after posting though, I wonder if it is evil? Basically,
> LUSER_RELAY seems to work, I just send that result to my custom
> program that then decides what to do with it.

LUSER_RELAY is simple and it may be acceptable if:
* you do not need original envelope recipient information
* you do not want to limit "special deliveries" only to one/some local
email domains

URL(s):
http://www.sendmail.org/faq/section3#3.29
http://anfi.homeunix.org/sendmail/sharedmailbox.html

--
[pl>en Andrew] Andrzej Adam Filip : anfi(a)priv.onet.pl : anfi(a)xl.wp.pl
Will your long-winded speeches never end?
What ails you that you keep on arguing?
-- Job 16:3