Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.10)

Discussion in 'HOWTO-Related Questions' started by mrtot, Dec 3, 2008.

  1. Brun

    Brun New Member

    less /var/log/mail.log
     
  2. Jrob

    Jrob New Member

    netstat -tap Outputs

    root@eoins01:/home/jrobbins# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:51234 *:* LISTEN 6614/teamspeak-serv
    tcp 0 0 *:14534 *:* LISTEN 6614/teamspeak-serv
    tcp 0 0 localhost.localdo:10024 *:* LISTEN 5632/amavisd (maste
    tcp 0 0 localhost.localdo:10025 *:* LISTEN 6504/master
    tcp 0 0 localhost.localdo:mysql *:* LISTEN 5711/mysqld
    tcp 0 0 *:netbios-ssn *:* LISTEN 6557/smbd
    tcp 0 0 *:www *:* LISTEN 9138/apache2
    tcp 0 0 *:ssh *:* LISTEN 5594/sshd
    tcp 0 0 *:ipp *:* LISTEN 6407/cupsd
    tcp 0 0 *:smtp *:* LISTEN 6504/master
    tcp 0 0 *:microsoft-ds *:* LISTEN 6557/smbd
    tcp 0 0 eoins01.eoinscais:39552 216.178.33.49:www ESTABLISHED 17665/firefox

    The domain I have in the virtual database is the same as what I'm using in my destinations and is also my real domain. I have tried removing it form my destinations however the result was the same. And it gave me errors on bootup of the system. What I think Im really after is to use a real domain with virtual users.
     
  3. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/postfix/main.cf?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Do you remember the error message?
     
  5. Jrob

    Jrob New Member

    I was unable to duplicate the error. But it was kicking out of the GUI boot up screen during AMAVIS start up and said something about changing owner. The physical server is named eoins01.eoinscaislean.com. I was using the same name for myhost name in postfix/main.cf I have changed that to mail.eoinscaislean.com and changed the mx record to reflect. In order to try and give you more information I'm going to post everything I normally see you ask for.


    postfix main.cf

    # See /usr/share/postfix/main.cf.dist for a commented, more complete version


    # Debian specific: Specifying a file name will cause the first
    # line of that file to be used as the name. The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname

    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no

    # appending .domain is the MUA's job.
    append_dot_mydomain = no

    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h

    readme_directory = /usr/share/doc/postfix

    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.

    myhostname = mail.eoinscaislean.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings



    dig on the mx record for eoinscaislean.com



    ; <<>> DiG 9.5.0-P2 <<>> mx eoinscaislean.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29792
    ;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;eoinscaislean.com. IN MX

    ;; ANSWER SECTION:
    eoinscaislean.com. 7200 IN MX 0 mail.eoinscaislean.com.

    ;; Query time: 256 msec
    ;; SERVER: 192.168.209.1#53(192.168.209.1)
    ;; WHEN: Sat Dec 27 22:18:44 2008
    ;; MSG SIZE rcvd: 56



    dig for mail.eoinscaislean.com ------- A Record

    ; <<>> DiG 9.5.0-P2 <<>> mail.eoinscaislean.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11505
    ;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;mail.eoinscaislean.com. IN A

    ;; ANSWER SECTION:
    mail.eoinscaislean.com. 7200 IN A 24.223.106.205

    ;; Query time: 133 msec
    ;; SERVER: 192.168.209.1#53(192.168.209.1)
    ;; WHEN: Sat Dec 27 22:22:07 2008
    ;; MSG SIZE rcvd: 56



    The error msg that shows in the mail log

    Dec 27 19:57:02 eoins01 postfix/smtp[32075]: connect to mail.eoinscaislean.com[24.223.106.205]:25: Connection refused




    The Contents of /etc/hosts

    127.0.0.1 localhost.localdomain localhost
    192.168.1.101 eoins01.eoinscaislean.com eoins01
    192.168.1.101 WWW.EOINSCAISLEAN.COM
    192.168.1.101 mail.eoinscaislean.com


    # The following lines are desirable for IPv6 capable hosts
    ::1 localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts


    root@eoins01:/home/vmail# ls -la

    total 24
    drwxr-xr-x 3 vmail vmail 4096 2008-12-23 21:48 .
    drwxrwxr-x 7 root root 4096 2008-12-23 21:48 ..
    -rw-r--r-- 1 vmail vmail 220 2008-05-12 13:48 .bash_logout
    -rw-r--r-- 1 vmail vmail 3115 2008-05-12 13:48 .bashrc
    drwx--x--x 4 vmail vmail 4096 2008-12-23 00:16 eoinscaislean.com
    -rw-r--r-- 1 vmail vmail 675 2008-05-12 13:48 .profile

    root@eoins01:/home/vmail/eoinscaislean.com# ls -la
    total 12
    drwx--x--x 3 vmail vmail 4096 2008-12-27 22:29 .
    drwxr-xr-x 3 vmail vmail 4096 2008-12-23 21:48 ..
    drwx------ 9 vmail vmail 4096 2008-12-22 23:39 FdWalkerGT


    In the mail database

    Domains

    contains one entry eoinscaislean.com

    Users

    now contains 3 users none of them are now real users on the machine.

    Transport

    is empty

    Forwarding


    contains 1 entry forwarding mail between two of the virtual users for testing.


    At one point I added eoinscaislean.com to the end of the MY Destinations in the main.cf file and it did deliver mail to a real system users (put it in /var/mail) but claimed that the virtual users were unknown. If i try to check mail with evolution It gives me pop up to accept certificate I ok give password and it seems to check mail. SquirrelMail also looks like it is checking for mail in the logs. And I can send mail from any virtual user to gmail account or to my account at work. Be it with SquirrelMail or using evolution.


    Thanks for your help.
     
  6. Brun

    Brun New Member

    less /etc/postfix/main.cf
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Ok, this is getting too confusing for me. Can you please each open a new thread?
     

Share This Page