Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs

Discussion in 'Installation/Configuration' started by ebbay, Feb 21, 2006.

  1. ebbay

    ebbay New Member

    Hi All,

    Thanks to falco
    First thanks to all for the great how to and website.

    I have installed a mailserver according to the Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) HOW-TO.


    I have 2 domains.

    Local domain : nic.ga
    virtual domain : ossy-network.ga

    I sent mail to these two emails
    gbouraga@nic.ga
    ceo@ossy-network.ga

    mail:# telnet localhost 110
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    +OK Hello there.
    user gbouraga@nic.ga
    +OK Password required.
    pass ###
    -ERR Maildir: No such file or directory
    Connection closed by foreign host

    mail:# telnet localhost 110
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    +OK Hello there.
    user ceo@ossy-network.ga
    +OK Password required.
    pass ####
    -ERR Maildir: No such file or directory
    Connection closed by foreign host


    In /var/log/mail.log
    ------------------
    Feb 20 21:28:36 mail amavis[2390]: (02390-09) PRESERVING EVIDENCE in /var/lib/amavis/amavis-20060220T212836-02390
    Feb 20 21:28:36 mail postfix/smtp[2508]: C2C1A624035: to=<gbouraga@nic.ga>, relay=127.0.0.1[127.0.0.1], delay=7820, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=02390-09, creating_partsdir FAILED: DBD::mysql::st execute failed: Table 'mail.policy' doesn't exist at (eval 38) line 238, <GEN25> line 8. (in reply to end of DATA command))

    In /var/log/mail.err
    ------------------
    Feb 20 19:37:54 mail courierpop3login: LOGIN FAILED, ip=[::ffff:127.0.0.1]

    AND
    ------------------
    mail:# find /home/vmail/
    /home/vmail/
    /home/vmail/.bashrc
    /home/vmail/.bash_profile
    mail:#

    need help.
    :confused:
    ebbay
     
  2. falko

    falko Super Moderator ISPConfig Developer

    I don't use a table "policy" in my tutorial so I guess you've changed it a bit? Please compare your configuration files with those from the tutorial.
     
  3. ebbay

    ebbay New Member

    I took to the configuration at the beginning
    I again sending well the m├ęssages but I do not receive the mails.
    I am not also able to be even sent a message to myself.

    in /var/log/mail.log
    Feb 27 15:30:22 mail postfix/cleanup[3285]: 6B74930806F: message-id=<20060227143022.6B74930806F@mail.nic.ga>
    Feb 27 15:30:22 mail postfix/qmgr[3264]: 6B74930806F: from=<>, size=3097, nrcpt=1 (queue active)
    Feb 27 15:30:22 mail postfix/qmgr[3264]: 37D3330806E: removed
    Feb 27 15:30:22 mail postfix/smtp[3286]: 6B74930806F: to=<gbouraga@nic.ga>, relay=none, delay=0, status=bounced (mail for 217.77.77.26 loops back to myself)
    Feb 27 15:30:22 mail postfix/qmgr[3264]: 6B74930806F: removed
     
  4. falko

    falko Super Moderator ISPConfig Developer

    That's the problem:
    Please post the output of
    Code:
    hostname
    ,
    Code:
    hostname -f
    , and the content of /etc/hosts and /etc/postfix/main.cf.
     
  5. ebbay

    ebbay New Member

    bouraga@mail:~$ hostname
    mail.nic.ga
    bouraga@mail:~$ hostname -f
    mail.nic.ga
    bouraga@mail:~$

    /etc/hosts
    bouraga@mail:~$ more /etc/hosts
    127.0.0.1 localhost.localdomain localhost mail
    217.77.77.26 mail.nic.ga mail

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

    /etc/postfix/main.cf
    bouraga@mail:~$ more /etc/postfix/main.cf
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version

    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    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

    myhostname = mail.nic.ga
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.nic.ga, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy: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_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    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
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
     
  6. falko

    falko Super Moderator ISPConfig Developer

    I don't know why Postfix writes
    instead of
    , but anyway...
    Please add 217.77.77.26 to the mydestination line in /etc/postfix/main.cf:

    Code:
    mydestination = mail.nic.ga, localhost, localhost.localdomain, 217.77.77.26
    and restart Postfix.
     
  7. ebbay

    ebbay New Member

    I find why Postfix writes " mail for 217.77.77.26 loops back to myself " .
    because I filled out the transport table with domain: nic.ga and transport: smtp:217.77.77.26

    I emptied the transport table.

    the problem remains always even I sending the messages which arrive but I do not receive.

    *******************
    mail:/var/log# tail mail.log
    Mar 3 13:12:02 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
    Mar 3 13:13:02 mail postfix/virtual[2075]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:13:03 mail postfix/master[1808]: warning: process /usr/lib/postfix/virtual pid 2075 exit status 1
    Mar 3 13:13:03 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
    Mar 3 13:14:03 mail postfix/virtual[2076]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:14:04 mail postfix/master[1808]: warning: process /usr/lib/postfix/virtual pid 2076 exit status 1
    Mar 3 13:14:04 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
    Mar 3 13:15:04 mail postfix/virtual[2077]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:15:05 mail postfix/master[1808]: warning: process /usr/lib/postfix/virtual pid 2077 exit status 1
    Mar 3 13:15:05 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling


    ********
    mail:/var/log# tail mail.err
    Mar 3 13:06:56 mail postfix/virtual[2061]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:07:57 mail postfix/virtual[2062]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:08:58 mail postfix/virtual[2063]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:09:59 mail postfix/virtual[2072]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data

    ********
    mail:/var/log# tail mail.info
    Mar 3 13:14:04 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
    Mar 3 13:15:04 mail postfix/virtual[2077]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:15:05 mail postfix/master[1808]: warning: process /usr/lib/postfix/virtual pid 2077 exit status 1
    Mar 3 13:15:05 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
    Mar 3 13:16:05 mail postfix/virtual[2079]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:16:06 mail postfix/master[1808]: warning: process /usr/lib/postfix/virtual pid 2079 exit status 1
    Mar 3 13:16:06 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
    Mar 3 13:17:06 mail postfix/virtual[2083]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:17:07 mail postfix/master[1808]: warning: process /usr/lib/postfix/virtual pid 2083 exit status 1
    Mar 3 13:17:07 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling

    *********************
    when any one sending me a message

    mail:/var/log# tail mail.log
    Mar 3 13:20:44 mail postfix/smtpd[2088]: connect from web26606.mail.ukl.yahoo.com[217.146.176.56]
    Mar 3 13:20:45 mail postfix/smtpd[2088]: 3922430806E: client=web26606.mail.ukl.yahoo.com[217.146.176.56]
    Mar 3 13:20:45 mail postfix/cleanup[2095]: 3922430806E: message-id=<20060303121424.83765.qmail@web26606.mail.ukl.yahoo.com>
    Mar 3 13:20:45 mail postfix/qmgr[1814]: 3922430806E: from=<gaetan_bouraga@yahoo.fr>, size=1837, nrcpt=1 (queue active)
    Mar 3 13:20:46 mail postfix/smtpd[2088]: disconnect from web26606.mail.ukl.yahoo.com[217.146.176.56]
    mail:/var/log# tail mail.log
    Mar 3 13:20:46 mail postfix/smtpd[2088]: disconnect from web26606.mail.ukl.yahoo.com[217.146.176.56]
    Mar 3 13:21:01 mail dccproc[2104]: socket(UDP): Address family not supported by protocol
    Mar 3 13:21:01 mail postfix/smtpd[2106]: connect from localhost.localdomain[127.0.0.1]
    Mar 3 13:21:01 mail postfix/smtpd[2106]: A9D3E308072: client=localhost.localdomain[127.0.0.1]
    Mar 3 13:21:01 mail postfix/cleanup[2095]: A9D3E308072: message-id=<20060303121424.83765.qmail@web26606.mail.ukl.yahoo.com>
    Mar 3 13:21:01 mail postfix/qmgr[1814]: A9D3E308072: from=<gaetan_bouraga@yahoo.fr>, size=2279, nrcpt=1 (queue active)
    Mar 3 13:21:01 mail amavis[1886]: (01886-01) Passed, <gaetan_bouraga@yahoo.fr> -> <gbouraga@nic.ga>, Message-ID: <20060303121424.83765.qmail@web26606.mail.ukl.yahoo.com>, Hits: 0.079
    Mar 3 13:21:01 mail postfix/smtp[2096]: 3922430806E: to=<gbouraga@nic.ga>, relay=127.0.0.1[127.0.0.1], delay=16, status=sent (250 2.6.0 Ok, id=01886-01, from MTA: 250 Ok: queued as A9D3E308072)
    Mar 3 13:21:01 mail postfix/qmgr[1814]: 3922430806E: removed
    Mar 3 13:21:01 mail postfix/smtpd[2106]: disconnect from localhost.localdomain[127.0.0.1]
    mail:/var/log# tail mail.log
    Mar 3 13:21:01 mail postfix/smtpd[2106]: A9D3E308072: client=localhost.localdomain[127.0.0.1]
    Mar 3 13:21:01 mail postfix/cleanup[2095]: A9D3E308072: message-id=<20060303121424.83765.qmail@web26606.mail.ukl.yahoo.com>
    Mar 3 13:21:01 mail postfix/qmgr[1814]: A9D3E308072: from=<gaetan_bouraga@yahoo.fr>, size=2279, nrcpt=1 (queue active)
    Mar 3 13:21:01 mail amavis[1886]: (01886-01) Passed, <gaetan_bouraga@yahoo.fr> -> <gbouraga@nic.ga>, Message-ID: <20060303121424.83765.qmail@web26606.mail.ukl.yahoo.com>, Hits: 0.079
    Mar 3 13:21:01 mail postfix/smtp[2096]: 3922430806E: to=<gbouraga@nic.ga>, relay=127.0.0.1[127.0.0.1], delay=16, status=sent (250 2.6.0 Ok, id=01886-01, from MTA: 250 Ok: queued as A9D3E308072)
    Mar 3 13:21:01 mail postfix/qmgr[1814]: 3922430806E: removed
    Mar 3 13:21:01 mail postfix/smtpd[2106]: disconnect from localhost.localdomain[127.0.0.1]
    Mar 3 13:21:10 mail postfix/virtual[2108]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:21:11 mail postfix/master[1808]: warning: process /usr/lib/postfix/virtual pid 2108 exit status 1
    Mar 3 13:21:11 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
    mail:/var/log# tail mail.log
    Mar 3 13:21:01 mail amavis[1886]: (01886-01) Passed, <gaetan_bouraga@yahoo.fr> -> <gbouraga@nic.ga>, Message-ID: <20060303121424.83765.qmail@web26606.mail.ukl.yahoo.com>, Hits: 0.079
    Mar 3 13:21:01 mail postfix/smtp[2096]: 3922430806E: to=<gbouraga@nic.ga>, relay=127.0.0.1[127.0.0.1], delay=16, status=sent (250 2.6.0 Ok, id=01886-01, from MTA: 250 Ok: queued as A9D3E308072)
    Mar 3 13:21:01 mail postfix/qmgr[1814]: 3922430806E: removed
    Mar 3 13:21:01 mail postfix/smtpd[2106]: disconnect from localhost.localdomain[127.0.0.1]
    Mar 3 13:21:10 mail postfix/virtual[2108]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:21:11 mail postfix/master[1808]: warning: process /usr/lib/postfix/virtual pid 2108 exit status 1
    Mar 3 13:21:11 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
    Mar 3 13:22:11 mail postfix/virtual[2110]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
    Mar 3 13:22:12 mail postfix/master[1808]: warning: process /usr/lib/postfix/virtual pid 2110 exit status 1
    Mar 3 13:22:12 mail postfix/master[1808]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling


    any help.

    ebbay
    ------------
     
    Last edited: Mar 3, 2006
  8. falko

    falko Super Moderator ISPConfig Developer

  9. ebbay

    ebbay New Member

    Huuummmmmmm...!!!!!
    :D

    but in mail.err I have:

    bouraga@mail:~$ tail /var/log/mail.err
    Mar 3 23:32:17 mail imaplogin: LOGIN FAILED, ip=[::ffff:127.0.0.1]
    Mar 3 23:33:19 mail dccproc[3897]: socket(UDP): Address family not supported by protocol
    Mar 4 00:00:12 mail dccproc[3934]: socket(UDP): Address family not supported by protocol
    Mar 4 10:48:38 mail dccproc[1877]: socket(UDP): Address family not supported by protocol
    Mar 4 10:48:50 mail dccproc[1895]: socket(UDP): Address family not supported by protocol
    Mar 4 11:05:15 mail dccproc[1937]: socket(UDP): Address family not supported by protocol
    Mar 4 11:07:37 mail imaplogin: DISCONNECTED, user=gbouraga@nic.ga, ip=[::ffff:127.0.0.1], headers=0, body=355, time=0
    Mar 4 11:09:11 mail dccproc[2000]: socket(UDP): Address family not supported by protocol
    Mar 4 11:09:57 mail imaplogin: DISCONNECTED, user=gbouraga@nic.ga, ip=[::ffff:127.0.0.1], headers=0, body=355, time=0
    Mar 4 11:12:22 mail dccproc[2057]: socket(UDP): Address family not supported by protocol

    AND
    bouraga@mail:~$ tail /var/log/mail.log
    Mar 4 11:16:35 mail imaplogin: LOGOUT, user=gbouraga@nic.ga, ip=[::ffff:127.0.0.1], headers=1032, body=0, time=0
    Mar 4 11:16:39 mail imaplogin: Connection, ip=[::ffff:127.0.0.1]
    Mar 4 11:16:39 mail imaplogin: LOGIN, user=gbouraga@nic.ga, ip=[::ffff:127.0.0.1], protocol=IMAP
    Mar 4 11:16:39 mail imaplogin: LOGOUT, user=gbouraga@nic.ga, ip=[::ffff:127.0.0.1], headers=1032, body=0, time=0
    Mar 4 11:16:41 mail imaplogin: Connection, ip=[::ffff:127.0.0.1]
    Mar 4 11:16:41 mail imaplogin: LOGIN, user=gbouraga@nic.ga, ip=[::ffff:127.0.0.1], protocol=IMAP
    Mar 4 11:16:41 mail imaplogin: LOGOUT, user=gbouraga@nic.ga, ip=[::ffff:127.0.0.1], headers=0, body=0, time=0
    Mar 4 11:16:44 mail imaplogin: Connection, ip=[::ffff:127.0.0.1]
    Mar 4 11:16:44 mail imaplogin: LOGIN, user=gbouraga@nic.ga, ip=[::ffff:127.0.0.1], protocol=IMAP
    Mar 4 11:16:44 mail imaplogin: LOGOUT, user=gbouraga@nic.ga, ip=[::ffff:127.0.0.1], headers=0, body=0, time=0




    thanks.

    ebbay
    ---------------
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Are you sure you have Courier installed and not any other IMAP daemon? This looks like another IMAP daemon...
     

Share This Page