imapd 2.5.7-8 with virtual domains and sendmail config

Edda letters001 at
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 <mailto:domain at>" | sendmail 
> -v -bt
> ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
> Enter <ruleset> <address>
> > 3,0 domain at <mailto:domain at>
> [...]
> 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 and you'll find something like

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:


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

mailertable:    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

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, like:

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Info-cyrus mailing list