Virtual Domains and aliases.
mjoop at curia.op.org
Fri Jan 9 17:01:34 EST 2004
>>> Oliver Jones <oliver at deeper.co.nz> 01/08/04 03:41 AM >>>
I have a question regarding mail aliases, virtual users and cyrus
I have configured my Cyrus IMAPD 2.2.2 install to deliver mail using
virtual domains. It does this by relaying the received messages into
the cyrus mailer using Sendmail's "mailertable". Ie the domain is not
in /etc/mail/local-host-names, but is instead in /etc/mail/access as
"domain RELAY". However, sendmail does not reference the
virtualusertable or aliases databases when relaying mail.
I want to create 'aliases' like sales at domain & accounts at domain that
deliver to user1 at domain. How can I do this with sendmail and cyrus
configured to support virtual domains?? Is there a way of doing it with
LDAP mail routing?
Or will I have to hack sendmail to treat the Cyrus mailer as "local" and
yet still pass the domain portion of the email address when trying to
deliver mail to the LMTP socket. If I set cyrus to be the local mailer
sendmail seems to strip the @domain before delivering and so lmtpd can
not find the user's mailbox.
Is there something special I need to do in the Mailer def in
Oliver Jones » Director » oliver.jones at deeperdesign.com » +64 (21) 41
Deeper Design Limited » +64 (7) 377 3328 » www.deeperdesign.com
I do what you want using LDAP Routing with sendmail. An ldif such as:
mailLocalAddress: user1 at domain.com
mailLocalAddress: sales at domain.com
mailLocalAddress: accounts at domain.com
mailRoutingAddress: user1 at domain.com
would do what you want. Since mailLocalAddress is not a single-value in
LDAP, you can send as many "aliases" as you want to the
mailRoutingAddress. It works fine for my installation with Cyrus IMAP
and Virtual Domains.
As far as sending the full address (with the @domain), you will find a
line in the cyrus mailer in sendmail.cf that reads:
S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrToSMTP, E=\r\n,
simply changing it to:
S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n,
should take care of that. There are instructions in the archives for
More information about the Info-cyrus