Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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