imapd 2.5.7-8 with virtual users and sendmail config
Alexander Dalloz
ad+lists at uni-x.org
Fri Jun 10 12:15:47 EDT 2016
Am 10.06.2016 um 17:08 schrieb Mogens Melander via Info-cyrus:
> 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.
Hi Mogen,
sorry to see that you are still fighting with this setup task.
> For some reason, afte the domain part started to work, the aliases and
> virtusertable
> are not being used.
Your setup looks way overcomplicated and even wrong. Please see my
comments below.
> I'm pretty sure it has to do with some of those cryptic macros.
>
> 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
Where is your aliases_db definition?
> 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
Why do you define cyrusv2 mailer flags? The right flags are set in the
cyrusv2.m4.
> define(`confLOCAL_MAILER',`cyrusv2')dnl
>
> dnl MAILER(`local')dnl
> MAILER(`cyrusv2d')dnl
You define a cyrusv2d mailer but not cyrusv2. Below in
MAILER_DEFINITIONS cyrusv2 is defined.
> 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
Why these rules? Do you fully understand what they are doing? Such rules
are not necessary if you implement the cyrusv2 mailer properly. Keep it
simple.
>
> Testing sendmail address rules should return mogens at example.com but does
> not.
>
> mail# echo "3,0 domain at example.com" | 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 . >
>
>
> Regards
> Mogens
Regards
Alexander
More information about the Info-cyrus
mailing list