Temporary lookup error (save a tormented soul)

2014-07-27
2014-07-30
  • Thomas Andersson

    Hi!
    I'm in the process of moving froma Windows based server to Ubuntu, unfortunately I'm a complete *nix noob so I'm having a pretty steep learning curve. I've got everything running except a mails erver though and at this point I'm ripping out my hair and is about ready to punch someone in frustartion.
    I've looked at so many guides and started over so many times it's not even funny.
    I'm following (trying) this guide: https://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
    When I was testing the bare postfix setup with textfiles things seemed to work, but after postfixadmin and dovecot no luck.

    When I telnet to 25 on localhost and do the
    EHLO


    MAIL FROM <someone>
    RCPT TO: <valid address="" or="" alias="">
    All I get is a temporary lookup error, nothing is logged in sql log.
    When I create mailboxes in postfix admin and select send welcome mail I get no error message, but the maildir is untouched, it seems no mail is generated (Am I missunderstanding) ?

    Any and all help figuring out where I'm going wrong would be greatly appreciated. Please let me know what additional information you need from me as well.
    Ubuntu 14.04, PFAdm 2.91, Postfix 2.11.0-1, Dovecot 1.2.2.9-1, MySQL 5.6.17

     
  • Simon Hobson

    Simon Hobson - 2014-07-28

    In the PFA package is a text file specifying the configs needed to make it work - you MUST follow those config instructions or PFA will not work properly. I've only had a quick flick through the linked article, but it doesn't look like the PFA setup instructions are complete.
    Also, since you are using Ubuntu, I'd suggest also using the distro packages rather than downloading the source as suggested in that article. It will put all the bits in the right place for one thing. This is especially important for an inexperienced user.

    When you create a mailbox in PFA - assuming you tick the box for a welcome mail then you should see something in the postfix logs (/var/log/mail.log). This may fail - for example, some of the restrictions I put on my mail servers cause it to fail so I had to slightly tweak the script.

     
  • Thomas Andersson

    The guide I've been following suggest other settings for PFA than the default (And likely also was made for an older version) so I've decided to try and switch around to use the PFA sugegsted settings (I also try to look up settings and understand what they do to learn more).

     
  • Thomas Andersson

    Removed everything and started over, now have a minimal postfix install with PFA, followed instructions to the letter but no go.
    No error messages is generated, and both mail and PFA website says Ok when sending mails, but no mails show up anywhere and no mailboxes/files/directories are being created. Really scratching my head now trying to figure out what can be so wrong with such a minimal setup?

    I used the sh ./POSTFIX_CONF method to create the config files and moved them to /etc/postfix/sql

    My postfix setup:

    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
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
    mydomain = ubusrv.net
    myhostname = mail.ubusrv.net
    myorigin = /etc/mailname
    mydestination = localhost
    relayhost = mailout.comhem.se
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    html_directory = /usr/share/doc/postfix/html

    virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
    virtual_alias_maps =
    proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
    proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
    proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
    virtual_mailbox_maps =
    proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf,
    proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf

    if you let postfix store your mails directly (without using maildrop, dovecot deliver etc.)

    virtual_mailbox_base = /var/mail/vmail

     
  • Thomas Andersson

    OK, not sure what sorted it, but I removed localhost from mydestination, set up a new user/group UGID 5000 to handle things and added these lines:
    virtual_minimum_uid = 5000
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    virtual_transport = virtual
    Then everything seemed to kick into gear, folders are created, mail messages are created in them and local delivery seems to work fine. Mailutils no longer works for minimal mail handling and I also need to figure out how to get mail out (the retarded mail relay my ISP force me to use due to the blocked port 25 rejects every mail as spam).

     

Log in to post a comment.