imapd 2.5.7-8 with virtual domains and sendmail config

Edda letters001 at sendmaid.org
Wed Jun 15 15:25:22 EDT 2016


Hi Mogens,

Am 15.06.16 um 17:06 schrieb Mogens Melander via Info-cyrus:
>
>
> # echo "3,0 domain at example.com <mailto:domain at example.com>" | sendmail 
> -v -bt
> ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
> Enter <ruleset> <address>
> > 3,0 domain at example.com <mailto:domain at example.com>
> [...]
> Parse1             input: joe < @ example . com . >
> Parse1           returns: $# cyrusv2 $: joe
> parse            returns: $# cyrusv2 $: joe
> Recurse          returns: $# cyrusv2 $: joe
> Parse1           returns: $# cyrusv2 $: joe
> parse            returns: $# cyrusv2 $: joe
>
as you see ruleset Parse1 strips the domain. That's because Parse1 
strips the domain from everything sendmail considers as local. If you 
like, you may look at sendmail.cf and you'll find something like

SParse1
[...]
R$+ < @ $=w . >         $#local $: $1 regular local name


For cyrus virtdomains it's better to treat all virtdomains as NON local 
in sendmail. Only the default domain (do you have one?) should also be 
local in sendmail.

The following sendmail configuration (mail routing only) should work:

sendmail.mc:

VIRTUSER_DOMAIN(`example.com')dnl
FEATURE(`virtusertable')dnl

MAILER_DEFINITIONS
Mcyrusv2,       P=[IPC], F=lsDFMnqXzA@/:|m,
                 S=EnvFromSMTP/HdrFromL, R=EnvToSMTP, E=\r\n,
                 T=DNS/RFC822/SMTP,
                 A=FILE /var/imap/socket/lmtp


mailertable:

example.com    cyrusv2:/var/imap/socket/lmtp

virtusertable as you already have.

That's all.

Remove your cyrus virtdomains from local-host-names (class w)!
Delete your LOCAL_RULE_0, if you havn't already.

You must declare your cyrus virtdomains as virtuserdomains in sendmail, 
because you've deleted them from class w.
Instead of VIRTUSER_DOMAIN, you can use also VIRTUSER_DOMAIN_FILE. 
Insert all cyrus virtdomains there.

If you want your local domain also to be delivered to cyrus, use
define(`confLOCAL_MAILER',`cyrusv2')dnl

Mailer cyrusv2 provides local delivery. You need to define it explicitly 
to get rid of the default setting "R=EnvToL/HdrToL" which strips the 
domain from everything it sees.
As you defined cyrusv2 in the MAILER_DEFINITIONS section, remove all 
other instances (except LOCAL_MAILER, if you want to use cyrusv2) of 
cyrusv2 from your sendmail.mc, like:
define(`CYRUSV2_MAILER_FLAGS',`Ah5@/:|w')dnl
MAILER(`cyrusv2')dnl


Now you should have a clear routing setup in sendmail that should work. 
If not, don't hesitate to let me know.

Edda


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20160615/75d9950e/attachment.html>


More information about the Info-cyrus mailing list