Working Vacation?? [solved?]
Igor Brezac
igor at ipass.net
Fri Jan 24 12:15:57 EST 2003
On Thu, 23 Jan 2003, John Alton Tamplin wrote:
> Mikael Brandstr=F6m wrote:
>
> >It should be possible to rewrite rulset Parse0 (and maybe Parse1) to m=
ake
> >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 h=
ave
> >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 a=
re:
>
> 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 ge=
t
> 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$=3DL $#local $: @ $1 special local names
> R$+ $#local $: $1 regular local names
>
> to
>
> R$=3DL $#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 LMT=
P
> -- 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 th=
e
> address if $h is defined, and then change the cyrusv2 mailer to use tha=
t
> for the envelope sender rewrite ruleset.
>
This is what I use (no sendmail m4 hacking neccessary).
FEATURE(`mailertable', ...
define(`_VIRTUSER_STOP_ONE_LEVEL_RECURSION_', `1')dnl
FEATURE(`virtusertable', ...
Mcyrus, P=3D[IPC], F=3D1lsDFMnqAmXzS,
S=3DEnvFromSMTP/HdrFromSMTP, R=3DEnvToSMTP, E=3D\r\n,
T=3DDNS/RFC822/SMTP,
A=3DFILE $h
virtusertable:
userid at domain.com userid_mbox%3 at domain.com
mailertable:
domain.com lmtp:/var/imap/socket/lmtp
Hope this helps.
> 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 a=
sk.
>
> One day when I get time I will clean these up and try and submit them t=
o
> see if they will get included.
>
>
--=20
Igor
More information about the Info-cyrus
mailing list