Ho installato su Ubuntu 6.06 (vers. desktop) postfix e dovecot per la creazione di un mail server locale. L'installazione e la configurazione sembra andate a buon fine, infatti posso creare gli utenti virtuali e i log sia di postfix che di dovecot non mi danno alcun errore.
Il mio problema è che quando invio una mail,questa viene inviata e quindi memorizzata nella cartella /var/vmail/%d/%n/Maildir (così come definito nel file di configurazione di postfix e dovecot). Fin qui tutto bene così come viene registrato dai log.
Quando però effettuo l'accesso con un qualsiasi client di posta (squirrelmail, roundcube, outlook express, mozilla o altri) non riesco a scaricare la posta ma solo ad inviarla.
Cosa sbaglio? Vi prego, datemi una mano, sono disperato!
Questi sono i file che ho usato per la mia configurazione, li posto senza commenti:
dovecot.conf:
dovecot-sql.conf:## Dovecot configuration file
base_dir = /var/run/dovecot/
protocols = pop3 imap imaps
listen = [::]
disable_plaintext_auth = no
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl_listen = [::]
ssl_disable = no
ssl_cert_file = /etc/ssl/mailserver/server.crt
ssl_key_file = /etc/ssl/mailserver/server.key
login_dir = /var/run/dovecot/login
default_mail_env = maildir:/var/vmail/%d/%n/Maildir
mail_extra_groups = mail
mail_read_mmaped = yes.
first_valid_uid = 150
first_valid_gid = 1
mbox_read_locks = fcntl
mbox_write_locks = dotlock fcntl
## IMAP specific settings
protocol imap {
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
auth_verbose = yes
auth_debug_passwords = yes
# SQL database
# http://wiki.dovecot.org/AuthDatabase/SQL
passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}
# SQL database
# http://wiki.dovecot.org/AuthDatabase/SQL
userdb sql {
# Path for SQL configuration file, see /etc/dovecot/dovecot-sql.conf for example
args = /etc/dovecot/dovecot-sql.conf
}
main.cf:driver = mysql
connect = host=localhost dbname=postfix user=postfix password=miapassword
# Get the mailbox
user_query = SELECT maildir, 150 as uid, 8 as gid FROM mailbox WHERE username = '%u' AND active = '1'
# Get the password
password_query = SELECT password FROM mailbox WHERE username = '%u' AND active = '1'
master.cf:queue_directory = /var/spool/postfix
command_directory = /usr/sbin
mail_owner = postfix
myhostname = ubuntu.informatica.itis
mydomain = informatica.itis
inet_interfaces = all
mydestination =
local_recipient_maps =
mynetworks = 127.0.0.0/8, 192.168.1.0/24
relay_domains = $mydestination
alias_maps = hash:/etc/aliases
home_mailbox = /var/vmail/%d/%n/Maildir/
mailbox_size_limit = 0
mail_spool_directory = /var/spool/mail
mailbox_command = procmail -a "$EXTENSION"
pop3_uidl_format = %08Xu%08Xv
smtpd_banner = $myhostname ESMTP Lab. Informatica(linux)
debug_peer_level = 3
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.1.5/samples
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
# Virtual mailbox settings
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains.cf
virtual_mailbox_base = /var/vmail/
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox.cf
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias.cf
virtual_minimum_uid = 150
virtual_uid_maps = static:150
virtual_gid_maps = static:8
virtual_transport = virtual
myorigin = /etc/mailname
relayhost =
recipient_delimiter = +
inet_protocols = all
mysql_virtual_alias.cf:#
# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
mysql_virtual_domains.cf:user = postfix
password = mia password
hosts = ubuntu
dbname = postfix
table = alias
select_field = goto
where_field = address
mysql_virtual_mailbox.cf:user = postfix
password = mia password
hosts = ubuntu
dbname = postfix
table = domain
select_field = domain
where_field = domain
Grazie a tutti e scusate per la lunghezza del post....user = postfix
password = mia password
hosts = ubuntu
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
