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

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

  1. MiniMe

    MiniMe 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 mail.xxxx.eu 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 xxxxx.eu/user/ 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 Member

    UPDATE :

    in the mail log was following error / warning :

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

    but now i still dont receive email with following message :

    Code:
    Oct 12 21:42:48 Aphrodite-Artemis postfix/smtp[3215]: 8107F86A2A04: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]: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 :

    Code:
     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 Howtoforge Staff

    Can you post your main.cf and your master.cf?
     
  4. MiniMe

    MiniMe Member

    Certainly , here is main.cf :
    Code:
    # 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 = mail.evil-hannie.eu
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.evil-hannie.eu, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = 176.9.42.90 localhost
    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_maildir_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_reci$
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    
    And here is master.cf

    Code:
    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
    .. /* SOME OTHER DEFAULT STUFF */
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
    
    127.0.0.1:10025 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=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtpd_bind_address=127.0.0.1
    
    Any idea what could be wrong ?
     
  5. falko

    falko Super Moderator Howtoforge Staff

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

    MiniMe Member

    hi falko , the output is the following :

    Code:
    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 Howtoforge Staff

  8. MiniMe

    MiniMe 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 Howtoforge Staff

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

    MiniMe 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 Member

    Hi falko,

    i have disabled amavis in master & main.cf 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 Member

    falko,

    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 mail.mydomein.eu ) 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 Howtoforge Staff

    Add mail.mydomein.eu to the mydestination line in /etc/postfix/main.cf and restart Postfix.
     
  14. MiniMe

    MiniMe Member

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

    mydestination = mail.evil-hannie.eu, localhost, localhost.localdomain

    any other idea ?

    Could this be it ? :

    Line 2: the virtual_alias_domains setting tells Postfix that example.com 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 example.com 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 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.info mail.warn and mail.log are following messages :

    Code:
    mail.info:
    Oct 18 21:34:56 Aphrodite-Artemis amavis[9732]: (09732-19) Passed CLEAN, [195.130.137.66] [213.118.212.210] <[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 mail.evil-hannie.eu: xx.xx.xx.xx
    Oct 18 21:34:56 Aphrodite-Artemis postfix/smtp[17517]: E10D686A0EC3: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]: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 mail.evil-hannie.eu 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
    
    Code:
    mail.log
    same as above
    
    Code:
    mail.warn
    Oct 18 21:34:56 Aphrodite-Artemis postfix/smtp[17523]: warning: numeric domain name in resource data of MX record for mail.evil-hannie.eu: xx.xx.xx.xx
    
    Following is in main.cf :
    Code:
    mydestination = mail.evil-hannie.eu, localhost
    mydomain = evil-hannie.eu
    myhostname = mail.evil-hannie.eu
    
    In my SQL db mail in table domains is only evil-hannie.eu

    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 Howtoforge Staff

    Do you use mail.evil-hannie.eu also in your database, or only in the mydestination line?

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

    MiniMe Member

    Hi falko,

    no i do not use mail.evil-hannie.eu ;
    mail.evil-hannie.eu is JUST my MX record on my domain evil-hannie.eu !
    In my database domain table is only evil-hannie.eu

    in /etc/hosts is the following :

    Code:
    ### Hetzner Online AG installimage
    # nameserver config
    # IPv4
    127.0.0.1 localhost
    176.9.42.71  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 Howtoforge Staff

    Can you add mail.evil-hannie.eu to the 176.9.42.71 Aphrodite-Artemis line and see if that changes anything?
     
  19. MiniMe

    MiniMe Member

    hi falko,

    same result : mail for mail.evil-hannie.eu loops back to myself :/
     
  20. falko

    falko Super Moderator Howtoforge Staff

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

Share This Page