Debian Squeeze virtual user postfix setup with courier / spamassassin /...

Discussion in 'HOWTO-Related Questions' started by MiniMe, Oct 12, 2011.

  1. MiniMe

    MiniMe New Member

    I have followed the above install guide on a new Debian Squeeze machine and i am having difficulties getting to actually work.

    I followed the guide completely without the last step ( squirrelmail ).

    Problem : when i do a telnet to 110 ( POP3 ) login as [email protected]
    with my password ( entered in the DB with the encrypt SQL command ) i get the following error :

    -ERR chdir failed

    and then the connection gets automatically dropped.

    Second of all, i have sent 6 test emails and the /home/vmail folder seems empty ...

    Can someone assist on what the problem could be ?

    Thanks !
  2. MiniMe

    MiniMe New Member

    UPDATE :

    in the mail log was following error / warning :

    dsn=4.4.2, status=deferred (lost connection with[] while receiving the initial server greeting
    Now i was able to fix this error with adding localhost to inet_addresses in /etc/postfix/

    but now i still dont receive email with following message :

    Oct 12 21:42:48 Aphrodite-Artemis postfix/smtp[3215]: 8107F86A2A04: to=<[email protected]>, relay=[]:10024, delay=2.1, delays=0.2/0/0/1.9, dsn=2.0.0, status=sent (250 2.$
    Oct 12 21:42:48 Aphrodite-Artemis postfix/qmgr[3102]: 8107F86A2A04: removed
    Oct 12 21:42:48 Aphrodite-Artemis postfix/error[3218]: 8239386A2A08: to=<[email protected]>, relay=none, delay=0.15, delays=0.08/0/0/0.07, dsn=4.3.0, status=deferred (mail transport unavaible)
    Also ; this appears in the mail logs and in the syslog file :

     postfix/qmgr[3939]: warning: connect to transport private/10485760: No such file or directory
    And yes, AMAVISD and such is running ...
    Last edited: Oct 12, 2011
  3. falko

    falko Super Moderator ISPConfig Developer

    Can you post your and your
  4. MiniMe

    MiniMe New Member

    Certainly , here is :
    # 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 (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
    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 =
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination =, localhost, localhost.localdomain
    relayhost =
    mynetworks =
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = localhost
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/, mysql:/etc/postfix/
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/
    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/
    virtual_create_maildirsize = yes
    virtual_maildir_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/
    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_reci$
    content_filter = amavis:[]:10024
    receive_override_options = no_address_mappings
    And here is

    smtp      inet  n       -       -       -       -       smtpd
    #submission inet n       -       -       -       -       smtpd
    #  -o smtpd_tls_security_level=encrypt
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #smtps     inet  n       -       -       -       -       smtpd
    #  -o smtpd_tls_wrappermode=yes
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #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
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       -       -       -       smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay     unix  -       -       -       -       -       smtp
            -o smtp_fallback_relay=
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes inet n - - - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtpd_bind_address=
    Any idea what could be wrong ?
  5. falko

    falko Super Moderator ISPConfig Developer

    Hm, looks ok. What's the output of
    postqueue -p
  6. MiniMe

    MiniMe New Member

    hi falko , the output is the following :

    root@Aphrodite-Artemis ~ # postqueue -p
    -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
    A482D86A2A18      948 Wed Oct 12 21:31:46  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    BEFBD86A29C5      944 Tue Oct 11 21:53:30  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    8239386A2A08     1867 Wed Oct 12 21:42:48  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    87EFB86A2A1A      952 Wed Oct 12 21:31:48  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    760C786A29F1     2098 Wed Oct 12 22:31:46  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    1955586A2A05     1872 Wed Oct 12 21:56:46  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    2DAE086A29EF     2092 Wed Oct 12 22:31:46  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    0532786A29EC     1880 Wed Oct 12 21:56:48  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    5E33E86A2A1B     1872 Wed Oct 12 21:32:23  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    51FC486A056B      909 Wed Oct 12 23:19:30  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    66C9486A29C8      904 Tue Oct 11 21:52:46  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    39C3286A29AE     1886 Wed Oct 12 21:56:48  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    F0F0D86A29EB     2095 Wed Oct 12 22:31:45  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    F12B986A2A20     1878 Wed Oct 12 21:32:33  [email protected]
                                                      (mail transport unavailable)
                                             [email protected]
    -- 30 Kbytes in 14 Requests.
  7. falko

    falko Super Moderator ISPConfig Developer

  8. MiniMe

    MiniMe New Member

    Dear falko,

    i have found that post as well and its big bullshit :)
    I have a Hetzner machine and therefor, my resolv.conf has hetzner's NS ip's listed.

    So yes, i am 400% sure that the servers listed there are valid ;) since resolving is working just fine :)

    I personally think it has something to do with amavis, since one of the logs said "cannot find file specified " ...
  9. falko

    falko Super Moderator ISPConfig Developer

    I'm running out of ideas... :(
  10. MiniMe

    MiniMe New Member

    Nooooo !

    i really need your help on this one since im about too lose my old Hetzner server :(

    Is there really nothing else you can think off ? :(
  11. MiniMe

    MiniMe New Member

    Hi falko,

    i have disabled amavis in master & in postfix config, restarted postfix
    and did a postqueue -f and postqueue -p , still the same issue exists though.

    Seems then that its an issue with postfix config ??? :s

    maybe there is a wrong SQL setup somewhere ? would that give such errors, or would that give clear SQL errors ???
  12. MiniMe

    MiniMe New Member


    i got rid of the messages !!!!

    Yeeeey !!!

    However, if i send a mail now to my new virtual user system thingie on my new dedicated box.

    Everytime i send an email to one of the users i get following error or status :

    status=bounced (mail for ) loops back to myself

    Any idea how to fix this or what is the cause ???
    Last edited: Oct 17, 2011
  13. falko

    falko Super Moderator ISPConfig Developer

    Add to the mydestination line in /etc/postfix/ and restart Postfix.
  14. MiniMe

    MiniMe New Member

    hi falko, i already have that, check config i already posted previously :

    mydestination =, localhost, localhost.localdomain

    any other idea ?

    Could this be it ? :

    Line 2: the virtual_alias_domains setting tells Postfix that is a so-called virtual alias domain. If you omit this setting then Postfix will reject mail (relay access denied) or will not be able to deliver it (mail for loops back to myself).

    NEVER list a virtual alias domain name as a mydestination domain!

    Although i am not sure if i have this setup like that ...
  15. MiniMe

    MiniMe New Member

    So falko, i hope you still wanna help me but this is where i stand at the moment :

    all the other warnings or errors are gone, i have tried several adjustments to some postfix directives, but nothing seems to work :

    1. My /home/vmail folder is still empty
    2. in the /var/log/ mail.warn and mail.log are following messages :

    Oct 18 21:34:56 Aphrodite-Artemis amavis[9732]: (09732-19) Passed CLEAN, [] [] <[email protected]> -> <[email protected]>, Message-ID: <64151EB4364B4D34B9$
    Oct 18 21:34:56 Aphrodite-Artemis postfix/smtp[17523]: warning: numeric domain name in resource data of MX record for xx.xx.xx.xx
    Oct 18 21:34:56 Aphrodite-Artemis postfix/smtp[17517]: E10D686A0EC3: to=<[email protected]>, relay=[]:10024, delay=3.4, delays=1.5/0/0/1.9, dsn=2.0.0, status=sent (250 2$
    Oct 18 21:34:56 Aphrodite-Artemis postfix/qmgr[17509]: E10D686A0EC3: removed
    Oct 18 21:34:56 Aphrodite-Artemis postfix/smtp[17523]: 26E0586A0ECA: to=<[email protected]>, relay=none, delay=0.14, delays=0.13/0.01/0/0, dsn=5.4.6, status=bounced (mail for loops back to myself)
    Oct 18 21:34:56 Aphrodite-Artemis postfix/cleanup[17516]: 5AEB986A0ECB: message-id=<[email protected]>
    Oct 18 21:34:56 Aphrodite-Artemis postfix/bounce[17524]: 26E0586A0ECA: sender non-delivery notification: 5AEB986A0ECB
    same as above
    Oct 18 21:34:56 Aphrodite-Artemis postfix/smtp[17523]: warning: numeric domain name in resource data of MX record for xx.xx.xx.xx
    Following is in :
    mydestination =, localhost
    mydomain =
    myhostname =
    In my SQL db mail in table domains is only

    With this info, do you have any idea what i should change ?
    Ive been trying several different settings to the mydestination , myhostname and mydomain but i cant quiet get it to work :(

    Please help, i would appreciate it so much.
  16. falko

    falko Super Moderator ISPConfig Developer

    Do you use also in your database, or only in the mydestination line?

    What's in /etc/hosts?
  17. MiniMe

    MiniMe New Member

    Hi falko,

    no i do not use ; is JUST my MX record on my domain !
    In my database domain table is only

    in /etc/hosts is the following :

    ### Hetzner Online AG installimage
    # nameserver config
    # IPv4 localhost  Aphrodite-Artemis
    # IPv6
    ::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
  18. falko

    falko Super Moderator ISPConfig Developer

    Can you add to the Aphrodite-Artemis line and see if that changes anything?
  19. MiniMe

    MiniMe New Member

    hi falko,

    same result : mail for loops back to myself :/
  20. falko

    falko Super Moderator ISPConfig Developer

    I'm running out of ideas... :(

Share This Page