[Dovecot] Can Dovecot do this...

Brian Candler B.Candler at pobox.com
Wed Mar 31 12:32:26 EEST 2010


On Tue, Mar 30, 2010 at 11:50:42AM -0600, Robert Lopez wrote:
> It is now proposed that certain staff members should be allowed to be
> at some remote location and compose an email which will be sent to
> SOMETHING at our college which will then cause two things to happen.
> 
> First, the From: information and Reply-To: information will be
> re-written from what ever they may be to become that person's college
> email address.
> 
> Second, the email will then be routed to an intended recipient be it
> within our community or outside of our community.

Well, this is all stuff which happens on receipt of mail to
SOMETHING at yourcollege.  The best place to do this is in the MTA.  Postfix
might be able to do this; exim definitely can (it's the Swiss army knife of
MTAs :-).  Certainly any header and envelope rewriting you want can be done,
and it can be database-driven.

But have you thought, how is the "intended recipient" going to be decided?
Via telepathy perhaps? :-)

Consider: the president (sending from her hotmail account,
hotsox at hotmail.com) wants to send a mail to fred at example.com. She could send
a mail to presidents-rewriter at college.com, but then the rewriter would have
no idea that it was for fred at example.com.

You could go back to the 1980's and use source-routed addresses like

        fred%example.com at president.college.com

I suspect she wouldn't like having to do that.

Or you could get the president to configure her account to send all outbound
mail via your SMTP server, and use SMTP AUTH to identify herself.  The mail
server knows her identity so can then rewrite her From: header
appropriately before relaying it.

But if you're going to all that trouble to configure her MUA, you could also
configure her MUA to send the correct From: header too, which makes the
whole exercise pointless.

If the requirement is for the president to be able to send mails from a
cybercafe, maybe you should just set up your own webmail service she can
login to.  There are many webmail frontends which can talk IMAP to Dovecot.

> Is if this senario is possible?

Based on the above, I think you need to make your requirements clearer :-)

> Would postfix on the new system do the address re-writes or would
> Dovecot do it?

Header rewriting and mail delivery is nothing to do with Dovecot. (Well,
there is Dovecot LDA with Sieve filtering, which can do a very limited
series of actions just before the mail gets added to the mailbox, but I
don't think that's what you want)

> What would store the information necessary for the reply routing?

That could be in a flat file, or a .db file, or custom attributes in an LDAP
database, or SQL, or ...

Regards,

Brian.


More information about the dovecot mailing list