Working Vacation?? [solved?]

John Alton Tamplin jtampli at sph.emory.edu
Thu Jan 23 14:41:19 EST 2003


Mikael Brandström wrote:

>It should be possible to rewrite rulset Parse0 (and maybe Parse1) to make
>them leave the local adress qualified while delivering locally. There
>might even be something among the files in cf/cf which kan fix it, I have
>a vague memory of something such.  Just my 2c.
>  
>
I made changes locally that amounted to always setting $@ whenever 
$#local was selected as a mailer (for mailers that don't use $h, it 
shouldn't matter at all).  If you redefine the local mailer to be 
cyrusv2, then look for $#cyrusv2.  The places that have to be changed are:

Ruleset 0, change:

R<@>                    $#local $: <@>          special case error msgs

    to

R<@>                    $#local $@ $M $: <@>    special case error msgs

(if you aren't masquerading use $j instead of $M -- it could be cleaned 
up so it would work for more general configs but I was in a hurry to get 
something working for our setup).  In Ruleset Parse1, change:

R< > $+ + $* < $+ >     $#local $: $1 + $2              plussed name?

    to

R< > $+ + $* < @ $+ >   $#local $@ $3 $: $1 + $2        plussed name?

and then the last two rules in Parse1 change from:

R$=L                    $#local $: @ $1          special local names
R$+                     $#local $: $1            regular local names

    to

R$=L                    $#local $@ $M $: @ $1    special local names
R$+                     $#local $@ $M $: $1      regular local names

Remember that tabs separate the columns, not spaces.

Then in the mailer definition, you can pass $u@$h rather than just $u. 
 I am currently using my own deliver program which then connects to LMTP 
-- this should work for the stock deliver program as well, but for 
direct LMTP delivery from sendmail you will have to get more creative. 
 I haven't tried it, but it should be possible to copy ruleset 
EnvFromSMTP to something else and modify it to add @$h to the end of the 
address if $h is defined, and then change the cyrusv2 mailer to use that 
for the envelope sender rewrite ruleset.

If anyone wants patches to the stock sendmail 8.12.7 proto.m4 file, I 
will be happy to send them with the usual disclaimers (I have not made 
any effort to make the changes more general, just working for our 
particular configuration -- YMMV).

I also have changes (including 3 lines of source changes) to allow the w 
flag to be used with a local mailer yet pass through any users that 
aren't listed in getpwent (ie, I wanted to have user .forward files yet 
still allow delivery to shared mailboxes).  This hack is even more 
likely to be a problem in the future, as they are likely to eventually 
use the flag letter 'y' for something else, but if you want them just ask.

One day when I get time I will clean these up and try and submit them to 
see if they will get included.

-- 
John A. Tamplin                               Unix System Administrator
Emory University, School of Public Health     +1 404/727-9931








More information about the Info-cyrus mailing list