LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-01-2008, 08:05 AM   #1
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Dovecot doesnt create all folders for virtual users.


I have setup Dovecot with MySQL and Postfix for virtual users and domains. It works, can send mails and receive, but the users only have Inbox folder, there is no Trash, Drafts, Sent and so on.

Here is the configuration of dovecot:

base_dir = /var/run/dovecot/
protocols = imap imaps
listen = *
log_path = /var/log/maillog
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl_disable = no
ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem
login_dir = /var/run/dovecot/login
login_process_size = 64
login_greeting = IMAP/IMAPS Server Ready
mail_location = mbox:/srv/mail/vmail/%d/%n
mail_privileged_group = mail
verbose_proctitle = no
first_valid_uid = 500
last_valid_uid = 10005
mbox_read_locks = fcntl
mbox_write_locks = fcntl

protocol imap {
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep
}
protocol pop3 {

}

auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
auth_verbose = yes

auth default {
mechanisms = plain login

passdb pam {
}
passdb shadow {
}
passdb sql {
args = /applications/dovecot-mail/etc/dovecot-mysql.conf
}
userdb passwd {
}
userdb sql {
args = /applications/dovecot-mail/etc/dovecot-mysql.conf
}
user = root
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}

dovecot-mysql configuration:

driver = mysql
#default_pass_scheme = plain
default_pass_scheme = PLAIN-MD5
#connect = host=/var/run/mysqld/mysqld.sock dbname=mail user=root password=default
# Alternatively you can connect to localhost as well:
connect = host=localhost dbname=mail user=mail password=XXXXX
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT '/srv/mail/vmail/%d/%n' as home, 'maildir:/srv/mail/vmail/%d/%n' as mail, 10005 AS uid, 12 AS gid, concat('dirsize:storage=',quota) AS quota FROM mailbox WHERE username ='%u' AND active ='1'

postfix configration:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 450
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /applications/postfix/conf
inet_protocols = ipv4
mail_spool_directory = /var/spool/mail
smtpd_banner = $myhostname ESMTP Mail Server (example.net hosting)
smtpd_helo_required = yes
smtpd_delay_reject = yes
disable_vrfy_command = yes
unverified_recipient_reject_code = 550
unverified_sender_reject_code = 550
biff = no
append_dot_mydomain = no
readme_directory = no
myhostname = example.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = example.net
mydestination = mail.example.net, localhost
relayhost =
my_networks = 127.0.0.0/8 208.83.212.8/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

virtual_mailbox_domains = proxy:mysql:/applications/postfix/conf/mysql_virtual_domains_maps.cf
virtual_mailbox_base = /srv/mail/vmail
virtual_mailbox_maps = proxy:mysql:/applications/postfix/conf/mysql_virtual_mailbox_maps.cf
virtual_alias_maps = proxy:mysql:/applications/postfix/conf/mysql_virtual_alias_maps.cf
virtual_minimum_uid = 10005
virtual_uid_maps = static:10005
virtual_gid_maps = static:12

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_hostname, reject_non_fqdn_sender,
reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname,
reject_rbl_client list.dsbl.org, reject_rbl_client bl.spamcop.net, reject_rbl_client sbl-xbl.spamhaus.org

smtp_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/ssl/smtpd/smtpd.crt
smtpd_tls_key_file = /etc/ssl/smtpd/smtpd.key
smtpd_tls_CAfile = /etc/ssl/smtpd/cacert.pem
smtpd_tls_received_header = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
tls_random_source = dev:/dev/urandom
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_recieved_header = yes

postfix mysql configration:

user = mail
password = XXXX
hosts = localhost
dbname = mail
table = alias
select_field = goto
where_field = address
additional_conditions = and active = '1'

user = mail
password = XXXX
hosts = localhost
dbname = mail
table = domain
select_field = domain
where_field = domain
additional_conditions = and backupmx = '0' and active = '1'

user = mail
password = XXXX
hosts = localhost
dbname = mail
table = mailbox
select_field = quota
where_field = username
additional_conditions = and active = '1'

user = mail
password = XXXX
hosts = localhost
dbname = mail
table = mailbox
select_field = CONCAT(domain,'/',maildir)
where_field = username
additional_conditions = and active = '1'

Does anyone know what is the problem?

Please let me know if u can help, Thanks!
 
Old 11-02-2008, 02:10 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Are you sying that these are not created as require - ie, if a user connects a mail client and deletes an email, is the trash folder created? Ditto for sending mail being copied to sent?
 
Old 11-03-2008, 02:18 AM   #3
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Original Poster
Rep: Reputation: 73
Hello, no if I am using for example roundcube for check mail, there is only Inbox. There is no Sent, or Trash or Drafts. If Im using SquirrelMail then the folders will be created, by SquirrelMail.

I have busted my head to figure it out whats the deal... I know that normaly Dovecot shouldnt create the folders, but who should? and how to set it... coz not everybody likes to use SquirrelMail so then if they use Roundcube, they wont have the stupid folder, only if they use first SquirrelMail

Weird and sick, what can I say
 
Old 11-03-2008, 02:29 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'd expect the client to create them myself.

I even had the misfortune to use Outlook Express today, and that forced the creation of necessary folders.

I've never used roundcube - are you sure there's no way of getting it to create what's required? Are you sure it doesn't create them when they're needed? What happens if you delete a message in roundcube if the deleted folder doesn't exist?

Why don't you write a script to create them for new users?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix + Dovecot + virtual users without a database? MheAd Linux - Server 6 10-18-2011 08:45 AM
!!!!!!!!!!!!!!!virtual users config in dovecot !!!!!!!!!!!!!!!!! lasantha Linux - Server 3 01-16-2008 05:52 AM
LXer: How To Install & Set Up Dovecot Mail Server With Sieve And Virtual Users LXer Syndicated Linux News 0 09-08-2007 04:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration