From: Andrzej Adam Filip on
Paweł Janik <scorpio(a)pogodanet.pl> wrote:
> W dniu 2010-04-26 17:15, Andrzej Adam Filip pisze:
>> Paweł Janik<scorpio(a)pogodanet.pl> wrote:
>>> Is possible to set sendmail for incoming mail that it insert for each
>>> mail information about who is recipient of email ?
>>>
>>> Example mail is sending to 2 address on this same server - and each of
>>> copies mail on mbox have field in header like:
>>>
>>> on first mbox
>>> Delivered-To: user1(a)example.net
>>>
>>> on second mbox
>>> Delivered-To: user2(a)example.net
>>
>> Do you want:
>> a) recipient addresses as passed in "rcpt to:"
>> b) recipient addresses after rewriting and alias expansion
>> [with or without domain part?]
>>
>> "a" => do not ask me
>> "b" => Which local mailer do you use? Is it procmail?
>> To check which local mailer your sendmail uses as root execute:
>> echo '=M' | sendmail -bt | grep local
>>
>
> Yes - I'm using procmail.
> I need it for small autorespond script which will detect destination
> address and will use it for sender address in autorespond.
>
> When mail is sent to one address I have in header section "Received:
> [...] for user1(a)example.net" but if mail is sent to multiple recipient
> there isn't this information ...
>
> How can I solve this ?

1) How many addresses are you talking about?
[ e.g. Could you list them all in virtusertable or aliases]
2) Are the addresses delivered to the autorespond script handled *ONLY*
by the aitorespond script?
3) Is recipient domain part important for the script?

--
http://open-sendmail.sourceforge.net/ http://anfi.homeunix.org/
Men occasionally stumble over the truth, but most of them pick themselves
up and hurry off as if nothing had happened.
-- Winston Churchill