
jms1 at jms1
Sep 17, 2007, 9:00 AM
Post #6 of 7
(5390 views)
Permalink
|
|
Re: Unknown user bounces to wrong address
[In reply to]
|
|
On 2007-09-17, at 0421, Werner Van Belle wrote: > > Lately I noticed that my server delivers spam through bouncing a > non-deliverable email to the wrong address. Below I past once such > example. > The problem as I see it is that my mailserver behaves properly but the > spammer doesn't (since it reports the wrong return-path). the problem is that qmail accepted the original message, because it only verifies the "domain" portion of the recipient addresses. there are several patches out there which modify qmail-smtpd to check the "userid" portion of the recipient address as well. the most popular one, for people who also use vpopmail, is called CHKUSER. http://www.interazioni.it/opensource/chkuser/ i have also written one, which doesn't require vpopmail, but does require you to create a .cdb file whose keys are every valid email address on your server. (yes, addresses with "-default@" are handled correctly.) http://qmail.jms1.net/patches/validrcptto.cdb.shtml but if qmail doesn't accept the message in the first place, you don't have to worry about whether or not a bounce message can be delivered, because you won't be generating bounce messages. CHKUSER is nice because when somebody adds a mailbox or changes their password, qmail-smtpd immediately "knows" about it. however, it requires vpopmail, it only works with vpopmail mailboxes, it must run on the same machine with the mailboxes (at least that's what i've gotten from the documentation), and it requires you to re-compile qmail whenever a new version of vpopmail is released. my patch works with any kind of mailbox management, and it can work on "mailhubs" which pre-scan the incoming messages for viruses and spam before handing them to a dedicated mailbox server. however, it requires you to build and update the .cdb file- and while i have written some scripts to automate the process, they are not the most intuitive things in the world. obviously, i'm slightly biased toward my own patch, but take some time and read about both of them- and i'm sure others on the list can provide the URLs for any other patches which are out there. each one has its own strengths and weaknesses. there are users of both patches here on the list, so ask questions of people who are already using them... and make an informed decision as to what's going to work best for your server. and if you do end up using my patch, i would also direct your attention to my combined patch, which includes the validrcptto.cdb patch, along with several other nice features, including the ability to use a .cdb file to validate SMTP AUTH commands. http://qmail.jms1.net/patches/combined.shtml http://qmail.jms1.net/patches/authcdb.shtml (page almost finished) ---------------------------------------------------------------- | John M. Simpson --- KG4ZOW --- Programmer At Large | | http://www.jms1.net/ <jms1 [at] jms1> | ---------------------------------------------------------------- | http://video.google.com/videoplay?docid=-1656880303867390173 | ----------------------------------------------------------------
|