Ok, so I finally got sendmail to preserve domain in the mail address. It's a bunch
of m4 macros that I have no idea about what they are there for.are not being used.
If anyone have any ideas about how to get alias and virtusertable into the loop,
then here's what .mc file looks like:divert(-1)dnl
dnl
dnl $Id: cyrusv2.mc,v 1.5 2008/04/04 12:46:34 murch Exp $
dnl
divert(0)dnl
include(`../m4/cf.m4')dnl
VERSIONID(`@(#)cyrusv2.mc fumlersoft ver 1.0 2016-06-03')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl
FEATURE(`use_cw_file')dnl /etc/mail/local-host-names
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`virtusertable', `hash /etc/mail/virtusertable')dnl
dnl define(`confBIND_OPTS', `-DNSRCH -DEFNAMES')dnl
dnl define(`confTO_IDENT',`0')
dnl define(`confDOMAIN_NAME', `fumlersoft.dk')dnl
define(`CYRUSV2_MAILER_FLAGS',`Ah5@/:|w')dnl
define(`confLOCAL_MAILER',`cyrusv2')dnl
dnl MAILER(`local')dnl
MAILER(`cyrusv2d')dnl
MAILER(`smtp')dnl
MAILER_DEFINITIONS
dnl Mcyrusv2, P=[IPC], E=\r\n,
dnl S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP,
dnl A=FILE /var/imap/socket/lmtp
Mcyrusv2, P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n,
S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, T=DNS/RFC822/SMTP,
A=FILE /var/imap/socket/lmtp
LOCAL_RULE_0
dnl Rbb + $+ < @ $=w . > $#cyrusv2 $: + $1
dnl R$=N $: $#local $: $1
dnl R$=N < @ $=w . > $: $#local $: $1
dnl Rbb + $+ < @ $=w . > $#cyrusv2 $: $1
R$=L < @ $=w . > $#cyrusv2 $: @ $1 < @ $2 . >
R$+ < @ $=w . > $#cyrusv2 $: $1 < @ $2 . >
Rbb + $+ < @ $=w . > $#cyrusv2 $: + $1
mail# echo "3,0 domain@xxxxxxxxxxx" | sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> canonify input: domain @ example . com
Canonify2 input: domain < @ example . com >
Canonify2 returns: domain < @ example . com . >
canonify returns: domain < @ example . com . >
parse input: domain < @ example . com . >
Parse0 input: domain < @ example . com . >
Parse0 returns: domain < @ example . com . >
ParseLocal input: domain < @ example . com . >
ParseLocal returns: $# cyrusv2 $: domain < @ example . com . >
parse returns: $# cyrusv2 $: domain < @ example . com . >
---- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus