Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto

Discussion in 'Server Operation' started by fenix, Mar 10, 2006.

  1. fenix

    fenix New Member

    After completing the Virtual Users And Domains With Postfix, Courier And MySQL step though (http://www.howtoforge.com/virtual_postfix_mysql_quota_courier).

    As far as i can tell i've completed it to the letter.

    Copies of my configuration files can be accessed here:
    http://220.233.179.84/mail-config/

    But when i try to smtp myself an email i get this:

    Code:
    ehlo mail.example.com
    250-mail.mediafluid.net
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH LOGIN PLAIN
    250-AUTH=LOGIN PLAIN
    250 8BITMIME
    mail from: [email]blah@example.com[/email]
    250 Ok
    rcpt to: [email]aaron@mediafluid.net[/email]
    451 <aaron@mediafluid.net>: Temporary lookup failure
    
    Pop gives me this:
    Code:
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    +OK Hello there.
    user [email]aaron@mediafluid.net[/email]
    +OK Password required.
    pass <<password>>
    -ERR Maildir: No such file or directory
    Connection closed by foreign host.
    
    Mysql Structure is as follows: (Transports not show because i dont have/need them).
    Code:
    mysql> show tables;
    +----------------+
    | Tables_in_mail |
    +----------------+
    | domains        |
    | forwardings    |
    | transport      |
    | users          |
    +----------------+
    
    mysql> select * from domains;
    +----------------+
    | domain         |
    +----------------+
    | mediafluid.net |
    +----------------+
    1 row in set (0.00 sec)
    
    mysql> select * from forwardings;
    +---------------------+---------------------+
    | source              | destination         |
    +---------------------+---------------------+
    | info@mediafluid.net | test@mediafluid.net |
    +---------------------+---------------------+
    1 row in set (0.01 sec)
    
    mysql> select * from users;
    +----------------------+---------------+----------+
    | email                | password      | quota    |
    +----------------------+---------------+----------+
    | test@mediafluid.net  | ojuzu1LcDjnhU | 10485760 |
    | aaron@mediafluid.net | 0uFEd8Rm7./Mc | 10485760 |
    +----------------------+---------------+----------+
    2 rows in set (0.02 sec)
    
    
    /etc/init.d/postfix reload and check both come back with [ ok ].

    /var/log/mail.warn contains this(repeating over and over every second):
    Code:
    Mar 10 23:10:00 localhost postfix/postdrop[16493]: warning: mail_queue_enter: create file maildrop/591653.16493: No such file or directory
    Mar 10 23:10:01 localhost postfix/postdrop[15383]: warning: mail_queue_enter: create file maildrop/937108.15383: No such file or directory
    Mar 10 23:10:01 localhost postfix/postdrop[14833]: warning: mail_queue_enter: create file maildrop/116518.14833: No such file or directory
    
     
  2. fenix

    fenix New Member

    Code:
    root@evo:/var/spool/mail# postconf -d |grep queue_directory
    queue_directory = /var/spool/postfix
    
    Code:
    root@evo:/var/spool/postfix# ls -l
    total 72
    drwx------   2 postfix root     4096 Mar 11 00:14 active
    drwx------   2 postfix root     4096 Mar 10 18:41 bounce
    drwx------   2 postfix root     4096 Mar 10 18:41 corrupt
    drwx------  13 postfix root     4096 Mar 11 00:04 defer
    drwx------  13 postfix root     4096 Mar 11 00:04 deferred
    drwxr-xr-x   2 root    root     4096 Mar 10 20:03 etc
    drwx------   2 postfix root     4096 Mar 10 18:41 flush
    drwx------   2 postfix root     4096 Mar 10 18:41 hold
    drwx------   2 postfix root     4096 Mar 11 00:00 incoming
    drwxr-xr-x   2 root    root     4096 Mar 10 20:03 lib
    drwxrwx---   2 postfix root     4096 Mar 11 00:18 maildrop
    drwxr-xr-x   2 root    root     4096 Mar 10 20:26 pid
    drwx------   2 postfix root     4096 Mar 10 20:03 private
    drwx--x---   2 postfix postdrop 4096 Mar 10 20:03 public
    drwx------   2 postfix root     4096 Mar 10 18:41 saved
    drwx------   2 postfix root     4096 Mar 10 18:41 trace
    drwxr-xr-x   3 root    root     4096 Mar 10 18:41 usr
    drwxr-xr-x   3 root    root     4096 Mar 10 19:18 var
    
     
  3. falko

    falko Super Moderator

    mediafluid.net doesn't exist in DNS. Therefore Postfix can't find it:

    Code:
    dig mediafluid.net
    
    ; <<>> DiG 9.2.4 <<>> mediafluid.net
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 25093
    ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;mediafluid.net.                        IN      A
    
    ;; Query time: 164 msec
    ;; SERVER: 66.135.40.144#53(66.135.40.144)
    ;; WHEN: Fri Mar 10 14:29:36 2006
    ;; MSG SIZE  rcvd: 32
    You must create an A record for the domain (an MX record would be good, too).
     
  4. fenix

    fenix New Member

    The machine running postfix doesn't seem to have any problem finding it
    Code:
    aaron@evo:~$ dig mediafluid.net
    
    ; <<>> DiG 9.3.1 <<>> mediafluid.net
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60677
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;mediafluid.net.                        IN      A
    
    ;; ANSWER SECTION:
    mediafluid.net.         14386   IN      A       65.254.54.82
    
    ;; AUTHORITY SECTION:
    mediafluid.net.         14386   IN      NS      ns2.amsdns.com.
    mediafluid.net.         14386   IN      NS      ns.amsdns.com.
    
    ;; Query time: 28 msec
    ;; SERVER: 220.233.0.4#53(220.233.0.4)
    ;; WHEN: Sat Mar 11 09:14:46 2006
    ;; MSG SIZE  rcvd: 93
    
    Edit: Just tried it on a few other machines i have shell accounts on it seems to be working.

    The other thing is that i dont have the domain pointed to this machine yet because i dont want to loose mail if the setup doesn't work

    I think i'll be more will to point my domain to the server when i fix these errors.
    Code:
    Mar 10 23:10:00 localhost postfix/postdrop[16493]: warning: mail_queue_enter: create file maildrop/591653.16493: No such file or directory
    Mar 10 23:10:01 localhost postfix/postdrop[15383]: warning: mail_queue_enter: create file maildrop/937108.15383: No such file or directory
    Mar 10 23:10:01 localhost postfix/postdrop[14833]: warning: mail_queue_enter: create file maildrop/116518.14833: No such file or directory
    
     
    Last edited: Mar 10, 2006
  5. fenix

    fenix New Member

    Never mind its all fixed.

    A reboot got rid of those file not found errors and its all working locally.
     

Share This Page