I would like to restate the problem. Someone is trying to send an email and it turns out the MAIL FROM does not resolve, either because there is a problem with DNS or there is no DNS record.

The other element is that the mail is being delivered directly of being passed through a mail router.

Case 1. No DNS record and delivered directly - the item is regarded as spam and we can give a DENY.

Case 2. Problem with DNS and delivered directly - Although not a spam, a DENY will give the sender information that there is a DNS problem, and the appropriate action can be take.

Case3. No DNS record and not delivered directly - the item is regarded as spam and we can give a DENY.

Case 4. Problem with DNS and not delivered directly - A DENY is given and hopefully the sender gets information that the message has not been sent.

If the above analysis is correct, it seems that a DENY is always better that DENYSOFT because in the case that a genuine user is interested, he will get the information that the email could not be delivered in the shortest possible time.


If there is a problem with DNS then I would like to know about it as soon as possible, and so would the sender and so a 55x code



Rasjid Wilcox wrote:


On Mon, 31 Mar 2003 10:04 pm, Peter Gordon wrote:


5. When a mail cannot be delivered it sometimes takes the (legitimate)
sender 5 days to receive the rejection. In business this is very hard
to justify. Is it possible to ensure that the user receives the
rejection immediately?



See below, on the difference between DENYSOFT and DENY.


If a plugin returns DENY, qpsmtpd should be returning a 'permanent' error code (generally 55x) and the senders mailserver should send a bounce message immediately.

However, if a plugin returns DENYSOFT, qpsmptd returns a 'temporary' error code. In this case, the senders mailserver will usually keep trying to send the message for a defined amount of time, before finially giving up and then sending a bounce message to the sender.

The problem is that the amount of time the mailserver keeps trying for (in the case of a DENYSOFT) is configured at the senders end, and can be several days.

To change this setting in qmail for example, you do

# echo "<seconds>" > /var/qmail/control/queuelifetime

where <seconds> is the number of seconds you want qmail to keep trying to deliver a message before it gives up and sends a bounce message.

I'm not sure if you need to restart qmail to get it to act on the changed config.

By default, qmail has a queuelifetime of 7 days, which in my view is *way* too long. Particuarly in business, if the message cannot be delivered within a few hours, the sender probably needs to know.

The only plugin that I can see that returns DENYSOFT is the 'require_resolvable_fromhost' plugin. The problem here is that you don't know whether you are getting a failed query because there is no MX or A record for that domain, or is there just a DNS error somewhere.

However, since if there is no MX or A record for the domain, no-one can send mail to it anyway (including a bounce message) I think a DENYSOFT is appropriate, although some kind of caching mechanism that returns a DENY after 'n' hours of failed lookups for a particular domain would help reduce the number of connection attempts.



6. What is the difference between DENYSOFT and DENY?



Type type of error code returned by qpsmtpd. DENY gives a 'permanent' error code (generally 55x) whereas DENYSOFT gives a 'temporary' error code (generally 45x from memory).


If the senders mail-server does not promptly give a bounce upon a 55x error code, then there is a problem with it, not qpsmtpd.

I hope this helps.

Rasjid.




--
Peter Gordon
Tel: (972) 8 9432430 Ext: 129 Cell phone: 054 438029 Fax: (972) 8 9432429 Valor Ltd, PO Box 152, Yavne 70600, Israel Email: [EMAIL PROTECTED]





Reply via email to