Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Postfix+Dovecot+MySQL
#1

I installed postfix with dovecot and mysql but I faced some problem...

 

First of all it seems like when I am starting the postfix process it's taking 20%wa ...

 

Than when i'm trying to send message from gmail to my mail box it seem to reach fast to the /var/spool/postfix/incoming/... but it's not coming to the defined mail dir in /home/vmail/domain/mailbox... Until I restart the postfix than it shows up there and it happens again and again, sometimes it reachs without restart but it takes quite long time. It's not problem with the server connection or speed because it arrives the spoll directory very fast so it might have somthing with the postfix process that stuck?

 

Another thing, when I try to send message to someone like gmail.com or other host it says relay host denied , how do I open all relay host? not just few I set manually.

 

Thanks very match!

 

Dovecot 1.0.7, Postfix 2.3.3-2.1.centos.mysql_pgsql.x86_64, MYSQL 5, postfixadmin in CentOS 5.0

 

This is my postfix config main.cf:



Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = domain.co.il
myhostname = ns1.domain.co.il
mynetworks = 212.150.122.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = domain.co.il
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/mailserver/cacert.pem
smtpd_tls_key_file = /etc/postfix/ssl/mailserver/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = no
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:$config_directory/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:89
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:$config_directory/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 89
virtual_uid_maps = static:89




 

dovecot.conf:



Code:
# 1.0.7: /etc/dovecot.conf
base_dir: /var/run/dovecot/
log_path: /var/log/maillog
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
first_valid_uid: 89
last_valid_uid: 89
mail_location: mbox:/home/vmail/%d/%n
maildir_copy_with_hardlinks: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib64/dovecot/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/imap
mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3
auth default:
passdb:
   driver: sql
   args: /etc/dovecot-mysql.conf
userdb:
   driver: sql
   args: /etc/dovecot-mysql.conf




Reply
#2

Firstly, take a look at your logfiles (/var/log/mail*)

 

Secondly, there could be any number of things wrong, since there's quite a bit to your setup.

 

I would recommend getting postfix working first - send and receive mails locally, send a local mail to gmail, send gmail to be received locally, etc.

 

Then add dovecot ontop of that for the POP3 part of it.

 

Then add MySQL to handle the config settings - just a matter of moving content in the plain-text files into the MySQL tables.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)