nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

TEST.deliver.md (3594B)


      1 You can do several tests of qmail delivery without setting up qmail to
      2 accept messages through SMTP or through /usr/lib/sendmail:
      3 
      4 1. After you start qmail, look for a
      5 
      6    `qmail: status: local 0/10 remote 0/20`
      7 
      8    line in syslog. qmail-send always prints either "cannot start" or
      9    "status". (The big number is a splogger timestamp.)
     10 
     11 2. Do a ps and look for the qmail daemons. There should be four of
     12    them, all idle: qmail-send, running as qmails; qmail-lspawn, running
     13    as root; qmail-rspawn, running as qmailr; and qmail-clean, running
     14    as qmailq. You will also see splogger, running as qmaill.
     15 
     16 3. Local-local test: Send yourself an empty message. (Replace "me"
     17    with your username. Make sure to include the "to:" colon.)
     18 
     19    `% echo to: me | /var/qmail/bin/qmail-inject`
     20 
     21    The message will show up immediately in your mailbox, and syslog
     22    will show something like this:
     23 
     24    ```
     25    qmail: new msg 53 
     26    qmail: info msg 53: bytes 246 from <me@domain> qp 20345 uid 666
     27    qmail: starting delivery 1: msg 53 to local me@domain 
     28    qmail: status: local 1/10 remote 0/20
     29    qmail: delivery 1: success: did_1+0+0/
     30    qmail: status: local 0/10 remote 0/20
     31    qmail: end msg 53 
     32    ```
     33 
     34    (53 is an inode number; 20345 is a process ID; your numbers will
     35    probably be different.)
     36 
     37 4. Local-error test: Send a message to a nonexistent local address.
     38 
     39    `% echo to: nonexistent | /var/qmail/bin/qmail-inject`
     40 
     41    ```
     42    qmail: new msg 53 
     43    qmail: info msg 53: bytes 246 from <me@domain> qp 20351 uid 666
     44    qmail: starting delivery 2: msg 53 to local nonexistent@domain
     45    qmail: status: local 1/10 remote 0/20
     46    qmail: delivery 2: failure: No_such_address.__#5.1.1_/
     47    qmail: status: local 0/10 remote 0/20
     48    qmail: bounce msg 53 qp 20357
     49    qmail: end msg 53 
     50    qmail: new msg 54 
     51    qmail: info msg 54: bytes 743 from <> qp 20357 uid 666
     52    qmail: starting delivery 3: msg 54 to local me@domain
     53    qmail: status: local 1/10 remote 0/20
     54    qmail: delivery 3: success: did_1+0+0/
     55    qmail: status: local 0/10 remote 0/20
     56    qmail: end msg 54 
     57    ```
     58 
     59    You will now have a bounce message in your mailbox.
     60 
     61 5. Local-remote test: Send an empty message to your account on another
     62    machine.
     63 
     64    `% echo to: me@wherever | /var/qmail/bin/qmail-inject`
     65 
     66    ```
     67    qmail: new msg 53 
     68    qmail: info msg 53: bytes 246 from <me@domain> qp 20372 uid 666
     69    qmail: starting delivery 4: msg 53 to remote me@wherever
     70    qmail: status: local 0/10 remote 1/20
     71    qmail: delivery 4: success: 1.2.3.4_accepted_message./...
     72    qmail: status: local 0/10 remote 0/20
     73    qmail: end msg 53 
     74    ```
     75 
     76    There will be a pause between "starting delivery" and "success";
     77    SMTP is slow. Check that the message is in your mailbox on the other
     78    machine.
     79 
     80 6. Local-postmaster test: Send mail to postmaster, any capitalization.
     81 
     82    `% echo to: POSTmaster | /var/qmail/bin/qmail-inject`
     83 
     84    Look for the message in the alias mailbox, normally ~alias/Mailbox.
     85 
     86 7. Double-bounce test: Send a message with a completely bad envelope.
     87 
     88    ```
     89    % /var/qmail/bin/qmail-inject -f nonexistent
     90    To: unknownuser
     91    Subject: testing
     92 
     93    This is a test. This is only a test.
     94    %
     95    ```
     96 
     97    (Use end-of-file, not dot, to end the message.) Look for the double
     98    bounce in the alias mailbox.
     99 
    100 8. Group membership test:
    101 
    102    ```
    103    % cat > ~me/.qmail-groups
    104    |groups >> MYGROUPS; exit 0
    105    % /var/qmail/bin/qmail-inject me-groups < /dev/null
    106    % cat ~me/MYGROUPS
    107    ```
    108 
    109    MYGROUPS will show your normal gid and nothing else. (Under Solaris,
    110    make sure to use /usr/ucb/groups; /usr/bin/groups is broken.)