Menu

Help with sendmail mqueued messages

2003-06-26
2003-07-15
  • Cesar Sanchez

    Cesar Sanchez - 2003-06-26

    Hi.  I've installed everything on my RedHat 9 box, but i've have some kind of problems.  First at all, Qpooper-sql is working, i can verify users and passwords on my database.
    Sendmail-sql, apparently is working fine, after installation, patching, and configuring, the connection with mysql is ok, debug tests, show me that a real account called prooflocal@mydomain.edu is well addressed by its alias proofvirtual@mydomain.edu by sendmail -bt /map virtualuser proofvirtual@mydomain.edu, returns prooflocal@mydomain.edu.  This shows that apparently is working fine, but, yet, i've not understood the real use of users table.
    Finally, after using a local delivery client such as mail -v proofvirtual@, the mail seems to be deliveried. but, it seems to be retained into mqueue folder of sendmail folders.  I don't know how to make it delivery a mail, i don't know what's happening if local account exists, and account data is in users table, virtualuser table exist, mapping lhs and rhs as shown in example.

    Could you help me to try some debug tests to find why the mail is staying in mqueue folder?  How must i configure folder to store mail of virtual accounts? it's necessary to keep always a local account? can I only have virtual user accounts in sql tables?

    Thanks for your help.

    Csar Augusto Snchez
    Autonoma University of Manizales
    Colombia - South America

     
    • Kev Green

      Kev Green - 2003-06-27

      It sounds like your MDA [Qpopper-sql] is delivering the mail, but issuing the wrong returncode to sendmail when it's done
      delivering, so sendmail thinks that it hasn't been delivered and yet it has.

      This could be down to configuration of Qpopper-sql, or down to the MTA flags in your sendmail.cf file, so I'd check those very thoroughly and experiment a bit.

      Essentially, if sendmail is attempting delivery to the right mailbox, having done a lookup in the user/mailbox databases and virtusertable/etc. then it's past the point of sendmail-sql's involvement, so I think the problem is elsewhere.

      However I could always be wrong...

      If you can't work it out, let us know what your maillog shows for these problematic mailboxes, and I'll see if I can help.

      Also, please make sure that you are running the latest version of sendmail-sql in any case. Version 8.12.9-18 is IIRC how far we've got now.

       
    • Cesar Sanchez

      Cesar Sanchez - 2003-06-27

      Hi again,  i'm using the latest release of sendmail-sql.

      I don't understand what's happening with this stuff.
      Apparently is working fine, but, all messages i've tried to send are keeped in mqueue and in maillog file appears to be marked as queued.  After execution of mailq, it changes status to deferred.  What do you think?  Attach logs data.

      Maillog (After sending message to virtual user proofx@eniac2.autonoma.edu.co)
      -----------------------------------------------
      Jun 27 10:15:22 eniac2 sendmail[3317]: h5RFFMOs003317: from=<root@eniac2.autonom
      a.edu.co>, size=327, class=0, nrcpts=1, msgid=<200306271515.h5RFFMAs003316@eniac
      2.autonoma.edu.co>, proto=ESMTP, daemon=MTA, relay=eniac2 [127.0.0.1]
      Jun 27 10:15:22 eniac2 sendmail[3317]: h5RFFMOs003317: to=<proofx@eniac2.autonom
      a.edu.co>, delay=00:00:00, mailer=local, pri=30327, dsn=4.5.2, stat=queued
      Jun 27 10:15:22 eniac2 sendmail[3316]: h5RFFMAs003316: to=proofx@eniac2.autonoma
      .edu.co, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=
      30000, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (h5RFFMOs003317 Messa
      ge accepted for delivery)
      ------------------------------------------------
      After that, i see mqueue folder and:
      ------------------------------------------------
      total 2
      -rw-------    1 root     smmsp           0 jun 27 10:15 dfh5RFFMOs003317
      -rw-------    1 root     smmsp           0 jun 27 10:16 dfh5RFG3Os003333
      -rw-------    1 root     smmsp         817 jun 27 10:15 qfh5RFFMOs003317
      -rw-------    1 root     smmsp         821 jun 27 10:16 qfh5RFG3Os003333
      [root@eniac2 mqueue]#
      -------------------------------------------------
      And, after running mailq:
      -------------------------------------------------
      [root@eniac2 mqueue]# mailq
                      /var/spool/mqueue (2 requests)
      -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
      h5RFFMOs003317        0 Fri Jun 27 10:15 <root@eniac2.autonoma.edu.co>
                       (Deferred)
                                               <proofx@eniac2.autonoma.edu.co>
      h5RFG3Os003333        0 Fri Jun 27 10:16 <root@eniac2.autonoma.edu.co>
                       (Deferred)
                                               <prueba1@eniac2.autonoma.edu.co>
                      Total requests: 2
      -------------------------------------------------

      I don't know what's happening here.

      My sendmail configuration lines are set default as in documentation you show it.
      --------------------------------------
      # Generics table (mapping outgoing addresses)
      Kgenerics mysql -Mgenericstable
      # Virtual user table (maps incoming users)
      Kvirtuser mysql -Mvirtuser -Llhs -Rrhs -Dsendmail
      # Mailer table (overriding domains)
      Kmailertable mysql -Mmailertable -Ldomain -Rmapping -Dsendmail
      -----------------------------------------

      In sqlmail.conf, i've put the mysql configuration to get connection, and it's apparently ok.

      The tables are created based on examples in documentation ( users, virtuser, etc)

      Database extraction is working probing sendmail with debug switches (sendmail -bt /map virtuser proofx@eniac2.autonoma.edu.co returns prueba1@eniac2.autonoma.edu.co) that shows its alias is pointing correctly.

      but, when i send an email to alias user called proofx@eniac2.autonoma.edu.co, it's sended apparently correctly.
      ------------------------------------
      [root@eniac2 mqueue]# mail -v proofx@eniac2.autonoma.edu.co
      Subject: proof
      proof
      .
      Cc:
      proofx@eniac2.autonoma.edu.co... Connecting to [127.0.0.1] via relay...
      220 eniac2.autonoma.edu.co ESMTP Sendmail 8.12.9/SQL-8.12.9-18/8.12.9; Fri, 27 J
      un 2003 10:49:42 -0500
      >>> EHLO eniac2.autonoma.edu.co
      250-eniac2.autonoma.edu.co Hello eniac2 [127.0.0.1], pleased to meet you
      250-ENHANCEDSTATUSCODES
      250-PIPELINING
      250-EXPN
      250-VERB
      250-8BITMIME
      250-SIZE
      250-DSN
      250-ETRN
      250-DELIVERBY
      250 HELP
      >>> MAIL From:<root@eniac2.autonoma.edu.co> SIZE=56
      250 2.1.0 <root@eniac2.autonoma.edu.co>... Sender ok
      >>> RCPT To:<proofx@eniac2.autonoma.edu.co>
      >>> DATA
      250 2.1.5 <proofx@eniac2.autonoma.edu.co>... Recipient ok (will queue)
      354 Enter mail, end with "." on a line by itself
      >>> .
      250 2.0.0 h5RFngOs003379 Message accepted for delivery
      proofx@eniac2.autonoma.edu.co... Sent (h5RFngOs003379 Message accepted for deliv
      ery)
      Closing connection to [127.0.0.1]
      >>> QUIT
      221 2.0.0 eniac2.autonoma.edu.co closing connection
      -----------------------------------------------

      Thanks for your help,

      Csar Augusto Snchez
      Autonoma University of Manizales
      Colombia - South America

       
    • Kev Green

      Kev Green - 2003-06-27

      From the README file, the sendmail debug flags you should be using to track down the problem!

      -d27.4  - Debug alias lookups.
      -d28.4  - Debug user database lookups.
      -d37.4  - Debug configuration reading.
      -d38.20 - Debug map configuration.
      -d39.20 - Debug map lookups.
      -dsm_trace_mysql.9

      So try:

      sendmail -q -vv -d27.4 -d28.4 -d37.4 -d38.20 -d39.20 -dsm_trace_mysql.9

      And check the output of that command, and what it puts into the syslog.

      That should tell you what is happening if it is to do with sendmail-sql.

      K.

       
    • Kev Green

      Kev Green - 2003-07-15

      Hmmm... looking at this again, in relation to another problem, possibly you don't have a MysqlMailboxTable setting in your /etc/mail/sqlmail.conf file? Set that to the same as your MysqlUserTable, and it should work.

       

Log in to post a comment.