passing envelope recipient with sendmail (for virtual domains)

Jonathan Marsden jonathan at bach.xc.org
Thu Oct 17 17:33:17 EDT 2002


On 17 Oct 2002, Kervin L. Pierre wrote, quoting Christian Schulte:

>> You have to change your cyrusv2.mc file:
>>
>> S=EnvFromSMTP/HdrFromL, R=EnvToSMTP/HdrToSMTP, E=\r\n,

> Christian, thanks for the tip.  I tried it, but it did not work by itself.
 
> I had to edit the generated cf file and under the 'Parse1' part of 'Rule 
> 0', change...
 
> R$+ < @ $=w . >         $#cyrusv2 $: $1                 regular local name
> To...
> R$+ < @ $=w . >         $#cyrusv2 $:  $1 < @ $2 . >     regular local name

> I have no idea what this change breaks :) but it seems to be the only 
> way I can get sendmail to pass the full address to cyrus.

I did this too, on Red Hat 7.3, but by editing the proto.m4 file which
generates that line in sendmail.cf.  I did not change cyrusv2.mc at
all.  

This way, I can run m4 sendmail.mc >sendmail.cf without worrying.
Since Red Hat does that for you in the backgroupd (!) with the
(RawHide, Sendmail 8.12.5-5 SRPM tweaked by me to use SASLv2) Sendmail
version I use, it was very important to me to avoid any manual fixup
of sendmail.cf itself.

Actually, I *then* discovered that what I really needed was apparently
more like:

R$+ < @ $m . >          $#cyrusv2 $: $1         regular local name default domain
R$+ < @ $j . >          $#cyrusv2 $: $1         regular local name default host
R$=L < @ $=w . >        $#cyrusv2 $: @ $1@$2    special local names
R$+ < @ $=w . >         $#cyrusv2 $: $1@$2      regular local name

This way the @domain part is left *off* for the default domain but
*added* for the other (virtual) domains.  This seems to get rid of
some strange errors I was seeing for mail to users in the default
domain.  I didn't get back to Ken to try and figure this out further
because the workaround of not passing the domain part for the users in
the default domain "just works".  But I don't think I should really
have had to do that, so there is possibly a buglet lurking in the
imapd virtual domain stuff somewhere in this area??

Jonathan
--
Jonathan Marsden <jonathan at xc.org>




More information about the Info-cyrus mailing list