I have a server with Debian 6 (Squeeze), running Postfix, Dovecot, and using MySQL as the backing store for virtual email accounts.

For my domain example.com, I have a ‘catch-all’ @example.com that forwards to myaccount@gmail.com.

I want to allow an authenticated user to log in as me@example.com to use SMTP (and thus take advantage of SPF validation and DKIM signing), but not allow Postfix to deliver mail sent to me@example.com to Dovecot. Configuring a ‘full’ account in the MySQL database causes this to happen, so far as I can tell.

How can I do this? Am I approaching this in the wrong way?

link|improve this question

77% accept rate
feedback

1 Answer

up vote 1 down vote accepted

Postfix is intelligent enough to not deliver mail to Dovecot if you are forwarding mail for that address.

In practice, this means a minimum of four records are required in the MySQL database:

domains: example.com
forwardings: @example.com -> me@example.com
forwardings: me@example.com -> myaccount@gmail.com
users: me@example.com, somepassword

With this configuration, Postfix will deliver all mail to example.com to myaccount@gmail.com, but still allow me@example.com to log in via SMTP and send outgoing mail, enabling that mail to, e.g. be signed for DKIM.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.