I saw in the documentation for sendmail that if I want to use multiple
virtualusertables, I simply can declare them like so:
Kvirtuser0 hash -o /etc/virtusertable
Kvirtuser1 hash -o /etc/mail/mj-vut-mydomain.com
Kvirtuser sequence virtuser0 virtuser1
In attempting to track down a different problem, I was asked to present
which "FEATURES" were used in my m4 file. Well, I never had one so now I
am attempting to build a m4 file to generate the sendmail.cf I want.
I looked at the FAQ and in the "bat book 2nd edition" and neither one
addresses this scenario. At least, not in the sections I looked in
talking about virtusertable.
How do I declare these three things in m4 style?
--James
>Kvirtuser0 hash -o /etc/virtusertable
>Kvirtuser1 hash -o /etc/mail/mj-vut-mydomain.com
>Kvirtuser sequence virtuser0 virtuser1
>....
>How do I declare these three things in m4 style?
Well, you could always append
LOCAL_CONFIG
Kvirtuser0 hash -o /etc/virtusertable
Kvirtuser1 hash -o /etc/mail/mj-vut-mydomain.com
Kvirtuser sequence virtuser0 virtuser1
to your .mc file, or place those lines in (say) a hack/foo.m4 file and
place
HACK(foo)dnl
in your .mc file.
Ugly, but effective.
Cheers,
david
--
David H. Wolfskill da...@catwhisker.org
As a computing professional, I believe it would be unethical for me to
advise, recommend, or support the use (save possibly for personal
amusement) of any product that is or depends on any Microsoft product.
>Ugly, but effective.
Just those lines aren't too ugly I think, LOCAL_CONFIG is there for
precisely things like that - but of course you need the
FEATURE(`virtusertable', ...) line *too*, to get the actual rules into
the .cf, and *then* it becomes a bit ugly with pre-8.10 sendmail. Below
is the answer I sent to James when he asked the same question
@sendmail.org.
--Per Hedeland
p...@erix.ericsson.se
--------------
Well, you should be able to say (I'm removing the '-o's, you probably
don't really want those as they will cause any problems with the files
to go unreported):
LOCAL_CONFIG
Kvirtuser0 hash /etc/virtusertable
Kvirtuser1 hash /etc/mail/mj-vut-mydomain.com
FEATURE(`virtusertable', `sequence virtuser0 virtuser1')
- but unfortunately this doesn't work pre-sendmail-8.10 (the sequence
definition gets inserted into sendmail.cf *before* the virtuser0/1).
So, you can either try out 8.10 (currently in public beta), or use this
workaround (a.k.a "hack"):
FEATURE(`virtusertable', `hash /etc/virtusertable')
LOCAL_CONFIG
Kvirtuser0 hash /etc/virtusertable
Kvirtuser1 hash /etc/mail/mj-vut-mydomain.com
Kvirtuser sequence virtuser0 virtuser1
- the final Kvirtuser line will "override" the one generated by the
FEATURE() macro. This construct will actually continue to work when you
upgrade to 8.10 (where these K lines will be inserted in the order that
they appear in the .mc file), but of course it is best to change it
then.