Postfix/Courier/MySQL: Local Delivery Fails

Discussion in 'Server Operation' started by DMXRoid, Apr 10, 2006.

  1. DMXRoid

    DMXRoid New Member

    I've just semi-successfully completed the courier/postfix/mysql/sasl howto at, but now, for some reason, mail sent to a local address, as opposed to a virtual user address, fails. Any email sent to a virtual user found in the MySQL tables works perfectly, but mail is not delivered to local accounts.

    Here's the output of my /var/log/mail.log when I send an email to a local account:

    Apr 10 00:04:55 akira postfix/smtpd[5892]: connect from[]
    Apr 10 00:04:55 akira postfix/smtpd[5892]: E3589228162:[]
    Apr 10 00:04:55 akira postfix/cleanup[5895]: E3589228162: message-id=<[email protected]>
    Apr 10 00:04:55 akira postfix/qmgr[5804]: E3589228162: from=<[email protected]>, size=1257, nrcpt=1 (queue active)
    Apr 10 00:04:57 akira postfix/smtpd[5899]: connect from localhost[]
    Apr 10 00:04:57 akira postfix/smtpd[5899]: 91B5F22817D: client=localhost[]
    Apr 10 00:04:57 akira postfix/cleanup[5895]: 91B5F22817D: message-id=<[email protected]>
    Apr 10 00:04:57 akira postfix/qmgr[5804]: 91B5F22817D: from=<[email protected]>, size=1731, nrcpt=1 (queue active)
    Apr 10 00:04:57 akira postfix/smtpd[5899]: disconnect from localhost[]
    Apr 10 00:04:57 akira amavis[4222]: (04222-03) Passed, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, Hits: 0.661
    Apr 10 00:04:57 akira postfix/smtp[5896]: E3589228162: to=<[email protected]>, relay=[], delay=2, status=sent (250 2.6.0 Ok, id=04222-03, from MTA: 250 Ok: queued as 91B5F22817D)
    Apr 10 00:04:57 akira postfix/qmgr[5804]: E3589228162: removed
    Apr 10 00:04:57 akira postfix/local[5900]: 91B5F22817D: to=<[email protected]>, relay=local, delay=0, status=sent (delivered to command: procmail -a "$EXTENSION")
    Apr 10 00:04:57 akira postfix/qmgr[5804]: 91B5F22817D: removed
    Apr 10 00:05:25 akira postfix/smtpd[5892]: disconnect from[]

    Here's my postfix

    # See /usr/share/postfix/ 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                                                                                               home_mailbox = Maildir/
    myhostname =
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases                                                                                     myorigin = /etc/mailname
    mydestination =,, localhost, localhost.localdomain                       relayhost =
    mynetworks =
    mailbox_command = procmail -a "$EXTENSION"                                                                             mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/, proxy: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_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/                                                  virtual_create_maildirsize = yes
    virtual_mailbox_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_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    content_filter = amavis:[]:10024
    There are no errors reported in /var/log/mail.errr, so I'm confused as to why this mail is never delivered to my local $USER/Maildir/.

    Happy to supply any further needed information, thanks in advance.
  2. falko

    falko Super Moderator Howtoforge Staff

  3. DMXRoid

    DMXRoid New Member

    Invisihosting isn't in my virtual list, it's the main domain of the box, but I figured out hte problem. I had in hte mydestination line, and the extra .com borked it all. I removed that, voila, it works.

    Thanks though!

Share This Page