-   Linux - Software (
-   -   Postfix/Dovecot not querying virtual aliases with smtp-auth (

coolster 05-26-2009 09:38 AM

Postfix/Dovecot not querying virtual aliases with smtp-auth

I have the popular email-server combination Postfix/Dovecot running here, and it is doing fine.

Virtual users, virtual domains, virtual mailboxes and virtual aliases are all there and working. Postfix/Dovecot setup is quite generic as it is described in many manuals.

However, there is one problem that I cannot solve.

Some users deliver their mail through Postfix auth-smtp, while most use their ISP's smtp.
When the smtp-auth users send email to one of the other virtual users on the system, the mail arrives into the mailbox as expected.
But when the receiver of the mailbox has set one or more virtual-aliases, the mail is not sent to the alias address(es).
Logging says nothing about relaying denied, mail queued or postphoned, whatever.

In the "normal" situation, when smtp-auth is not used, all mail, including the mail to addresses in virt-aliases, arrives well.
I 've checked for a mailrouting problem, but there isn't: when smtp-auth users send their email directly to the addresses in the virtual-aliase.db the mail arrives as it is supposed to.

I 've been searching through the config files, but I see nothing unusual.
I hope this problem is known by anyone.

Thanks & regards, Kuba

Some important parts of Postfix
virtual_mailbox_domains = mysql:/etc/postfix/
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_mailbox_maps = mysql:/etc/postfix/
virtual_alias_maps = mysql:/etc/postfix/
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

Parts of
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
# Other external delivery methods.
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
vacation unix - n n - - pipe
flags=DRhu user=vacation argv=/var/spool/vacation/ -f ${sender} -- ${recipient}

Dovecot version: 1.0.rc15

Parts of dovecot.conf

# /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
mail_privileged_group: mail
mail_location: maildir:/home/vmail/%d/%n
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
pop3_uidl_format: %v.%u
type: private
prefix: INBOX.
inbox: yes
auth default:
mechanisms: plain login
username_format: %Lu
debug_passwords: yes
driver: sql
args: /etc/dovecot/dovecot-sql.conf
driver: passwd
driver: sql
args: /etc/dovecot/dovecot-sql.conf
driver: static
args: uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
type: listen
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
path: /var/run/dovecot/auth-master
mode: 384
user: vmail

Parts of dovecot-sql.conf

driver = mysql

connect = host= dbname=postfix user=postfix password=password-offcourse-whatelse
default_pass_scheme = CRYPT

password_query = SELECT password FROM mailbox WHERE username = '%u'

user_query = SELECT 5000 AS uid, 5000 AS gid,'/home/vmail/%d/%n' as home, concat('maildir:storage=', ROUND(quota * 1024 )) AS quota FROM mailbox WHERE username = '%u';

All times are GMT -5. The time now is 09:42 PM.