OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Postfix + Cyrus / Fallback

From: Alexander Pertsch (alexander.pertschblue-elephant-systems.com)
Date: Mon Nov 28 2005 - 10:34:41 CST


Am Montag, den 28.11.2005, 17:22 +0100 schrieb Sandor Geller:
> Alexander Pertsch wrote:
> > Hello,
> >
> > for building an internal email server, I've installed postfix and cyrus.
> > Now I tried to configure postfix to use cyrus for mail delivery and in
> > case that cyrus does not know the user, I want postfix to forward the
> > mail to another smtp relay host.
>
> That won't work. If the other host runs cyrus then use murder (it is
> part of cyrus-imap), otherwise use address rewriting.
>

Thanks for your replies, finally I've found a solution using
transport-maps.

Short description if anyone other should face the same problem:

- configure transport_maps to first using ldap query to validate local
recipients, afterwards use the default postfix transport table to
specify the handling of unknown recipients
transport_maps = ldap:/etc/postfix/ldaptransport,
hash:/etc/postfix/transport

- ldaptransport:
besides the ldap typical configuration options you especially need

result_filter= :
result_attribute=cn

whereas the result_attribute can be any field that must exist on a valid
email address - the result filter makes the output beeing only a ":" so
the content of the field is not relevant

- /etc/postfix/transport
domain.tld smtp:[relayhost.domain.tld]
.domain.tld smtp:[relayhost.domain.tld]

So every email to userdomain.tld that is not known on the server will
be forwarded to the relayhost. Especially care about SMTP authentication
so that your postfix is not abused as relay host for spammers.

Best regards,

Alexander

--
Alexander Pertsch
blue elephant systems GmbH

Wollgrasweg 49
D-70599 Stuttgart

Phone: (+49) 0 711 - 45 10 17 672
Fax: (+49) 0 711 - 45 10 17 573
E-mail: alexander.pertschblue-elephant-systems.com