Postfix/Dovecot Virtual Domains

Discussion in 'Installation/Configuration' started by helicoptermcbill, Jul 2, 2010.

  1. helicoptermcbill

    helicoptermcbill New Member

    Because we are using so many different distro's and installations I just thought I would create a new thread. I am running a Web server, mail server, and DHCP server on Fedora 12. I configured it based on Falko's the Perfect Server but did not install ISPConfig. As of now I am running three domains on the Apache server. My mail Postfix/Dovecot mail server was running fine until I tried to configure Postfix for virtual domains. This is the primary tutorial I was using to configure Postfix for virtual domains.

    http://www.howtoforge.com/linux_postfix_virtual_hosting

    here is my config file for postfix

    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    mail_owner = postfix
    inet_interfaces = all
    inet_protocols = all
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    unknown_local_recipient_reject_code = 550
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    ddd $daemon_directory/$process_name $process_id & sleep 5
    debug_peer_level = 2
    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.6.5/samples
    readme_directory = /usr/share/doc/postfix-2.6.5/README_FILES
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,rejec
    t_unauth_destination
    mynetworks = 127.0.0.0/8 [::1]/128
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    myhostname = localhost
    virtual_mailbox_domains = /etc/postfix/vhosts
    virtual_mailbox_base = /var/spool/vmail
    virtual_mailbox_maps = hash:/etc/postfix/vmaps
    virtual_uid_maps = static:1000
    virtual_gid_maps = static:1000
    virtual_alias_maps = hash:/etc/postix/valias

    ...and here is my the log entries from /var/log/maillog I am only including the entries from the last postfix reload

    Jul 2 13:33:10 web postfix/postfix-script[26458]: refreshing the Postfix mail system
    Jul 2 13:33:11 web postfix/master[26229]: reload -- version 2.6.5, configuration /etc/postfix
    Jul 2 13:33:39 web postfix/smtpd[26466]: fatal: open database /etc/postix/valias.db: No such file o
    Jul 2 13:33:40 web postfix/master[26229]: warning: process /usr/libexec/postfix/smtpd pid 26466 exi
    Jul 2 13:33:40 web postfix/master[26229]: warning: /usr/libexec/postfix/smtpd: bad command startup

    It appears that the addition of virtual domains is not jiving with the smtpd and I am not sure how to fix it.

    Thanks.

    Bill
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ls -la /etc/postix/
    ?
     
  3. helicoptermcbill

    helicoptermcbill New Member

    ls output of /etc/postfix

    [root@web ~]# ls -la /etc/postfix
    total 248
    drwxr-xr-x. 3 root root 4096 2010-07-02 13:32 .
    drwxr-xr-x. 110 root root 12288 2010-06-27 12:13 ..
    -rw-r--r--. 1 root root 18849 2009-09-16 08:38 access
    -rw-r--r--. 1 root root 11681 2009-09-16 08:38 canonical
    -rw-r--r--. 1 root root 9904 2009-09-16 08:38 generic
    -rw-r--r--. 1 root root 18287 2009-09-16 08:38 header_checks
    -rw-r--r--. 1 root root 107 2010-04-01 15:23 local-host-names
    -rw-r--r-- 1 root root 27937 2010-07-02 13:32 main.cf
    -rw-r--r-- 1 root root 27859 2010-06-20 09:33 main.cf.old
    -rw-r--r--. 1 root root 5113 2009-09-16 08:38 master.cf
    -rw-r--r--. 1 root root 6816 2009-09-16 08:38 relocated
    drwxr-xr-x. 2 root root 4096 2010-03-07 14:18 ssl
    -rw-r--r--. 1 root root 12500 2009-09-16 08:38 transport
    -rw-r--r-- 1 root root 0 2010-07-02 12:37 valias
    -rw-r--r-- 1 root root 12288 2010-07-02 13:09 valias.db
    -rw-r--r-- 1 root root 63 2010-07-02 12:17 vhosts
    -rw-r--r-- 1 root root 12288 2010-07-02 12:17 vhosts.db
    -rw-r--r--. 1 root root 12494 2009-09-16 08:38 virtual
    -rw-r--r-- 1 root root 163 2010-06-20 09:14 virtusertable
    -rw-r--r--. 1 root root 12288 2010-06-20 09:15 virtusertable.db
    -rw-r--r-- 1 root root 181 2010-07-02 12:33 vmaps
    -rw-r--r-- 1 root root 12288 2010-07-02 12:11 vmaps.db

    Thanks for a quick reply,

    Bill
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Do you have
    Code:
    virtual_alias_maps = hash:/etc/postix/valias
    in your main.cf? Should be
    Code:
    virtual_alias_maps = hash:/etc/post[COLOR="Red"]f[/COLOR]ix/valias
     
  5. helicoptermcbill

    helicoptermcbill New Member

    Thanks Falko

    I was afraid it would be something simple, didn't think it would be a typo though. I have been using your tutorials since Fedora 9 and they are always flawless. I have learned a lot about Linux from this site really appreciate everything you have to offer.

    Postfix is working and accepting emails, now I will work on getting the Dovecot configuration correct.

    Thanks for your help. :D

    Bill
     

Share This Page