Ok, thought that dbmail-smtp handeled that automaticly using the sendmail binary and created its own bounce...
My MTA anyway is QMAIL and I ended up creating the following script to have qmail do the boucing... Maybe something for the contrib dir? Instead of adding the "|/usr/local/sbin/dbmail ${RECIPIENT:7}" thing in .qmail-default point to this script instead and fix the paths... Would be nice tho to have a C program that does the checking... since this doesn't check if theres a user with that name but only real email addresses, but it's a start anyways for others wanting this. I have no idea if the error code that it returns (112) is correct... but "it works for me" (tm) ---------------- Cut from here ---------------------- #!/bin/sh #Get config from dbmail configfile... . /etc/dbmail.conf &>/dev/null RECIPIENT_USER=`echo ${RECIPIENT:7} | cut -d@ -f1 | tr A-Z a-z`; RECIPIENT_HOST=`echo ${RECIPIENT:7} | cut -d@ -f2 | tr A-Z a-z`; QURERY=`/usr/bin/mysql -u${user} -p${pass} -D${db} \ --exec="select alias_idnr from ${table_prefix}aliases where lower(alias)='[EMAIL PROTECTED]' or lower(alias)='[EMAIL PROTECTED]'"`; echo "Checking: [EMAIL PROTECTED] Result: ${QUERY}" >> test.log; if [ -z "${QURERY}" ]; then #Query returned nothing... no mailbox found... echo "Sorry, no mailbox here by that name (#5.1.1)"; exit 112; else #Email address is OK... continue cat <&0 | /usr/local/sbin/dbmail-smtp -d [EMAIL PROTECTED] exit 0 fi; -------------------- To here ------------------------- -----Ursprungligt meddelande----- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Paul J Stevens Skickat: den 15 november 2005 21:02 Till: DBMAIL Developers Mailinglist Ämne: Re: [Dbmail-dev] Mail to unknown mailbox does not bounce?? Johnny Granberg wrote: > Im having some major problems trying to get dbmail to bounce messages to > unknown users... > Nov 15 14:48:55 miranda dbmail/smtp[29306]: insert_messages(): we need > to deliver [0] messages to external addresses A faq. If you require support debugging your setup, please describe your setup (platform, database engine, mta, etc) and more importantly include level=5 logs. Also please don't run 2.1.3, but update to svn-trunk. That will fix several problems in imap and pop present in 2.1.3. [I'm determined to finish the search/sort rewrite before releasing 2.1.4, grrrr.] That said, imo bouncing is best done in the mta, not in dbmail. Still, dbmail *can* provide reliable delivery-status-notifation, but *only* in lmtp based delivery, and not in dbmail-smtp. They share the same code, but pipe based delivery has no mechanism for letting the mta know about failed delivery. If you need to use pipe based delivery (dbmail-smtp), it's best to let the mta query dbmail for valid addresses and let the mta worry about bounce generation. In your case, I suspect delivery was successfull, hence the lack of bounce generation. But I'm just blowing wind here without seeing the logs. -- ________________________________________________________________ Paul Stevens mailto:[EMAIL PROTECTED] NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED] The Netherlands________________________________http://www.nfg.nl _______________________________________________ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev